CLI tool to remove the NotebookLM mark from the bottom-right corner of each PDF page and export screenshots plus a cleaned PDF.
Project description
pdf-notebooklm-cleaner
命令行工具:输入 PDF,输出两类结果:
- 每页完整截图 ZIP
- 去除右下角 NotebookLM 标识后的 clean PDF
适合这类场景:PDF 每页内容完整、边框要保留、右下角有 NotebookLM logo/文字,需要批量清理后导出整页截图。
安装
pip install pdf-notebooklm-cleaner
用法
pdf-notebooklm-cleaner input.pdf
指定输出目录:
pdf-notebooklm-cleaner input.pdf -o ./out
提高渲染清晰度:
pdf-notebooklm-cleaner input.pdf --dpi 300
输出结构
默认会在输入 PDF 同目录下生成:
<input_stem>_cleaned/
├── screenshots/
│ ├── page_01.png
│ ├── page_02.png
│ └── ...
├── <input_stem>_screenshots.zip
└── <input_stem>_clean.pdf
可调参数
--dpi:渲染分辨率--search-width-ratio:右下角检测区域宽度比例--search-height-ratio:右下角检测区域高度比例--dark-threshold:检测暗色像素阈值--bbox-pad-px:检测框外扩像素--edge-margin-px:保留右/下边框的安全边距
工作原理
- 用 PyMuPDF 将每页渲染为高分辨率 PNG
- 在右下角区域自动检测 NotebookLM logo/文字位置
- 以周边背景色覆盖该区域,尽量保留边框
- 重新打包为截图 ZIP 和 clean PDF
局限
这个版本针对右下角 NotebookLM 标识的常见模板效果较好。若页面设计差异较大,建议优先调整:
--search-width-ratio--search-height-ratio--bbox-pad-px--edge-margin-px
开发
python -m pip install -U build twine
python -m build
python -m twine check dist/*
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pdf_notebooklm_cleaner-0.1.0.tar.gz.
File metadata
- Download URL: pdf_notebooklm_cleaner-0.1.0.tar.gz
- Upload date:
- Size: 6.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5078af56661bfe1b8eb426ad360f16aa91d1bb7c3e2eb7c81c55707bebf187cd
|
|
| MD5 |
1d2173b0910ace0d9631128ee4b6416d
|
|
| BLAKE2b-256 |
c13a8b52c8f8b53289e083123918c40e587db6f4cd493cccb330cc7fa1454949
|
Provenance
The following attestation bundles were made for pdf_notebooklm_cleaner-0.1.0.tar.gz:
Publisher:
publish.yml on gptbert/pdf-notebooklm-cleaner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf_notebooklm_cleaner-0.1.0.tar.gz -
Subject digest:
5078af56661bfe1b8eb426ad360f16aa91d1bb7c3e2eb7c81c55707bebf187cd - Sigstore transparency entry: 1210392175
- Sigstore integration time:
-
Permalink:
gptbert/pdf-notebooklm-cleaner@16a4c72dc1c221494f585f275b388f26f4fef61e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gptbert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16a4c72dc1c221494f585f275b388f26f4fef61e -
Trigger Event:
release
-
Statement type:
File details
Details for the file pdf_notebooklm_cleaner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pdf_notebooklm_cleaner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
a233a44da2c39b051561712ffc0b981131718d177ec8db98edfda990886a67b5
|
|
| MD5 |
f0e2daa5f4d3e5ac7a745628c0cb28d2
|
|
| BLAKE2b-256 |
584fdb93d6185b9d0a88140162dcef1910d3aeda3f4caff38ee04b8f07f1cc92
|
Provenance
The following attestation bundles were made for pdf_notebooklm_cleaner-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on gptbert/pdf-notebooklm-cleaner
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pdf_notebooklm_cleaner-0.1.0-py3-none-any.whl -
Subject digest:
a233a44da2c39b051561712ffc0b981131718d177ec8db98edfda990886a67b5 - Sigstore transparency entry: 1210392201
- Sigstore integration time:
-
Permalink:
gptbert/pdf-notebooklm-cleaner@16a4c72dc1c221494f585f275b388f26f4fef61e -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/gptbert
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@16a4c72dc1c221494f585f275b388f26f4fef61e -
Trigger Event:
release
-
Statement type: