Skip to content

Commit 07dcc58

Browse files
committed
Initial commit: AutoPaperToPPT — paper search → thesis-style PPT toolkit
Single-process Python 3.12+ CLI + MCP server that searches papers, de-duplicates across sources, optionally enriches via LLM, and exports to .pptx / .xlsx / .bib / .md / .json. Search layer: - 11 pluggable fetcher sources behind a shared HTTPS-only async client with per-source token-bucket rate limits: arxiv, semantic_scholar, openalex, pubmed, acm (Crossref-scoped), dblp, crossref (generic), openaire, springer, ieee, scholar. Top-tier venue whitelist on by default; opt-in scraping for ieee/scholar via env vars; springer needs a free API key. - Field-merge dedup so a paper indexed via multiple sources keeps the earliest canonical record but inherits any OA pdf_url, doi, venue, citation count from later duplicates. - citation_pdf_url meta-tag fallback when publisher landing pages return HTML instead of a PDF, recovering a sizeable fraction of paywalled-but-publicly-mirrored papers. Exporter layer: - pptx: 16:9 widescreen, page-numbered, three rendering tiers (lightweight abstract-only / enriched-flat / thesis-style with pain-point quadrants, KPI block, technique-comparison tables, per-RQ result tables, contribution summary, core observation, limitations & future work, Q&A, references); shape-name contract for downstream editing tools; headless overflow check tied to a 7.05" footer guard. - i18n template strings across 14 languages (en, zh-tw, zh-cn, ja, es, fr, de, ko, pt, ru, it, vi, hi, id), every key present in every language enforced by pytest. - xlsx with Source (real publication venue) vs Indexed-via (fetcher that returned the metadata) columns kept distinct so users never see "openalex" in a column they read as the venue. MCP server: 11 tools (list_sources, search, fetch_paper, fetch_pdf_text, download_pdfs, export, plus five pptx_* editing tools) so an MCP-aware LLM client can drive the full workflow without the Anthropic API key. Local-PDF mode (--pdf): accepts a single file or a directory; a heuristic metadata extractor pulls title, authors, year, arXiv ID, DOI and the real abstract straight from each PDF's front matter, anchored on the Abstract header rather than blind prefix truncation. Documentation: 14-language README + 14-language Sphinx tree, all mirroring the canonical CLAUDE.md / AGENTS.md rules — LLM-as-agent default path, URL/DOI verification, prune-irrelevant-downloads. Six regression tests in tests/test_agents_md.py and tests/test_i18n.py pin the cross-document alignment so future commits can't drift the rules out of sync. Tooling: ruff + bandit + 392-test pytest suite, all hermetic (fetcher tests use recorded fixtures, no live HTTP). Definition of Done in CLAUDE.md enumerates the gates a commit must pass.
0 parents  commit 07dcc58

175 files changed

Lines changed: 35118 additions & 0 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bandit

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
exclude_dirs:
2+
- tests
3+
- .venv
4+
- build
5+
skips:
6+
# No project-wide skips yet. Add here with a one-line reason when needed,
7+
# e.g. "# B101: assert allowed in tests" (already excluded via exclude_dirs).

.gitattributes

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
# Auto detect text files and perform LF normalization
2+
* text=auto

.gitignore

