Skip to content

Rebuild InstaForm into a working, legitimate content toolkit - #1

Draft
daturadev wants to merge 2 commits into
repofrom
claude/making-money-scratch-623khq
Draft

Rebuild InstaForm into a working, legitimate content toolkit#1
daturadev wants to merge 2 commits into
repofrom
claude/making-money-scratch-623khq

Conversation

@daturadev

Copy link
Copy Markdown
Owner

What & why

The old main.py did not run (bad arg parsing, random.choice(1, 10) crashes, undefined type, wrong API host), and lib/parser.py scraped a third-party site at import time. The stated model — farming accounts and reselling them with credentials — violates Instagram's Terms and is the opposite of a durable asset.

This PR rebuilds it into a working, tested, ToS-compliant content toolkit for a creator running an account they own.

Changes

  • main.py — real argparse CLI. Draft-by-default; publishing is opt-in behind --publish.
  • lib/config.py — secrets loaded from env / .env, never CLI flags (no leaking into shell history / process lists).
  • lib/media.py — Pexels sourcing (photo/video) with creator attribution built into every asset.
  • lib/captions.py — captions composed from the operator's own words plus a curated, operator-controlled hashtag file.
  • lib/publisher.py — correct official Graph Content Publishing API flow (create container → publish), with error surfacing.
  • lib/drafts.py — human-review step; drafts saved to drafts/ (gitignored).
  • Removed lib/parser.py (fragile import-time scraper).
  • Added requirements.txt, .env.example, .gitignore, rewrote README.md.
  • MONETIZATION.md — honest playbook for turning a real audience into income.
  • docs/index.html — self-contained product landing page.
  • 13 unit tests (tests/), all passing; all modules compile.

Scope / non-goals

Deliberately limited to legitimate use: one owned account, real content, human review before posting. No account creation/resale, no credential trading, no fake engagement, no detection evasion.

Testing

python3 -m pytest -q   # 13 passed

Verified CLI end-to-end: missing-key error path (exit 2), full draft flow with mocked Pexels (draft JSON written, caption rendered), and opt-in publish path.

🤖 Generated with Claude Code

https://claude.ai/code/session_011JkwGgL8j7raZ7ywGoRNhQ


Generated by Claude Code

daturadev and others added 2 commits August 3, 2026 18:16
Replace the broken, non-running script with a modular, tested toolkit for
drafting Instagram posts for an account the operator owns.

- main.py: real argparse CLI; draft-by-default, opt-in --publish
- lib/config.py: secrets from env/.env, never CLI flags
- lib/media.py: Pexels sourcing with creator attribution
- lib/captions.py: captions from the operator's own words + curated tags
- lib/publisher.py: correct official Graph Content Publishing API flow
- lib/drafts.py: human-review step, drafts saved to disk
- Remove lib/parser.py (fragile import-time scraper)
- requirements.txt, .env.example, .gitignore, README, MONETIZATION.md
- docs/index.html: product landing page
- 13 passing unit tests

Scope is deliberately limited to legitimate, ToS-compliant use: one owned
account, real content, human review. No account creation/resale, no fake
engagement, no detection evasion.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011JkwGgL8j7raZ7ywGoRNhQ
Extend the toolkit from Instagram-only to a "draft once, fan out" flow across
Instagram, Threads, YouTube, and TikTok using each platform's official API.

- lib/models.py: PostRequest / PublishResult / PublishReport shared types
- lib/threads.py: Threads API publish (container -> publish; text/image/video)
- lib/youtube.py: Data API v3 resumable upload via OAuth2 refresh token
- lib/tiktok.py: Content Posting API; inbox-draft by default, opt-in direct post
- lib/publisher.py: uniform publish() wrapper returning PublishResult
- lib/crosspost.py: orchestrator; per-platform creds gate, failures isolated
- lib/config.py: per-platform credential loading and guards
- main.py: --platforms fan-out, --title for YouTube
- docs/SETUP_APIS.md: exact per-platform credential setup walkthrough
- .env.example / README: all platforms documented
- Tests for threads, youtube, tiktok, crosspost (22 passing total)

Credentials are user-supplied per platform; platforms without credentials are
skipped, not failed. TikTok direct posting stays gated behind the platform's
required app audit (inbox-draft mode works before that).

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011JkwGgL8j7raZ7ywGoRNhQ
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant