Skip to content

About

高校网络舆情专报自动生成器

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Repository files navigation

Auto Report

An AI-assisted structured report generator for knowledge workers that turns source materials and web references into structured, editable DOCX reports with reproducible workflows.

Features

  • OpenAI-compatible model providers (set any chat-completions base URL)
  • Two built-in templates
    • general — neutral structured report (default): Summary, Key Points, Analysis, Recommendations
    • cn_opinion — specialized Chinese multi-section opinion-analysis layout (compatibility)
  • Interfaces
    • Web UI (primary, localhost only)
    • CLI (reproducible automation)
    • Optional Tkinter GUI (legacy)
  • Configurable branding (organization, cover title, author, reviewer) with neutral defaults
  • Offline unit tests (no paid API key required)

Requirements

  • Python 3.10+
  • An API key for an OpenAI-compatible chat completions endpoint
  • Network access for page fetch, optional reference search, and model calls

Install

git clone https://github.com/demian-bot/auto-report.git
cd auto-report
python3 -m venv .venv
source .venv/bin/activate   # Windows: .venv\Scripts\activate
python -m pip install -e ".[dev]"
cp generator_config.example.json generator_config.json

Or with requirements only:

python -m pip install -r requirements.txt
python -m pip install -e .

Do not commit generator_config.json (gitignored).

API key

export AUTO_REPORT_API_KEY="your-key"

Also recognized: OPENAI_API_KEY, DASHSCOPE_API_KEY, OPENCODE_GO_API_KEY.
On macOS, the web/GUI flows may store the key in the system keychain (service auto_report).

Run

Web UI (primary)

Localhost only — not a multi-user remote server.

auto-report web
# or
python -m auto_report web
# or
python auto_report_web.py

Open the printed URL (default http://127.0.0.1:8765/). Keep the terminal open while generating.

CLI

auto-report generate \
  --input examples/sample_news_items.txt \
  --output ./output \
  --template general

Useful flags: --base-url, --model, --api-key, --organization, --cover-title, --author, --reviewer, --template.

Tkinter GUI (optional)

auto-report gui
# or
python auto_report_gui.py

Configuration

Field Meaning
base_url OpenAI-compatible API root (…/v1)
model Model id
output_dir DOCX output directory (default ./output)
organization_name Optional cover / filename label
report_cover_title Cover heading (default Structured Report)
author_name / reviewer_name Optional signature lines
template general (default) or cn_opinion

Templates

general (default)

Neutral knowledge-worker layout:

  1. Summary
  2. Key Points
  3. Analysis
  4. Recommendations
  5. References

cn_opinion (specialized)

Chinese multi-section opinion-analysis layout (overview, media/public views, risks, recommendations). Kept for compatibility with that workflow; not the product’s sole identity.

Security notes

  • Web UI binds only to loopback. Remote deployment without authentication is out of scope for v0.1.
  • Never commit API keys or private reports.
  • Only send credentials to API providers you trust.

Development

python -m pip install -e ".[dev]"
python -m pytest -q

See CONTRIBUTING.md and SECURITY.md.

Project layout

Path Role
auto_report/ Installable package
auto_report/templates/ general and cn_opinion
auto_report_web.py / cli.py / gui.py Thin compatibility entry scripts
tests/ Offline tests
examples/ Synthetic sample inputs

License

MIT — see LICENSE.

About

高校网络舆情专报自动生成器

Resources

Contributing

Security policy

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages