Rebuild InstaForm into a working, legitimate content toolkit - #1
Draft
daturadev wants to merge 2 commits into
Draft
Rebuild InstaForm into a working, legitimate content toolkit#1daturadev wants to merge 2 commits into
daturadev wants to merge 2 commits into
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What & why
The old
main.pydid not run (bad arg parsing,random.choice(1, 10)crashes, undefinedtype, wrong API host), andlib/parser.pyscraped 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— realargparseCLI. 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 todrafts/(gitignored).lib/parser.py(fragile import-time scraper).requirements.txt,.env.example,.gitignore, rewroteREADME.md.MONETIZATION.md— honest playbook for turning a real audience into income.docs/index.html— self-contained product landing page.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
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