Lines changed: 190 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,190 @@
1+
# Byte-compiled / optimized / DLL files
2+
__pycache__/
3+
*.py[cod]
4+
*$py.class
5+
6+
# C extensions
7+
*.so
8+
9+
# Distribution / packaging
10+
.Python
11+
build/
12+
develop-eggs/
13+
dist/
14+
downloads/
15+
eggs/
16+
.eggs/
17+
lib/
18+
lib64/
19+
parts/
20+
sdist/
21+
var/
22+
wheels/
23+
share/python-wheels/
24+
*.egg-info/
25+
.installed.cfg
26+
*.egg
27+
MANIFEST
28+
29+
# PyInstaller
30+
# Usually these files are written by a python script from a template
31+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
32+
*.manifest
33+
*.spec
34+
35+
# Installer logs
36+
pip-log.txt
37+
pip-delete-this-directory.txt
38+
39+
# Unit test / coverage reports
40+
htmlcov/
41+
.tox/
42+
.nox/
43+
.coverage
44+
.coverage.*
45+
.cache
46+
nosetests.xml
47+
coverage.xml
48+
*.cover
49+
*.py,cover
50+
.hypothesis/
51+
.pytest_cache/
52+
cover/
53+
54+
# Translations
55+
*.mo
56+
*.pot
57+
58+
# Django stuff:
59+
*.log
60+
local_settings.py
61+
db.sqlite3
62+
db.sqlite3-journal
63+
64+
# Flask stuff:
65+
instance/
66+
.webassets-cache
67+
68+
# Scrapy stuff:
69+
.scrapy
70+
71+
# Sphinx documentation
72+
docs/_build/
73+
74+
# PyBuilder
75+
.pybuilder/
76+
target/
77+
78+
# Jupyter Notebook
79+
.ipynb_checkpoints
80+
81+
# IPython
82+
profile_default/
83+
ipython_config.py
84+
85+
# pyenv
86+
# For a library or package, you might want to ignore these files since the code is
87+
# intended to run in multiple environments; otherwise, check them in:
88+
# .python-version
89+
90+
# pipenv
91+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
92+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
93+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
94+
# install all needed dependencies.
95+
#Pipfile.lock
96+
97+
# UV
98+
# Similar to Pipfile.lock, it is generally recommended to include uv.lock in version control.
99+
# This is especially recommended for binary packages to ensure reproducibility, and is more
100+
# commonly ignored for libraries.
101+
#uv.lock
102+
103+
# poetry
104+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
105+
# This is especially recommended for binary packages to ensure reproducibility, and is more
106+
# commonly ignored for libraries.
107+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
108+
#poetry.lock
109+
110+
# pdm
111+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
112+
#pdm.lock
113+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
114+
# in version control.
115+
# https://pdm.fming.dev/latest/usage/project/#working-with-version-control
116+
.pdm.toml
117+
.pdm-python
118+
.pdm-build/
119+
120+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
121+
__pypackages__/
122+
123+
# Celery stuff
124+
celerybeat-schedule
125+
celerybeat.pid
126+
127+
# SageMath parsed files
128+
*.sage.py
129+
130+
# Environments
131+
.env
132+
.venv
133+
env/
134+
venv/
135+
ENV/
136+
env.bak/
137+
venv.bak/
138+
139+
# Spyder project settings
140+
.spyderproject
141+
.spyproject
142+
143+
# Rope project settings
144+
.ropeproject
145+
146+
# mkdocs documentation
147+
/site
148+
149+
# mypy
150+
.mypy_cache/
151+
.dmypy.json
152+
dmypy.json
153+
154+
# Pyre type checker
155+
.pyre/
156+
157+
# pytype static type analyzer
158+
.pytype/
159+
160+
# Cython debug symbols
161+
cython_debug/
162+
163+
# PyCharm
164+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
165+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
166+
# and can be added to the global gitignore or merged into this file. For a more nuclear
167+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
168+
#.idea/
169+
170+
# Ruff stuff:
171+
.ruff_cache/
172+
173+
# PyPI configuration file
174+
.pypirc
175+
176+
# Cursor
177+
# Cursor is an AI-powered code editor.`.cursorignore` specifies files/directories to
178+
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
179+
# refer to https://docs.cursor.com/context/ignore-files
180+
.cursorignore
181+
.cursorindexingignore
182+
183+
# Generated artifacts — search runs, downloaded PDFs, exported decks.
184+
# Produced by `py -m autopapertoppt --out ./exports/...` and can be
185+
# re-generated; committing them would bloat history.
186+
exports/
187+
188+
# Local agent / IDE settings — user-specific, not part of the project.
189+
.claude/
190+
.idea/

.readthedocs.yaml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
version: 2
2+
3+
build:
4+
os: ubuntu-24.04
5+
tools:
6+
python: "3.12"
7+
8+
sphinx:
9+
configuration: docs/conf.py
10+
fail_on_warning: false
11+
12+
python:
13+
install:
14+
- requirements: docs/requirements.txt
15+
16+
formats:
17+
- htmlzip

0 commit comments

Comments
 (0)