SMART_BLOG_PIPELINE
Smart Blog Pipeline
smart_blog_pipeline.py scans text-like files, groups them by inferred topic, renders HTML pages, writes an index page, and can publish generated pages to Halo.
Build local HTML
`bash
python3 smart_blog_pipeline.py build --root . --out blog_output --organized organized_blog
`
Outputs:
blog_output/index.html: navigation page grouped by topic.blog_output/manifest.json: generated page metadata and skipped-file report.blog_output/<group>/*.html: rendered article pages.organized_blog/<group>/...: grouped source-file copies.
The build skips likely sensitive files and directories by default, including password exports, keys, tokens, AWS credential folders, private-key-like content, and known credential dump folders.
Dry-run publish
`bash
python3 smart_blog_pipeline.py publish --manifest blog_output/manifest.json
`
This prints the posts that would be published without calling Halo.
Publish to Halo
Create a Halo personal access token, then run:
`bash
export HALO_BASE_URL="https://your-halo.example.com"
export HALO_PAT="pat_xxx"
python3 smart_blog_pipeline.py publish --manifest blog_output/manifest.json --publish
`
The script uses Authorization: Bearer <pat> and does not read or store Halo account passwords.
评论区