mirror of
https://github.com/Anon-Planet/thgtoa.git
synced 2026-05-07 03:54:18 +02:00
Compare commits
37 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0e8de6ccc0 | |||
| d0dfec95db | |||
| 783f02f404 | |||
| 6c8dba5d5f | |||
| ee32450516 | |||
| c7452ea796 | |||
| 3621967517 | |||
| 88896a4f15 | |||
| 14de26d77d | |||
| 3b430dc96a | |||
| 565f3b8516 | |||
| fd60ef8460 | |||
| fb5e1fca74 | |||
| 02764539f2 | |||
| 2e0b7a9716 | |||
| 239d1c632f | |||
| c76ccd3e43 | |||
| 37068765cc | |||
| 2c3dea5f41 | |||
| d623dda610 | |||
| 8e386addb8 | |||
| 7b3599df63 | |||
| ac870b1497 | |||
| 88cee5a3c0 | |||
| 56678b3567 | |||
| 3b1c5946ae | |||
| 6448e2b786 | |||
| 957da7e2af | |||
| 6c4fd4a5c0 | |||
| 2f5254a9fb | |||
| 23f2acb788 | |||
| 2bfa84de28 | |||
| 9b98497ed3 | |||
| d212e86012 | |||
| 621a6ae3d0 | |||
| 377e8ecad7 | |||
| 2c35d7ced8 |
@@ -1,10 +0,0 @@
|
|||||||
[tool.commitizen]
|
|
||||||
bump_message = "release $current_version → $new_version []"
|
|
||||||
annotated_tag = true
|
|
||||||
version = "1.2.1"
|
|
||||||
update_changelog_on_bump = false
|
|
||||||
gpg_sign = true
|
|
||||||
allow_abort = true
|
|
||||||
version_files = [
|
|
||||||
"_config.yml:version"
|
|
||||||
]
|
|
||||||
@@ -0,0 +1,56 @@
|
|||||||
|
name: 📖 Build PDF
|
||||||
|
|
||||||
|
on:
|
||||||
|
workflow_dispatch:
|
||||||
|
pull_request:
|
||||||
|
paths:
|
||||||
|
- "docs/**"
|
||||||
|
- "mkdocs.yml"
|
||||||
|
- "scripts/build_guide_pdf.py"
|
||||||
|
- ".github/workflows/build-pdf.yml"
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
paths:
|
||||||
|
- "docs/**"
|
||||||
|
- "mkdocs.yml"
|
||||||
|
- "scripts/build_guide_pdf.py"
|
||||||
|
- ".github/workflows/build-pdf.yml"
|
||||||
|
|
||||||
|
permissions:
|
||||||
|
contents: read
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
pdf:
|
||||||
|
name: MkDocs + print to PDF
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout
|
||||||
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
|
- name: Set up Python
|
||||||
|
uses: actions/setup-python@v6
|
||||||
|
with:
|
||||||
|
python-version: "3.12"
|
||||||
|
|
||||||
|
- name: Install MkDocs Material
|
||||||
|
run: pip install mkdocs-material
|
||||||
|
|
||||||
|
- name: Install Chromium
|
||||||
|
run: |
|
||||||
|
sudo apt-get update
|
||||||
|
sudo apt-get install -y --no-install-recommends chromium
|
||||||
|
|
||||||
|
- name: Build PDF
|
||||||
|
env:
|
||||||
|
CI: true
|
||||||
|
run: python scripts/build_guide_pdf.py
|
||||||
|
|
||||||
|
- name: Upload PDF artifact
|
||||||
|
uses: actions/upload-artifact@v7
|
||||||
|
with:
|
||||||
|
name: guide-pdf
|
||||||
|
path: export/guide.pdf
|
||||||
|
archive: false
|
||||||
|
if-no-files-found: error
|
||||||
|
retention-days: 90
|
||||||
@@ -1,4 +1,4 @@
|
|||||||
name: Publish docs via GitHub Pages
|
name: 🚀 Publish docs via GitHub Pages
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches:
|
branches:
|
||||||
|
|||||||
+14
-122
@@ -1,130 +1,22 @@
|
|||||||
# Byte-compiled / optimized / DLL files
|
# Visual Studio (Windows) solution metadata
|
||||||
|
.vs/
|
||||||
|
.vscode/
|
||||||
|
|
||||||
|
# Python (MkDocs, scripts/build_guide_pdf.py)
|
||||||
__pycache__/
|
__pycache__/
|
||||||
*.py[cod]
|
*.py[cod]
|
||||||
*$py.class
|
*$py.class
|
||||||
|
.venv/
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
.eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
wheels/
|
|
||||||
pip-wheel-metadata/
|
|
||||||
share/python-wheels/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
MANIFEST
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.nox/
|
|
||||||
.coverage
|
|
||||||
.coverage.*
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
*.cover
|
|
||||||
*.py,cover
|
|
||||||
.hypothesis/
|
|
||||||
.pytest_cache/
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Django stuff:
|
|
||||||
*.log
|
|
||||||
local_settings.py
|
|
||||||
db.sqlite3
|
|
||||||
db.sqlite3-journal
|
|
||||||
|
|
||||||
# Flask stuff:
|
|
||||||
instance/
|
|
||||||
.webassets-cache
|
|
||||||
|
|
||||||
# Scrapy stuff:
|
|
||||||
.scrapy
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
target/
|
|
||||||
|
|
||||||
# Jupyter Notebook
|
|
||||||
.ipynb_checkpoints
|
|
||||||
|
|
||||||
# IPython
|
|
||||||
profile_default/
|
|
||||||
ipython_config.py
|
|
||||||
|
|
||||||
# pyenv
|
|
||||||
.python-version
|
|
||||||
|
|
||||||
# pipenv
|
|
||||||
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
|
||||||
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
|
||||||
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
|
||||||
# install all needed dependencies.
|
|
||||||
#Pipfile.lock
|
|
||||||
|
|
||||||
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
|
|
||||||
__pypackages__/
|
|
||||||
|
|
||||||
# Celery stuff
|
|
||||||
celerybeat-schedule
|
|
||||||
celerybeat.pid
|
|
||||||
|
|
||||||
# SageMath parsed files
|
|
||||||
*.sage.py
|
|
||||||
|
|
||||||
# Environments
|
|
||||||
.env
|
|
||||||
.venv
|
|
||||||
env/
|
|
||||||
venv/
|
venv/
|
||||||
|
env/
|
||||||
ENV/
|
ENV/
|
||||||
env.bak/
|
.env
|
||||||
venv.bak/
|
|
||||||
|
|
||||||
# Spyder project settings
|
# Cache
|
||||||
.spyderproject
|
.cache/
|
||||||
.spyproject
|
|
||||||
|
|
||||||
# Rope project settings
|
# MkDocs build output and local PDF export
|
||||||
.ropeproject
|
site/
|
||||||
|
|
||||||
# mkdocs documentation
|
|
||||||
/site
|
|
||||||
_site/
|
_site/
|
||||||
|
_site_test/
|
||||||
# mypy
|
export/
|
||||||
.mypy_cache/
|
|
||||||
.dmypy.json
|
|
||||||
dmypy.json
|
|
||||||
|
|
||||||
# Pyre type checker
|
|
||||||
.pyre/
|
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ default_install_hook_types: [pre-commit, commit-msg]
|
|||||||
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/pre-commit/pre-commit-hooks
|
- repo: https://github.com/pre-commit/pre-commit-hooks
|
||||||
rev: v4.6.0
|
rev: v5.0.0
|
||||||
hooks:
|
hooks:
|
||||||
- id: check-added-large-files
|
- id: check-added-large-files
|
||||||
- id: check-merge-conflict
|
- id: check-merge-conflict
|
||||||
@@ -21,7 +21,3 @@ repos:
|
|||||||
hooks:
|
hooks:
|
||||||
- id: markdownlint
|
- id: markdownlint
|
||||||
- id: markdownlint-fix
|
- id: markdownlint-fix
|
||||||
- hooks:
|
|
||||||
- id: commitizen
|
|
||||||
repo: https://github.com/commitizen-tools/commitizen
|
|
||||||
rev: v3.28.0
|
|
||||||
|
|||||||
@@ -0,0 +1,33 @@
|
|||||||
|
# Changelog
|
||||||
|
|
||||||
|
All notable changes to this project will be documented in this file.
|
||||||
|
|
||||||
|
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
|
||||||
|
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
|
||||||
|
|
||||||
|
## [Unreleased]
|
||||||
|
|
||||||
|
## [1.2.1] - 2026-04-11
|
||||||
|
|
||||||
|
### Added
|
||||||
|
|
||||||
|
- GitHub Actions workflow **Build guide PDF** (`.github/workflows/build-pdf.yml`): installs Chromium on `ubuntu-latest`, runs `scripts/build_guide_pdf.py`, uploads `export/guide.pdf` as the `guide-pdf` artifact. Runs on `workflow_dispatch`, on pushes to `main` that touch docs or build inputs, and on matching pull requests.
|
||||||
|
|
||||||
|
- `scripts/build_guide_pdf.py` to build the MkDocs site and render the guide to a single PDF (`export/guide.pdf` by default) using a Chromium-based browser (Chrome or Edge) headless print-to-PDF.
|
||||||
|
- `docs/stylesheets/extra.css` and `extra_css` in `mkdocs.yml` for shared site styling.
|
||||||
|
- This `CHANGELOG.md`.
|
||||||
|
|
||||||
|
### Changed
|
||||||
|
|
||||||
|
- `README.md` “Ways to read or export the guide”: hosted link, local `mkdocs serve`, PDF build via the script, ODT note, raw Markdown link.
|
||||||
|
- Guide landing layout: wrap the opening block in `docs/guide/index.md` with a `guide-intro-lead` container so the logo and first sections share one layout context for web and print.
|
||||||
|
- `.gitignore` to exclude local build outputs `export/`, `site/`, and `_site_test/`.
|
||||||
|
- `scripts/build_guide_pdf.py`: when the `CI` environment variable is set, pass Chromium flags (`--no-sandbox`, `--disable-setuid-sandbox`, `--disable-dev-shm-usage`) so headless print works on typical CI images.
|
||||||
|
- `README.md`: note the **Build guide PDF** GitHub Actions workflow and the `guide-pdf` artifact.
|
||||||
|
|
||||||
|
### Fixed
|
||||||
|
|
||||||
|
- `docs/guide/index.md`: replace broken reference-style internal links (`[label][label:]`) with working same-page fragment links to the correct headings; correct the mismatched “Real-Name System” cross-reference; fix a broken footnote marker on the “free (unallocated) space of your hard drive” list item.
|
||||||
|
|
||||||
|
[Unreleased]: https://github.com/Anon-Planet/thgtoa/compare/v1.2.1...HEAD
|
||||||
|
[1.2.1]: https://github.com/Anon-Planet/thgtoa/releases/tag/v1.2.1
|
||||||
@@ -2,47 +2,37 @@ Welcome.
|
|||||||
|
|
||||||
**[IMPORTANT RECOMMENDATION FOR UKRAINIANS. ВАЖЛИВА РЕКОМЕНДАЦІЯ ДЛЯ УКРАЇНЦІВ](briar.html)**
|
**[IMPORTANT RECOMMENDATION FOR UKRAINIANS. ВАЖЛИВА РЕКОМЕНДАЦІЯ ДЛЯ УКРАЇНЦІВ](briar.html)**
|
||||||
|
|
||||||
This is a maintained guide with the aim of providing an introduction to various online tracking techniques, online ID verification techniques, and detailed guidance to creating and maintaining (truly) anonymous online identities. <span style="color: red">**It is written with hope for activists, journalists, scientists, lawyers, whistle-blowers, and good people being oppressed, censored, harassed anywhere!**</span> This guide has no affiliation with the [Anonymous](https://en.wikipedia.org/wiki/Anonymous_(hacker_group)) <sup>[[Wikiless]](https://wikiless.org/wiki/Anonymous_(hacker_group))</sup> <sup>[[Archive.org]](https://web.archive.org/web/https://en.wikipedia.org/wiki/Anonymous_(hacker_group))</sup> collective/movement.
|
This is a maintained guide with the aim of providing an introduction to various online tracking techniques, online ID verification techniques, and detailed guidance to creating and maintaining (truly) anonymous online identities. <span style="color: red">**It is written with hope for activists, journalists, scientists, lawyers, whistle-blowers, and good people being oppressed, censored, harassed anywhere!**</span> This guide has no affiliation with the [Anonymous](https://en.wikipedia.org/wiki/Anonymous_(hacker_group)) <sup>[[Wikiless]](https://wikiless.com/wiki/Anonymous_(hacker_group))</sup> <sup>[[Archive.org]](https://web.archive.org/web/https://en.wikipedia.org/wiki/Anonymous_(hacker_group))</sup> collective/movement.
|
||||||
|
|
||||||
This guide is an open-source non-profit initiative, [licensed](LICENSE.html) under **Creative Commons Attribution-NonCommercial 4.0 International** ([cc-by-nc-4.0](https://creativecommons.org/licenses/by-nc/4.0/) <sup>[[Archive.org]](https://web.archive.org/web/https://creativecommons.org/licenses/by-nc/4.0/)</sup>) and is **not sponsored/endorsed by any commercial/governmental entity**. This means that you are free to use our guide for pretty much any purpose **excluding commercially** as long as you do attribute it. There are no ads or any affiliate links.
|
This guide is an open-source non-profit initiative, [licensed](LICENSE.html) under **Creative Commons Attribution-NonCommercial 4.0 International** ([cc-by-nc-4.0](https://creativecommons.org/licenses/by-nc/4.0/) <sup>[[Archive.org]](https://web.archive.org/web/https://creativecommons.org/licenses/by-nc/4.0/)</sup>) and is **not sponsored/endorsed by any commercial/governmental entity**. This means that you are free to use our guide for pretty much any purpose **excluding commercially** as long as you do attribute it. There are no ads or any affiliate links.
|
||||||
|
|
||||||
**If you would like to make a donation to help this project, you can do so from [here](donations.html) where you will also find the project goals. All the donations will be strictly used within the context of this project. All donations and spendings are logged on the donations page.**
|
**If you would like to make a donation to help this project, you can do so from [here](donations.html) where you will also find the project goals. All the donations will be strictly used within the context of this project. All donations and spendings are logged on the donations page.**
|
||||||
|
|
||||||
**View the guide:**
|
**Ways to read or export the guide**
|
||||||
- [In your browser](guide.html)
|
|
||||||
- [PDF](export/guide.pdf)
|
|
||||||
- [OpenDocument (ODT)](export/guide.odt)
|
|
||||||
- Raw [Markdown](https://raw.githubusercontent.com/Anon-Planet/thgtoa/main/guide.md).
|
|
||||||
|
|
||||||
Mirrors:
|
- **In your browser:** [Hitchhiker's Guide](https://www.anonymousplanet.org/guide/) (hosted site). After a local build you can also open `site/guide/index.html` directly.
|
||||||
- Tor Onion Mirror: <http://thgtoa3jzy3doku7hkna32htpghjijefscwvh4dyjgfydbbjkeiohgid.onion/>
|
- **Local HTML preview:** from the repository root, with Python 3 and [MkDocs Material](https://squidfunk.github.io/mkdocs-material/getting-started/) installed (`pip install mkdocs-material`), run `mkdocs serve` and open the URL printed in the terminal (for example `http://127.0.0.1:8000`).
|
||||||
|
- **PDF (local build):** from the repository root, using the same environment, run:
|
||||||
|
|
||||||
The guide and all the files are also readily available on Archive.org and Archive.today:
|
```bash
|
||||||
|
python scripts/build_guide_pdf.py
|
||||||
|
```
|
||||||
|
|
||||||
- Archive.org: <https://web.archive.org/web/https://anonymousplanet.org/>
|
This runs `mkdocs build` (output defaults to `./site`), then uses **Google Chrome** or **Microsoft Edge** in headless mode to print `site/guide/index.html` to **`export/guide.pdf`** (images and styling preserved). If the site is already built: `python scripts/build_guide_pdf.py --skip-mkdocs`. Other options: `--site-dir`, `--pdf`, and `python scripts/build_guide_pdf.py --help`.
|
||||||
- Archive.today: <https://archive.ph/anonymousplanet.org/>
|
|
||||||
- Archive.today over Tor: <http://archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion/anonymousplanet.org/>
|
|
||||||
|
|
||||||
If you want to access/see the original/legacy project, please see the [legacy resources](legacy.html) page.
|
On **GitHub Actions**, the [Build guide PDF](https://github.com/Anon-Planet/thgtoa/actions/workflows/build-pdf.yml) workflow does the same using Chromium on Ubuntu when you push to `main` or open a pull request that touches the guide or build inputs; download the **`guide-pdf`** artifact from a successful run. You can also run it manually (**Actions** → **Build guide PDF** → **Run workflow**).
|
||||||
|
- **OpenDocument (ODT):** not produced by this repository (previous hosted export removed).
|
||||||
|
- **Raw Markdown (very large):** [docs/guide/index.md on GitHub](https://raw.githubusercontent.com/Anon-Planet/thgtoa/refs/heads/main/docs/guide/index.md)
|
||||||
|
|
||||||
If you want to see the changes between your PDF and the latest PDF, you could use one of these tools (we do not endorse those):
|
**Mirrors:**
|
||||||
|
- <del>Hidden service: <http://thgtoa3jzy3doku7hkna32htpghjijefscwvh4dyjgfydbbjkeiohgid.onion/></del> **Host down**
|
||||||
- <https://tools.pdf24.org/en/compare-pdf>
|
|
||||||
- <https://products.aspose.app/pdf/comparison>
|
|
||||||
- <https://draftable.com/compare>
|
|
||||||
|
|
||||||
If you want to compare an older ODT file with a newer one, use the LibreWriter compare features as explained here: <https://help.libreoffice.org/7.1/en-US/text/shared/guide/redlining_doccompare.html> <sup>[[Archive.org]](https://web.archive.org/wen/https://help.libreoffice.org/7.1/en-US/text/shared/guide/redlining_doccompare.html)</sup>)
|
|
||||||
|
|
||||||
**If you want to check the files for integrity, safety, authenticity, please refer to this ["How To"](verify.html).**
|
|
||||||
|
|
||||||
Feel free to submit issues using Github Issues with the repository link above. Criticism, opinions, and ideas are welcome!
|
Feel free to submit issues using Github Issues with the repository link above. Criticism, opinions, and ideas are welcome!
|
||||||
|
|
||||||
Follow or contact us on:
|
**Follow or contact us on:**
|
||||||
|
|
||||||
Discussion Channels:
|
Discussion Channels:
|
||||||
- Matrix room: `#anonymity:matrix.org` <https://matrix.to/#/#anonymity:matrix.org>
|
- Matrix room: <https://matrix.to/#/#anonymity:anonymousplanet.net>
|
||||||
- Matrix space: `#privacy-security-anonymity:matrix.org` <https://matrix.to/#/#privacy-security-anonymity:matrix.org>
|
- Matrix space: <https://matrix.to/#/#psa:anonymousplanet.net>
|
||||||
- Twitter at https://twitter.com/AnonyPla
|
|
||||||
- Mastodon at https://mastodon.social/@anonymousplanet
|
|
||||||
|
|
||||||
Have a good read and feel free to share and/or recommend it!
|
Have a good read and feel free to share and/or recommend it!
|
||||||
|
|||||||
+8
-7
@@ -35,7 +35,7 @@ This guide is a non-profit open-source initiative, licensed under Creative Commo
|
|||||||
|
|
||||||
- For mirrors see [Mirrors](../mirrors/index.md) and the links at the bottom right of the page. You should see these on every page.
|
- For mirrors see [Mirrors](../mirrors/index.md) and the links at the bottom right of the page. You should see these on every page.
|
||||||
|
|
||||||
- For help in comparing versions see [Comparing versions](../guide/index.md#appendix-a7-comparing-versions)
|
- For help in comparing versions see [Comparing versions](../guide/index.md#appendix-a6-comparing-versions)
|
||||||
|
|
||||||
Feel free to submit issues **(please do report anything wrong)** using GitHub Issues at: <https://github.com/Anon-Planet/thgtoa/issues>. We also accept Merge Requests (MR) from our Gitlab and many other places. Do not hesitate to report issues and suggestions!
|
Feel free to submit issues **(please do report anything wrong)** using GitHub Issues at: <https://github.com/Anon-Planet/thgtoa/issues>. We also accept Merge Requests (MR) from our Gitlab and many other places. Do not hesitate to report issues and suggestions!
|
||||||
|
|
||||||
@@ -43,9 +43,10 @@ Feel free to submit issues **(please do report anything wrong)** using GitHub Is
|
|||||||
|
|
||||||
We offer a Matrix.org hosted space of our own. Check it out!
|
We offer a Matrix.org hosted space of our own. Check it out!
|
||||||
|
|
||||||
- Read [the rules](https://anonymousplanet.org/chatrooms-rules.html), please
|
- Read [the rules](https://psa.anonymousplanet.org/), please
|
||||||
- Matrix Room: [#anonymity:matrix.org](https://matrix.to/#/#anonymity:matrix.org)
|
- Matrix Room: https://matrix.to/#/#nth:anonymousplanet.net
|
||||||
- Matrix Space: [#privacy-security-anonymity:matrix.org](https://matrix.to/#/#privacy-security-anonymity:matrix.org)
|
- Matrix Space: https://matrix.to/#/#psa:anonymousplanet.net
|
||||||
|
- Admins: @daskolburn:thomcat.rocks and @thehidden:tchncs.de
|
||||||
|
|
||||||
Follow us on:
|
Follow us on:
|
||||||
|
|
||||||
@@ -94,9 +95,9 @@ _Anonymous Planet_ **does not** participate in any sponsoring, endorsement, adve
|
|||||||
??? Note "Useful resources"
|
??? Note "Useful resources"
|
||||||
|
|
||||||
- KYC? Not me: <https://kycnot.me/>
|
- KYC? Not me: <https://kycnot.me/>
|
||||||
- Library Genesis: <https://en.wikipedia.org/wiki/Library_Genesis> <sup>[[Wikiless]](https://wikiless.org/wiki/Library_Genesis)</sup> (see their latest known URL in the Wikipedia article)
|
- Library Genesis: <https://en.wikipedia.org/wiki/Library_Genesis> <sup>[[Wikiless]](https://wikiless.com/wiki/Library_Genesis)</sup> (see their latest known URL in the Wikipedia article)
|
||||||
- Real World Onion Sites: <https://github.com/alecmuffett/real-world-onion-sites>
|
- Real World Onion Sites: <https://github.com/alecmuffett/real-world-onion-sites>
|
||||||
- Sci-Hub <https://en.wikipedia.org/wiki/Sci-Hub> <sup>[[Wikiless]](https://wikiless.org/wiki/Sci-Hub)</sup> (see their latest known URL in the main Wikipedia article)
|
- Sci-Hub <https://en.wikipedia.org/wiki/Sci-Hub> <sup>[[Wikiless]](https://wikiless.com/wiki/Sci-Hub)</sup> (see their latest known URL in the main Wikipedia article)
|
||||||
- Terms of Service, Didn't Read: <https://tosdr.org>
|
- Terms of Service, Didn't Read: <https://tosdr.org>
|
||||||
- Whonix Documentation: <https://www.whonix.org/wiki/Documentation>
|
- Whonix Documentation: <https://www.whonix.org/wiki/Documentation>
|
||||||
|
|
||||||
@@ -104,7 +105,7 @@ _Anonymous Planet_ **does not** participate in any sponsoring, endorsement, adve
|
|||||||
|
|
||||||
One or two of our community members uses or has used the resources of Riseup. We are not affiliated with Riseup in any manner.
|
One or two of our community members uses or has used the resources of Riseup. We are not affiliated with Riseup in any manner.
|
||||||
|
|
||||||
We also hold **no affiliation** with the [Anonymous](https://en.wikipedia.org/wiki/Anonymous_(hacker_group)) <sup>[[Wikiless]](https://wikiless.org/wiki/Anonymous_(hacker_group))</sup> <sup>[[Archive.org]](https://web.archive.org/web/https://en.wikipedia.org/wiki/Anonymous_(hacker_group))</sup> hacker collective.
|
We also hold **no affiliation** with the [Anonymous](https://en.wikipedia.org/wiki/Anonymous_(hacker_group)) <sup>[[Wikiless]](https://wikiless.com/wiki/Anonymous_(hacker_group))</sup> <sup>[[Archive.org]](https://web.archive.org/web/https://en.wikipedia.org/wiki/Anonymous_(hacker_group))</sup> hacker collective.
|
||||||
|
|
||||||
## License
|
## License
|
||||||
|
|
||||||
|
|||||||
+403
-398
File diff suppressed because it is too large
Load Diff
+3
-4
@@ -19,13 +19,13 @@ schema:
|
|||||||
|
|
||||||
Please share this project if you enjoy it and you think it might be useful to others.
|
Please share this project if you enjoy it and you think it might be useful to others.
|
||||||
|
|
||||||
Anonymous Planet is a collective of volunteers and contributors. No one person is considered more valuable than another, and no one person should be viewed as having "more impact" on Anonymous Planet. We have moved away from Matrix. Please avoid it as it contains harmful (illegal) spam. We are not moderating the rooms in PSA at present. It is likely that we will see a complete move away from Matrix in the future.
|
Anonymous Planet is a collective of volunteers and contributors. No one person is considered more valuable than another, and no one person should be viewed as having "more impact" on Anonymous Planet.
|
||||||
|
|
||||||
??? person "Das Kolburn"
|
??? person "Das Kolburn"
|
||||||
|
|
||||||
- [:simple-github: GitHub](https://github.com/NobodySpecial256 "@NobodySpecial256")
|
- [:simple-github: GitHub](https://github.com/NobodySpecial256 "@NobodySpecial256")
|
||||||
- [:fontawesome-solid-envelope: E-mail](mailto:contact@anonymousplanet.org)
|
- [:fontawesome-solid-envelope: E-mail](mailto:contact@anonymousplanet.org)
|
||||||
- [:simple-matrix: Matrix](https://matrix.to/#/@memorysafetybelike:envs.net)
|
- [:simple-matrix: Personal Matrix](https://matrix.to/#/@daskolburn:thomcat.rocks "@daskolburn:thomcat.rocks"), [:simple-matrix: Org Matrix](https://matrix.to/#/@daskolburn:anonymousplanet.net "@daskolburn:anonymousplanet.net")
|
||||||
|
|
||||||
??? person "Nope"
|
??? person "Nope"
|
||||||
|
|
||||||
@@ -33,5 +33,4 @@ Anonymous Planet is a collective of volunteers and contributors. No one person i
|
|||||||
- [:simple-mastodon: Mastodon](https://ioc.exchange/@unknown "@unknown@ioc.exchange"){rel=me}
|
- [:simple-mastodon: Mastodon](https://ioc.exchange/@unknown "@unknown@ioc.exchange"){rel=me}
|
||||||
- [:fontawesome-solid-house: Homepage](https://www.itsnothing.net)
|
- [:fontawesome-solid-house: Homepage](https://www.itsnothing.net)
|
||||||
- [:fontawesome-solid-envelope: E-mail](mailto:contact@anonymousplanet.org)
|
- [:fontawesome-solid-envelope: E-mail](mailto:contact@anonymousplanet.org)
|
||||||
- [:simple-matrix: Matrix](https://matrix.to/#/@thehidden:tchncs.de)
|
- [:simple-matrix: Personal Matrix](https://matrix.to/#/@thehidden:tchncs.de "@thehidden:tchncs.de"), [:simple-matrix: Org Matrix](https://matrix.to/#/@nope:anonymousplanet.net "@nope:anonymousplanet.net")
|
||||||
- [:fontawesome-solid-shield: Canary](https://itsnothing.net/canary.txt)
|
|
||||||
|
|||||||
@@ -20,12 +20,16 @@ schema:
|
|||||||
!!! Note "Where to find the Hitchhiker's Guide"
|
!!! Note "Where to find the Hitchhiker's Guide"
|
||||||
|
|
||||||
- [Original](https://anonymousplanet.org)
|
- [Original](https://anonymousplanet.org)
|
||||||
<!-- - (offline) [Tor Onion Mirror](http://thgtoa27ujspeqxasrfvcf5aozqdczvgmwgorrmblh6jn4nino3spcqd.onion) -->
|
- [Tor v3](http://thgtoa3jzy3doku7hkna32htpghjijefscwvh4dyjgfydbbjkeiohgid.onion) **Down**
|
||||||
- [Archive.org](https://web.archive.org/web/https://anonymousplanet.org)
|
- [Archive.org](https://web.archive.org/web/https://anonymousplanet.org)
|
||||||
- [Archive.today](https://archive.fo/anonymousplanet.org)
|
- [Archive.today](https://archive.fo/anonymousplanet.org)
|
||||||
- [Archive.today over Tor](http://archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion/anonymousplanet.org)
|
- [Archive.today over Tor](http://archiveiya74codqgiixo33q62qlrqtkgmcitqx5u2oeqnmn5bpcbiyd.onion/anonymousplanet.org)
|
||||||
<!-- - (n/a) [PDF](https://anonymousplanet.org/export/guide.pdf) <sup>[[Archive.org]](https://web.archive.org/web/https://anonymousplanet.org/export/guide.pdf)</sup> <sup>[[Tor Mirror]](http://thgtoa27ujspeqxasrfvcf5aozqdczvgmwgorrmblh6jn4nino3spcqd.onion/export/guide.pdf)</sup> -->
|
|
||||||
<!-- - (n/a) [ODT](https://anonymousplanet.org/export/guide.odt) <sup>[[Archive.org]](https://web.archive.org/web/https://anonymousplanet.org/export/guide.odt)</sup> <sup>[[Tor Mirror]](http://thgtoa27ujspeqxasrfvcf5aozqdczvgmwgorrmblh6jn4nino3spcqd.onion/export/guide.odt)</sup> -->
|
!!! Note "PDF export (single file)"
|
||||||
|
|
||||||
|
The guide is also available as a **PDF** (images and layout preserved). It is built automatically in GitHub Actions: open [**Build guide PDF**](https://github.com/Anon-Planet/thgtoa/actions/workflows/build-pdf.yml) on the [**thgtoa** source repository](https://github.com/Anon-Planet/thgtoa), pick a successful run, and download the **`guide-pdf`** artifact. You can start a fresh build anytime (**Actions** → **Build guide PDF** → **Run workflow**).
|
||||||
|
|
||||||
|
To produce the same file locally, clone the repository and run `python scripts/build_guide_pdf.py` (Python, [MkDocs Material](https://squidfunk.github.io/mkdocs-material/getting-started/), and **Google Chrome** or **Microsoft Edge** required). More detail is in the [repository README](https://github.com/Anon-Planet/thgtoa#ways-to-read-or-export-the-guide).
|
||||||
|
|
||||||
!!! Note "Our official git mirrors"
|
!!! Note "Our official git mirrors"
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,55 @@
|
|||||||
|
/* Title sheet: visible only when printing / generating PDF (not on screen). */
|
||||||
|
.pdf-title-page {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.pdf-title-page {
|
||||||
|
display: block;
|
||||||
|
box-sizing: border-box;
|
||||||
|
text-align: center;
|
||||||
|
padding: 5rem 2rem 4rem;
|
||||||
|
page-break-after: always;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-title-page__title {
|
||||||
|
font-size: 1.65rem;
|
||||||
|
font-weight: 700;
|
||||||
|
line-height: 1.25;
|
||||||
|
margin: 0 0 1.25rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-title-page__subtitle {
|
||||||
|
font-size: 1.05rem;
|
||||||
|
line-height: 1.4;
|
||||||
|
margin: 0 0 2rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
.pdf-title-page__meta {
|
||||||
|
font-size: 0.95rem;
|
||||||
|
font-style: normal;
|
||||||
|
margin: 0;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Guide landing: small floating logo so opening copy flows beside it (HTML + PDF). */
|
||||||
|
.guide-intro-lead {
|
||||||
|
overflow: auto;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guide-intro-lead > p:first-child {
|
||||||
|
margin-top: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.guide-intro-lead > p:first-child img {
|
||||||
|
float: right;
|
||||||
|
max-width: 6.5rem;
|
||||||
|
height: auto;
|
||||||
|
margin: 0 0 0.5rem 1rem;
|
||||||
|
}
|
||||||
|
|
||||||
|
@media print {
|
||||||
|
.guide-intro-lead > p:first-child img {
|
||||||
|
max-width: 5rem;
|
||||||
|
}
|
||||||
|
}
|
||||||
+5
-5
@@ -52,14 +52,14 @@ plugins:
|
|||||||
# - git-authors: {}
|
# - git-authors: {}
|
||||||
# - git-latest-release: {}
|
# - git-latest-release: {}
|
||||||
|
|
||||||
|
extra_css:
|
||||||
|
- stylesheets/extra.css
|
||||||
|
|
||||||
extra:
|
extra:
|
||||||
social:
|
social:
|
||||||
- icon: simple/mastodon
|
- icon: simple/mastodon
|
||||||
link: https://mastodon.social/@anonymousplanet
|
link: https://mastodon.social/@anonymousplanet
|
||||||
name: Mastodon
|
name: Mastodon
|
||||||
# - icon: simple/matrix
|
|
||||||
# link: https://matrix.to/#/#p-s-a:matrix.org
|
|
||||||
# name: Matrix Space
|
|
||||||
- icon: simple/gitlab
|
- icon: simple/gitlab
|
||||||
link: http://wmj5kiic7b6kjplpbvwadnht2nh2qnkbnqtcv3dyvpqtz7ssbssftxid.onion/
|
link: http://wmj5kiic7b6kjplpbvwadnht2nh2qnkbnqtcv3dyvpqtz7ssbssftxid.onion/
|
||||||
name: "0xacab"
|
name: "0xacab"
|
||||||
@@ -76,7 +76,7 @@ extra:
|
|||||||
link: https://codeberg.org/anonymousplanet
|
link: https://codeberg.org/anonymousplanet
|
||||||
name: Codeberg
|
name: Codeberg
|
||||||
# - icon: simple/torbrowser
|
# - icon: simple/torbrowser
|
||||||
# link: TODO
|
# link: http://thgtoa3jzy3doku7hkna32htpghjijefscwvh4dyjgfydbbjkeiohgid.onion/
|
||||||
# name: Hidden service
|
# name: Hidden service
|
||||||
|
|
||||||
markdown_extensions:
|
markdown_extensions:
|
||||||
@@ -98,7 +98,7 @@ markdown_extensions:
|
|||||||
custom_fences:
|
custom_fences:
|
||||||
- name: mermaid
|
- name: mermaid
|
||||||
class: mermaid
|
class: mermaid
|
||||||
format: materialx.superfences.fence_code_format
|
format: !!python/name:pymdownx.superfences.fence_code_format
|
||||||
- pymdownx.tabbed:
|
- pymdownx.tabbed:
|
||||||
alternate_style: true
|
alternate_style: true
|
||||||
|
|
||||||
|
|||||||
+13
-3
@@ -1,13 +1,23 @@
|
|||||||
# Import
|
# Import
|
||||||
|
|
||||||
```
|
```bash
|
||||||
$ gpg --import pgp/core-devs/*
|
$ gpg --import pgp/core-devs/*
|
||||||
```
|
```
|
||||||
|
|
||||||
# Verify
|
# Verify
|
||||||
|
|
||||||
TODO
|
```bash
|
||||||
|
$ gpg --verify pgp/core-devs/than/than-crypto.txt
|
||||||
|
|
||||||
### All signing keys are signed by the Master Signing Key
|
|
||||||
|
gpg: Signature made Sat 19 Jul 2025 02:04:10 AM EDT
|
||||||
|
gpg: using EDDSA key 8B3A74890536BAD50D9376EBF1CB32F67E3302A1
|
||||||
|
gpg: Good signature from "nopenothinghere@proton.me <nopenothinghere@proton.me>" [ultimate]
|
||||||
|
gpg: aka "Nope Nothing (Anonymous Planet Contact) <no@anonymousplanet.org>" [ultimate]
|
||||||
|
gpg: aka "Nope Nothing (Systems Administrator) <admin@itsnothing.net>" [ultimate]
|
||||||
|
Primary key fingerprint: 8B3A 7489 0536 BAD5 0D93 76EB F1CB 32F6 7E33 02A1
|
||||||
|
```
|
||||||
|
|
||||||
|
## All signing keys are signed by the Master Signing Key
|
||||||
|
|
||||||
TODO
|
TODO
|
||||||
|
|||||||
@@ -1,80 +0,0 @@
|
|||||||
-----BEGIN PGP SIGNED MESSAGE-----
|
|
||||||
Hash: SHA512
|
|
||||||
|
|
||||||
Tue Jul 25 14:51:36 EDT 2023
|
|
||||||
|
|
||||||
I am the admin of itsnothing.net (@Unknown@ioc.exchange) and co-admin of THGTOA.
|
|
||||||
I will update this canary within 1 month.
|
|
||||||
|
|
||||||
Latest bitcoin block hash:
|
|
||||||
00000000000000000000d9330bf8a03ce70cbe5542bddd16558693a43ea32fd3
|
|
||||||
|
|
||||||
I am in complete control of all my key material.
|
|
||||||
|
|
||||||
All previous keys have been revoked as part of standard OPSEC key rotation procedures.
|
|
||||||
Do not encrypt communications to my old keys, I will not read them.
|
|
||||||
|
|
||||||
The key currently published on my website https://itsnothing.net/pgp.txt with a fingerprint
|
|
||||||
of C87D87466FD205945CF10A3821AB6B6A6CB2C337, is my only PGP key for public communication.
|
|
||||||
|
|
||||||
Permanent record of old and new PGP keys:
|
|
||||||
|
|
||||||
the old key was:
|
|
||||||
|
|
||||||
pub rsa4096/0xB208C4084A2C582D 2022-11-04 [SC] [expires: 2027-11-03]
|
|
||||||
Key fingerprint = D793 9998 F78B ADB5 18C1 B600 B208 C408 4A2C 582D
|
|
||||||
uid [ultimate] Nope <no@anonymousplanet.org>
|
|
||||||
|
|
||||||
And the new key is:
|
|
||||||
|
|
||||||
pub ed25519/0x21AB6B6A6CB2C337 2023-07-14 [SC]
|
|
||||||
Key fingerprint = C87D 8746 6FD2 0594 5CF1 0A38 21AB 6B6A 6CB2 C337
|
|
||||||
uid [ultimate] nopenothinghere@proton.me <nopenothinghere@proton.me>
|
|
||||||
|
|
||||||
To fetch the full key, you can simply do:
|
|
||||||
|
|
||||||
gpg --keyserver keys.openpgp.org --recv-key 0x21AB6B6A6CB2C337
|
|
||||||
|
|
||||||
**
|
|
||||||
Note: this keyserver is experimental.[0] I still have yet to add this key to
|
|
||||||
the I2P keyserver pool, and I don't know if I will. If you have previously
|
|
||||||
signed my key but did a local-only signature (lsign), you will not want to
|
|
||||||
issue the following, instead you will want to use --lsign-key, and not send
|
|
||||||
the signatures to the keyserver.
|
|
||||||
**
|
|
||||||
|
|
||||||
gpg --sign-key 0x21AB6B6A6CB2C337
|
|
||||||
|
|
||||||
I'd like to receive your signatures on my key. You can either send me an e-mail
|
|
||||||
with the new signatures (if you have a functional MTA on your system):
|
|
||||||
|
|
||||||
gpg --export 0x21AB6B6A6CB2C337 | gpg --encrypt -r 0x21AB6B6A6CB2C337 --armor \
|
|
||||||
| mail -s 'OpenPGP Signatures' <nopenothinghere@proton.me>
|
|
||||||
|
|
||||||
Additionally, I highly recommend that you implement a mechanism to keep your key
|
|
||||||
material up-to-date so that you obtain the latest revocations, and other updates
|
|
||||||
in a timely manner. You can do regular key updates by using parcimonie[1] to
|
|
||||||
refresh your keyring. Parcimonie is a daemon that slowly refreshes your keyring
|
|
||||||
from a keyserver over Tor. It uses a randomized sleep, and fresh tor circuits
|
|
||||||
for each key. The purpose is to make it hard for an attacker to correlate the
|
|
||||||
key updates with your keyring.
|
|
||||||
|
|
||||||
I also highly recommend checking out the excellent Riseup GPG best practices
|
|
||||||
doc, from which I stole most of the text for this transition message ;-)
|
|
||||||
|
|
||||||
https://we.riseup.net/riseuplabs+paow/openpgp-best-practices
|
|
||||||
|
|
||||||
Please let me know if you have any questions, or problems, and sorry for the
|
|
||||||
inconvenience.
|
|
||||||
|
|
||||||
Nope (Anonymous Planet) <no@anonymousplanet.org>
|
|
||||||
|
|
||||||
0. https://gist.github.com/rjhansen/67ab921ffb4084c865b3618d6955275f
|
|
||||||
1. https://directory.fsf.org/wiki/Parcimonie
|
|
||||||
-----BEGIN PGP SIGNATURE-----
|
|
||||||
|
|
||||||
iHUEARYKAB0WIQTIfYdGb9IFlFzxCjghq2tqbLLDNwUCZMAZwAAKCRAhq2tqbLLD
|
|
||||||
N3l3AQC28SZK5HHU1o7K36ifOd/OKj97urrMZF+NUkaRmAwQxgEAlIa2y9g0JoQW
|
|
||||||
epEpViXFDwyWIUfNhVaJwUWjn/DLoAI=
|
|
||||||
=A72C
|
|
||||||
-----END PGP SIGNATURE-----
|
|
||||||
@@ -0,0 +1,161 @@
|
|||||||
|
#!/usr/bin/env python3
|
||||||
|
"""Build the MkDocs site, then render docs/guide/ to a single PDF via a Chromium-based browser.
|
||||||
|
|
||||||
|
Uses headless Chrome/Edge print-to-PDF (embeds images). WeasyPrint-based mkdocs-with-pdf is
|
||||||
|
omitted here because it needs GTK/Pango (awkward on Windows).
|
||||||
|
|
||||||
|
Usage (from repo root):
|
||||||
|
python scripts/build_guide_pdf.py
|
||||||
|
python scripts/build_guide_pdf.py --site-dir build/html --pdf export/guide.pdf
|
||||||
|
"""
|
||||||
|
|
||||||
|
from __future__ import annotations
|
||||||
|
|
||||||
|
import argparse
|
||||||
|
import os
|
||||||
|
import shutil
|
||||||
|
import subprocess
|
||||||
|
import sys
|
||||||
|
import time
|
||||||
|
from pathlib import Path
|
||||||
|
|
||||||
|
|
||||||
|
def repo_root() -> Path:
|
||||||
|
return Path(__file__).resolve().parent.parent
|
||||||
|
|
||||||
|
|
||||||
|
def find_chromium_executable() -> Path | None:
|
||||||
|
if sys.platform == "win32":
|
||||||
|
paths = [
|
||||||
|
Path(os.environ.get("PROGRAMFILES(X86)", "")) / "Microsoft/Edge/Application/msedge.exe",
|
||||||
|
Path(os.environ.get("LOCALAPPDATA", "")) / "Microsoft/Edge/Application/msedge.exe",
|
||||||
|
Path(os.environ.get("PROGRAMFILES", "")) / "Google/Chrome/Application/chrome.exe",
|
||||||
|
Path(os.environ.get("PROGRAMFILES(X86)", "")) / "Google/Chrome/Application/chrome.exe",
|
||||||
|
Path(os.environ.get("LOCALAPPDATA", "")) / "Google/Chrome/Application/chrome.exe",
|
||||||
|
]
|
||||||
|
for p in paths:
|
||||||
|
if p.is_file():
|
||||||
|
return p
|
||||||
|
for name in ("chrome", "msedge"):
|
||||||
|
w = shutil.which(name)
|
||||||
|
if w:
|
||||||
|
return Path(w)
|
||||||
|
elif sys.platform == "darwin":
|
||||||
|
for p in (
|
||||||
|
"/Applications/Google Chrome.app/Contents/MacOS/Google Chrome",
|
||||||
|
"/Applications/Microsoft Edge.app/Contents/MacOS/Microsoft Edge",
|
||||||
|
"/Applications/Chromium.app/Contents/MacOS/Chromium",
|
||||||
|
):
|
||||||
|
if os.path.isfile(p):
|
||||||
|
return Path(p)
|
||||||
|
for name in ("google-chrome-stable", "google-chrome", "chromium-browser", "chromium", "chrome"):
|
||||||
|
w = shutil.which(name)
|
||||||
|
if w:
|
||||||
|
return Path(w)
|
||||||
|
return None
|
||||||
|
|
||||||
|
|
||||||
|
def run_mkdocs(site_dir: Path) -> None:
|
||||||
|
site_dir.mkdir(parents=True, exist_ok=True)
|
||||||
|
subprocess.run(
|
||||||
|
[sys.executable, "-m", "mkdocs", "build", "-d", str(site_dir)],
|
||||||
|
cwd=repo_root(),
|
||||||
|
check=True,
|
||||||
|
)
|
||||||
|
|
||||||
|
|
||||||
|
def print_to_pdf(browser: Path, html_file: Path, pdf_out: Path) -> Path:
|
||||||
|
"""Write PDF to ``pdf_out``. Uses a temp file first so an open ``guide.pdf`` on Windows
|
||||||
|
does not block the build: if the final path is locked, writes ``guide-new.pdf`` instead.
|
||||||
|
"""
|
||||||
|
pdf_out.parent.mkdir(parents=True, exist_ok=True)
|
||||||
|
partial = pdf_out.parent / f".{pdf_out.name}.writing"
|
||||||
|
partial.unlink(missing_ok=True)
|
||||||
|
|
||||||
|
uri = html_file.resolve().as_uri()
|
||||||
|
# Chromium headless print; allow time for fonts/images on very large pages.
|
||||||
|
cmd = [str(browser)]
|
||||||
|
if os.environ.get("CI"):
|
||||||
|
# GitHub Actions / other CI runners often need these for Chromium to start.
|
||||||
|
cmd += [
|
||||||
|
"--no-sandbox",
|
||||||
|
"--disable-setuid-sandbox",
|
||||||
|
"--disable-dev-shm-usage",
|
||||||
|
]
|
||||||
|
cmd += [
|
||||||
|
"--headless=new",
|
||||||
|
"--disable-gpu",
|
||||||
|
"--no-pdf-header-footer",
|
||||||
|
f"--print-to-pdf={partial.resolve()}",
|
||||||
|
uri,
|
||||||
|
]
|
||||||
|
subprocess.run(cmd, check=True, timeout=600)
|
||||||
|
deadline = time.time() + 120
|
||||||
|
while time.time() < deadline:
|
||||||
|
if partial.exists() and partial.stat().st_size > 0:
|
||||||
|
break
|
||||||
|
time.sleep(0.25)
|
||||||
|
else:
|
||||||
|
partial.unlink(missing_ok=True)
|
||||||
|
raise RuntimeError(f"PDF was not written to {partial}")
|
||||||
|
|
||||||
|
try:
|
||||||
|
if pdf_out.exists():
|
||||||
|
pdf_out.unlink()
|
||||||
|
except PermissionError:
|
||||||
|
fallback = pdf_out.with_name(f"{pdf_out.stem}-new{pdf_out.suffix}")
|
||||||
|
fallback.unlink(missing_ok=True)
|
||||||
|
partial.replace(fallback)
|
||||||
|
return fallback
|
||||||
|
|
||||||
|
partial.replace(pdf_out)
|
||||||
|
return pdf_out
|
||||||
|
|
||||||
|
|
||||||
|
def main() -> int:
|
||||||
|
root = repo_root()
|
||||||
|
ap = argparse.ArgumentParser(description="Build MkDocs + single-page guide PDF.")
|
||||||
|
ap.add_argument(
|
||||||
|
"--site-dir",
|
||||||
|
type=Path,
|
||||||
|
default=root / "site",
|
||||||
|
help="MkDocs output directory (default: ./site)",
|
||||||
|
)
|
||||||
|
ap.add_argument(
|
||||||
|
"--pdf",
|
||||||
|
type=Path,
|
||||||
|
default=root / "export" / "guide.pdf",
|
||||||
|
help="Output PDF path (default: ./export/guide.pdf)",
|
||||||
|
)
|
||||||
|
ap.add_argument("--skip-mkdocs", action="store_true", help="Reuse existing site dir; only run print-to-pdf.")
|
||||||
|
args = ap.parse_args()
|
||||||
|
|
||||||
|
guide_html = args.site_dir / "guide" / "index.html"
|
||||||
|
if not args.skip_mkdocs:
|
||||||
|
run_mkdocs(args.site_dir)
|
||||||
|
if not guide_html.is_file():
|
||||||
|
print(f"Missing {guide_html}; run without --skip-mkdocs first.", file=sys.stderr)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
browser = find_chromium_executable()
|
||||||
|
if not browser:
|
||||||
|
print(
|
||||||
|
"No Chromium-based browser found (Chrome, Edge, or Chromium). "
|
||||||
|
"Install Google Chrome or Microsoft Edge, or add Chromium to PATH.",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
return 1
|
||||||
|
|
||||||
|
out = print_to_pdf(browser, guide_html, args.pdf)
|
||||||
|
size_kb = out.stat().st_size // 1024
|
||||||
|
print(f"Wrote {out.resolve()} ({size_kb} KiB)")
|
||||||
|
if out.resolve() != args.pdf.resolve():
|
||||||
|
print(
|
||||||
|
f"Note: {args.pdf.name} was in use; close it and rename or replace with the file above.",
|
||||||
|
file=sys.stderr,
|
||||||
|
)
|
||||||
|
return 0
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
raise SystemExit(main())
|
||||||
Reference in New Issue
Block a user