尚未检测到更新。GitHub 发布版本后会显示在这里。
个人 GitHub 账号下公开仓库的所有者可以登录并验证所有权,自行管理介绍,无需管理员批准。
登录并生成验证文件,在 30 分钟内将其提交到此仓库的默认分支。其他分支或分叉仓库中的文件无效。然后在下方检查文件,即可无需管理员批准直接管理项目。请保留文件以维持管理权限。
如需登录,将前往登录页面。登录后请回到此处,再次点击所选的验证按钮。
在项目文件夹中运行 /nomorevibe verify,即可验证所有权并自行管理介绍。
一分钟完成验证制作者的介绍仅有上面的一句话。 更多详情请阅读仓库 README。 仓库 README ↗
正在加载完整 README。
查看完整 README ↗A director's whole box office career, in one page. Type a name to see their total worldwide gross, the domestic/international split, their biggest hits, every film's numbers and a gross-over-time chart. Read it as a web page or save it as a PDF. Data from IMDb, no API key needed.
https://github.com/user-attachments/assets/66c4b5af-6700-4060-b24a-40b216f3c60b
The welcome page. Enter a name or an IMDb id, pick a format and press Get the report.
Top half of the web report for Christopher Nolan. Full files: PDF · HTML
The same report as a PDF: a summary page with the top films, the full filmography and the career chart.
| Director | Films | HTML | |
|---|---|---|---|
| Christopher Nolan | 13 | christopher-nolan.pdf | christopher-nolan.html |
| Greta Gerwig | 4 | greta-gerwig.pdf | greta-gerwig.html |
| Steven Spielberg | 36 | steven-spielberg.pdf | steven-spielberg.html |
GitHub previews the PDFs in the browser, but it shows HTML files as source code. To see the page, download the file (Raw, then save) and open it in a browser. Images are embedded, so it works offline.
These were generated on 2026-10-17. The numbers change as IMDb updates its data.
Requires Python 3.10 or newer.
git clone <repo-url>
cd DirectorsBoxOfficeSummary
python -m venv .venv
source .venv/bin/activate # Windows: .venv\Scripts\activate
pip install -r requirements-dev.txt
uvicorn app:app --reload
Open http://127.0.0.1:8000. You don't need an account, key or .env file.
nm0634240, from the director's IMDb URL).
Case and accents don't matter. A clear match opens the report straight away ("nolan" finds
Christopher Nolan). If the name is ambiguous ("Paul Anderson"), you get a list of up to
five people to choose from./report/<nm id>.html and /report/<nm id>.pdf, so you can link to them directly.app.py and vercel.json are all it
needs). Keep such a deployment private: see the disclaimer below.The CLI writes the same reports to files. Only the runtime dependencies are needed
(pip install -r requirements.txt).
$ python main.py
Director's full name: Christopher Nolan
Found Christopher Nolan (nm0634240). Fetching filmography...
13 film(s).
Output format [pdf/html/both] (pdf): both
Building PDF...
Saved output/Christopher Nolan.pdf
Downloading 14 image(s)...
Saved output/Christopher Nolan.html
pdf, html or both. The first letter is enough, and a blank answer means
pdf.output/<Director Name>.pdf and .html. The folder is created on
first run. Unlike the web page, the CLI's HTML file embeds all images, so it works offline.Both formats contain:
A4 pages with a fixed layout. The chart always gets the last page to itself. With more than 15 films that page switches to landscape, and the x-axis labels rotate or wrap so that every title stays readable. Here is Spielberg's chart, with 36 films:
All CSS and JavaScript are inlined (the CLI also inlines the images, giving a single offline file).
The report includes released feature films that the person is credited as directing. Shorts, TV movies, direct-to-video titles and unreleased or abandoned projects are left out.
All amounts are in US dollars. A missing figure is shown as -:
-. For example, RRR's
budget is listed in Indian rupees.One run makes three requests to IMDb's GraphQL endpoint (caching.graphql.imdb.com): a
name search, the director's profile and their directing credits with box office data. For
the HTML page it also downloads the portrait and posters as small thumbnails. Dropped
connections, rate limits and server errors are retried with exponential backoff. If the API returns an error, the run stops
rather than producing a report with missing films.
main.py prompts, file output; wires the layers together
app.py the same pipeline as a web app (FastAPI)
src/
movies.py domain: API JSON -> Director / Movie, search ranking, totals, top films
imdb_api.py IMDb GraphQL queries
http_client.py HTTP with retries
pdf.py, chart.py PDF renderer (fpdf2) and matplotlib chart
html_page.py HTML renderer, with svg_chart.py and assets/ (CSS + JS)
images.py downloads the images for the HTML page as data URIs
search_page.py the web app's search page
tests/ offline tests for the HTML output and the web routes
examples/ the sample reports linked above
Everything under src/ is free of side effects, and all I/O happens in main.py and app.py.
pytest
The tests run offline and cover the HTML renderer (escaping, missing values, placeholders,
chart ordering, number formatting) and the web routes (redirects, candidate list, error
pages, PDF output). They need requirements-dev.txt.
This is a personal, non-commercial project and is not affiliated with IMDb. It uses IMDb's unofficial, undocumented GraphQL API. Every response includes IMDb's notice that "public, commercial, and/or non-private use" of the data is not allowed, and IMDb's Conditions of Use prohibit automated access. The endpoint can change or be blocked without warning. Posters and portraits belong to their respective owners.