pdf-to-markdown-cli 1.0.1__tar.gz → 1.2.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (72) hide show
  1. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/CHANGELOG.md +25 -0
  2. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/CONTRIBUTING.md +7 -7
  3. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/PKG-INFO +16 -14
  4. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/README.md +6 -3
  5. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/README.md +7 -3
  6. pdf_to_markdown_cli-1.2.0/examples/census_1880_tables_en.md +193 -0
  7. pdf_to_markdown_cli-1.2.0/examples/census_1880_tables_en.pdf +0 -0
  8. pdf_to_markdown_cli-1.2.0/examples/census_1980_ancestry_en.md +140 -0
  9. pdf_to_markdown_cli-1.2.0/examples/census_1980_ancestry_en.pdf +0 -0
  10. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/pyproject.toml +12 -13
  11. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/assemble.py +15 -2
  12. pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/__init__.py +31 -0
  13. pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/base.py +72 -0
  14. pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/datalab/__init__.py +5 -0
  15. pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/datalab/backend.py +119 -0
  16. {pdf_to_markdown_cli-1.0.1/src/docs_to_md → pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/datalab}/client.py +1 -1
  17. {pdf_to_markdown_cli-1.0.1/src/docs_to_md → pdf_to_markdown_cli-1.2.0/src/docs_to_md/backends/datalab}/models.py +2 -11
  18. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/cli.py +28 -15
  19. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/config.py +16 -27
  20. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/console.py +10 -0
  21. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/discovery.py +28 -16
  22. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/errors.py +1 -1
  23. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/pdf.py +12 -7
  24. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/pipeline.py +30 -84
  25. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/pdf_to_markdown_cli.egg-info/PKG-INFO +16 -14
  26. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/pdf_to_markdown_cli.egg-info/SOURCES.txt +13 -4
  27. pdf_to_markdown_cli-1.2.0/src/pdf_to_markdown_cli.egg-info/requires.txt +13 -0
  28. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/conftest.py +49 -1
  29. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/samples.py +21 -0
  30. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_cli.py +55 -12
  31. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_console.py +13 -1
  32. pdf_to_markdown_cli-1.2.0/tests/test_datalab_backend.py +206 -0
  33. pdf_to_markdown_cli-1.0.1/tests/test_client.py → pdf_to_markdown_cli-1.2.0/tests/test_datalab_client.py +2 -2
  34. pdf_to_markdown_cli-1.0.1/tests/test_models.py → pdf_to_markdown_cli-1.2.0/tests/test_datalab_models.py +1 -11
  35. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_discovery.py +17 -1
  36. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_live.py +4 -2
  37. pdf_to_markdown_cli-1.2.0/tests/test_pipeline.py +251 -0
  38. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_samples.py +6 -4
  39. pdf_to_markdown_cli-1.0.1/src/pdf_to_markdown_cli.egg-info/requires.txt +0 -13
  40. pdf_to_markdown_cli-1.0.1/tests/test_pipeline.py +0 -297
  41. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/LICENSE +0 -0
  42. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/MANIFEST.in +0 -0
  43. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/alice_in_wonderland_sample.md +0 -0
  44. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/alice_in_wonderland_sample.pdf +0 -0
  45. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/alice_in_wonderland_sample_images/61972112770d9c8fb00883057954f885_img.jpg +0 -0
  46. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/darwin_origin_of_species_en.md +0 -0
  47. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/darwin_origin_of_species_en.pdf +0 -0
  48. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/darwin_origin_of_species_en_images/68ac34ff111db52afaa786afcb8346c3_img.jpg +0 -0
  49. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/equations.md +0 -0
  50. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/equations.pdf +0 -0
  51. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/equations_images/30a26f2d17ca95672702bf50fb4f0242_img.jpg +0 -0
  52. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/grimm_fairy_tales_de.md +0 -0
  53. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/grimm_fairy_tales_de.pdf +0 -0
  54. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh.md +0 -0
  55. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh.pdf +0 -0
  56. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh_images/13f8cc7f38c868748825f3a80b201b57_img.jpg +0 -0
  57. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh_images/8c378a184b5ae4d1605cb74d7b7a7e3f_img.jpg +0 -0
  58. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh_images/d5fc881e4328d6a2e76c9576408ced49_img.jpg +0 -0
  59. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/shijing_gupu_zh_images/eb70ac3e793aea24b49d2cd9f7b0b269_img.jpg +0 -0
  60. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/tolstoy_war_and_peace_ru.md +0 -0
  61. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/examples/tolstoy_war_and_peace_ru.pdf +0 -0
  62. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/setup.cfg +0 -0
  63. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/__init__.py +0 -0
  64. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/__main__.py +0 -0
  65. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/docs_to_md/markdown.py +0 -0
  66. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/pdf_to_markdown_cli.egg-info/dependency_links.txt +0 -0
  67. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/pdf_to_markdown_cli.egg-info/entry_points.txt +0 -0
  68. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/src/pdf_to_markdown_cli.egg-info/top_level.txt +0 -0
  69. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/__init__.py +0 -0
  70. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_assemble.py +0 -0
  71. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_markdown.py +0 -0
  72. {pdf_to_markdown_cli-1.0.1 → pdf_to_markdown_cli-1.2.0}/tests/test_pdf.py +0 -0
@@ -8,6 +8,31 @@ This project follows [Semantic Versioning](https://semver.org/spec/v2.0.0.html),
8
8
 
9
9
  ## [Unreleased]
10
10
 
11
+ ## [1.2.0] - 2026-09-29
12
+
13
+ ### Added
14
+
15
+ - `--backend` option for choosing the conversion service. `datalab` is the default and, for now, the only choice.
16
+
17
+ ### Changed
18
+
19
+ - Conversion now goes through a pluggable backend interface (`docs_to_md.backends`), so other services or local engines can be added without touching the pipeline. Datalab behavior is unchanged. The Datalab client and API types moved from `docs_to_md.client` and `docs_to_md.models` to `docs_to_md.backends.datalab`.
20
+
21
+ ## [1.1.0] - 2026-09-29
22
+
23
+ ### Added
24
+
25
+ - Two hard table samples: a yellowed 1880 Census microfiche page with side-by-side tables, and a dense 1980 Census table with two-level headers. Both have reference outputs, and the tests check their table structure.
26
+
27
+ ### Changed
28
+
29
+ - **Requires Python 3.11 or newer.** Python 3.10 reaches end of life in October 2026, and the current pikepdf needs 3.11.
30
+ - Dependencies raised to their latest releases: pikepdf 10.15, requests 2.34, tqdm 4.70. Development tools: pytest 9.1, pytest-cov 7.1, ruff 0.16, build 1.6, twine 7.0, setuptools 84.
31
+
32
+ ### Removed
33
+
34
+ - `SECURITY.md`.
35
+
11
36
  ## [1.0.1] - 2026-09-29
12
37
 
13
38
  ### Added
@@ -45,9 +45,10 @@ src/docs_to_md/
45
45
  ├── cli.py arguments, entry point, exit codes, summary
46
46
  ├── config.py validated runtime configuration
47
47
  ├── discovery.py input discovery, deterministic output names
48
- ├── pipeline.py split, submit concurrently, poll, report
49
- ├── client.py API client: retries, timeouts, error types
50
- ├── models.py API request/response types, formats
48
+ ├── pipeline.py split, convert chunks concurrently, report
49
+ ├── backends/ conversion backends, selected with --backend
50
+ │ ├── base.py Backend contract and BackendInfo capabilities
51
+ │ └── datalab/ Datalab Convert API: submit/poll, HTTP client, types
51
52
  ├── pdf.py page ranges and PDF splitting (pikepdf)
52
53
  ├── assemble.py merge chunks, renumber pages, write files
53
54
  ├── markdown.py Markdown clean-up (reflow, captions)
@@ -59,9 +60,10 @@ examples/ sample documents with reference outputs
59
60
 
60
61
  ## Conventions
61
62
 
62
- - Python 3.10+, type-hinted, with `from __future__ import annotations`.
63
+ - Python 3.11+, type-hinted, with `from __future__ import annotations`.
63
64
  - Raise exceptions from `errors.py`. Use `FatalAPIError` only for problems that affect every request (bad key, no credits). It aborts the whole run.
64
- - Keep network code in `client.py` and orchestration in `pipeline.py`. Pipeline tests use `FakeClient` from `tests/conftest.py`. HTTP behavior is tested with the fake session in `tests/test_client.py`.
65
+ - Keep orchestration in `pipeline.py` and everything service-specific in its backend under `backends/`. The pipeline must not know which backend it runs. Pipeline tests use `FakeBackend` from `tests/conftest.py`. Datalab behavior is tested with `FakeClient` in `tests/test_datalab_backend.py`, and HTTP behavior with the fake session in `tests/test_datalab_client.py`.
66
+ - A new backend subclasses `Backend` (`backends/base.py`), declares what it accepts in a `BackendInfo`, and is registered in `BACKENDS` (`backends/__init__.py`).
65
67
  - Add tests with every behavior change, in the module's test file. The suite is fast (under a second), so keep it that way.
66
68
  - Update the docs in the same pull request: `README.md` for user-facing changes, `CHANGELOG.md` under **Unreleased**, and `AGENTS.md` when the module map or conventions change.
67
69
 
@@ -69,8 +71,6 @@ examples/ sample documents with reference outputs
69
71
 
70
72
  Open an [issue](https://github.com/SokolskyNikita/pdf-to-markdown-cli/issues/new/choose) using the templates. For a bug, the most useful things are the exact command, the input type, and the output of the same command with `-v`. Please don't attach confidential documents.
71
73
 
72
- Report security issues privately as described in [SECURITY.md](SECURITY.md).
73
-
74
74
  ## Releasing (maintainers)
75
75
 
76
76
  1. Move the **Unreleased** changelog notes under a `## [X.Y.Z] - YYYY-MM-DD` heading and bump `version` in `pyproject.toml`.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pdf-to-markdown-cli
3
- Version: 1.0.1
3
+ Version: 1.2.0
4
4
  Summary: Convert PDFs, Office documents, ebooks, and images to Markdown, HTML, or JSON with the Datalab API.
5
5
  Author-email: Nikita Sokolsky <sokolx@gmail.com>
6
6
  Maintainer-email: Nikita Sokolsky <sokolx@gmail.com>
@@ -15,7 +15,6 @@ Classifier: Development Status :: 5 - Production/Stable
15
15
  Classifier: Intended Audience :: Developers
16
16
  Classifier: Intended Audience :: End Users/Desktop
17
17
  Classifier: Programming Language :: Python :: 3
18
- Classifier: Programming Language :: Python :: 3.10
19
18
  Classifier: Programming Language :: Python :: 3.11
20
19
  Classifier: Programming Language :: Python :: 3.12
21
20
  Classifier: Programming Language :: Python :: 3.13
@@ -26,20 +25,20 @@ Classifier: Topic :: Office/Business
26
25
  Classifier: Topic :: Software Development :: Libraries :: Python Modules
27
26
  Classifier: Topic :: Text Processing
28
27
  Classifier: Topic :: Utilities
29
- Requires-Python: >=3.10
28
+ Requires-Python: >=3.11
30
29
  Description-Content-Type: text/markdown
31
30
  License-File: LICENSE
32
- Requires-Dist: pikepdf>=8.0
33
- Requires-Dist: requests>=2.28
34
- Requires-Dist: tqdm>=4.60
31
+ Requires-Dist: pikepdf>=10.15
32
+ Requires-Dist: requests>=2.34
33
+ Requires-Dist: tqdm>=4.70
35
34
  Provides-Extra: test
36
- Requires-Dist: pytest>=8.3.0; extra == "test"
37
- Requires-Dist: pytest-cov>=5.0.0; extra == "test"
35
+ Requires-Dist: pytest>=9.1; extra == "test"
36
+ Requires-Dist: pytest-cov>=7.1; extra == "test"
38
37
  Provides-Extra: dev
39
38
  Requires-Dist: pdf-to-markdown-cli[test]; extra == "dev"
40
- Requires-Dist: build>=1.2.0; extra == "dev"
41
- Requires-Dist: twine>=5.1.0; extra == "dev"
42
- Requires-Dist: ruff>=0.11.0; extra == "dev"
39
+ Requires-Dist: build>=1.6; extra == "dev"
40
+ Requires-Dist: twine>=7.0; extra == "dev"
41
+ Requires-Dist: ruff>=0.16; extra == "dev"
43
42
  Dynamic: license-file
44
43
 
45
44
  <h1 align="center">pdf-to-md</h1>
@@ -50,7 +49,7 @@ Dynamic: license-file
50
49
 
51
50
  <p align="center">
52
51
  <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/pypi/v/pdf-to-markdown-cli.svg" alt="PyPI"></a>
53
- <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+"></a>
52
+ <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/badge/python-3.11%2B-blue.svg" alt="Python 3.11+"></a>
54
53
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/actions/workflows/ci.yml"><img src="https://github.com/SokolskyNikita/pdf-to-markdown-cli/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
55
54
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/releases"><img src="https://img.shields.io/github/v/release/SokolskyNikita/pdf-to-markdown-cli" alt="GitHub release"></a>
56
55
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License: MIT"></a>
@@ -75,11 +74,11 @@ Done in 4m37s: 3 converted · 1563 pages · $4.69
75
74
  - **Honest about results.** Every file reports its pages and cost. The exit code says whether anything failed. A bad API key stops the run immediately instead of failing file by file.
76
75
  - **Resilient.** Rate limits, server errors, and dropped connections are retried with backoff. Ctrl-C stops cleanly without leaving half-written files.
77
76
  - **Made for scripting.** Converted paths go to stdout, progress and errors to stderr, so it drops straight into pipelines and CI jobs.
78
- - **Any language, any era.** Tested on modern PDFs, math, and scans of Cyrillic, blackletter German, and vertical classical Chinese ([samples](#sample-conversions)).
77
+ - **Any language, any era.** Tested on modern PDFs, math, statistical tables from a faded microfiche, and scans of Cyrillic, blackletter German, and vertical classical Chinese ([samples](#sample-conversions)).
79
78
 
80
79
  ## Installation
81
80
 
82
- Requires Python 3.10 or newer. [pipx](https://pipx.pypa.io/) installs it in its own isolated environment:
81
+ Requires Python 3.11 or newer. [pipx](https://pipx.pypa.io/) installs it in its own isolated environment:
83
82
 
84
83
  ```bash
85
84
  pipx install pdf-to-markdown-cli
@@ -193,6 +192,8 @@ Throughput depends on your plan's limits. With the default of 5 concurrent reque
193
192
  | [*War and Peace* (1937 ed.)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/tolstoy_war_and_peace_ru.md) | Russian | Cyrillic mixed with French, footnotes |
194
193
  | [*Grimm's Fairy Tales* (1857)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/grimm_fairy_tales_de.md) | German | Fraktur blackletter typeface |
195
194
  | [*Shijing Gupu* (1908)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/shijing_gupu_zh.md) | Chinese | Vertical text, music notation |
195
+ | [1880 Census tables](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/census_1880_tables_en.md) | English | Microfiche scan, side-by-side tables |
196
+ | [1980 Census ancestry](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/census_1980_ancestry_en.md) | English | Dense table, two-level headers |
196
197
 
197
198
  See [examples/README.md](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/README.md) for sources and how the samples are used in tests.
198
199
 
@@ -217,6 +218,7 @@ pdf-to-md INPUT [INPUT ...] [options]
217
218
 
218
219
  | Option | Description |
219
220
  | --- | --- |
221
+ | `--backend NAME` | Conversion service. Default and currently only choice: `datalab`. |
220
222
  | `-m`, `--mode MODE` | `fast` (the API default), `balanced`, or `accurate`. |
221
223
  | `--paginate` | Insert page separators. |
222
224
  | `--no-images` | Don't extract images. |
@@ -6,7 +6,7 @@
6
6
 
7
7
  <p align="center">
8
8
  <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/pypi/v/pdf-to-markdown-cli.svg" alt="PyPI"></a>
9
- <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/badge/python-3.10%2B-blue.svg" alt="Python 3.10+"></a>
9
+ <a href="https://pypi.org/project/pdf-to-markdown-cli/"><img src="https://img.shields.io/badge/python-3.11%2B-blue.svg" alt="Python 3.11+"></a>
10
10
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/actions/workflows/ci.yml"><img src="https://github.com/SokolskyNikita/pdf-to-markdown-cli/actions/workflows/ci.yml/badge.svg" alt="CI"></a>
11
11
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/releases"><img src="https://img.shields.io/github/v/release/SokolskyNikita/pdf-to-markdown-cli" alt="GitHub release"></a>
12
12
  <a href="https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/LICENSE"><img src="https://img.shields.io/badge/license-MIT-green.svg" alt="License: MIT"></a>
@@ -31,11 +31,11 @@ Done in 4m37s: 3 converted · 1563 pages · $4.69
31
31
  - **Honest about results.** Every file reports its pages and cost. The exit code says whether anything failed. A bad API key stops the run immediately instead of failing file by file.
32
32
  - **Resilient.** Rate limits, server errors, and dropped connections are retried with backoff. Ctrl-C stops cleanly without leaving half-written files.
33
33
  - **Made for scripting.** Converted paths go to stdout, progress and errors to stderr, so it drops straight into pipelines and CI jobs.
34
- - **Any language, any era.** Tested on modern PDFs, math, and scans of Cyrillic, blackletter German, and vertical classical Chinese ([samples](#sample-conversions)).
34
+ - **Any language, any era.** Tested on modern PDFs, math, statistical tables from a faded microfiche, and scans of Cyrillic, blackletter German, and vertical classical Chinese ([samples](#sample-conversions)).
35
35
 
36
36
  ## Installation
37
37
 
38
- Requires Python 3.10 or newer. [pipx](https://pipx.pypa.io/) installs it in its own isolated environment:
38
+ Requires Python 3.11 or newer. [pipx](https://pipx.pypa.io/) installs it in its own isolated environment:
39
39
 
40
40
  ```bash
41
41
  pipx install pdf-to-markdown-cli
@@ -149,6 +149,8 @@ Throughput depends on your plan's limits. With the default of 5 concurrent reque
149
149
  | [*War and Peace* (1937 ed.)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/tolstoy_war_and_peace_ru.md) | Russian | Cyrillic mixed with French, footnotes |
150
150
  | [*Grimm's Fairy Tales* (1857)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/grimm_fairy_tales_de.md) | German | Fraktur blackletter typeface |
151
151
  | [*Shijing Gupu* (1908)](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/shijing_gupu_zh.md) | Chinese | Vertical text, music notation |
152
+ | [1880 Census tables](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/census_1880_tables_en.md) | English | Microfiche scan, side-by-side tables |
153
+ | [1980 Census ancestry](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/census_1980_ancestry_en.md) | English | Dense table, two-level headers |
152
154
 
153
155
  See [examples/README.md](https://github.com/SokolskyNikita/pdf-to-markdown-cli/blob/main/examples/README.md) for sources and how the samples are used in tests.
154
156
 
@@ -173,6 +175,7 @@ pdf-to-md INPUT [INPUT ...] [options]
173
175
 
174
176
  | Option | Description |
175
177
  | --- | --- |
178
+ | `--backend NAME` | Conversion service. Default and currently only choice: `datalab`. |
176
179
  | `-m`, `--mode MODE` | `fast` (the API default), `balanced`, or `accurate`. |
177
180
  | `--paginate` | Insert page separators. |
178
181
  | `--no-images` | Don't extract images. |
@@ -10,19 +10,23 @@ Each PDF here sits next to the real output `pdf-to-md` produced for it: `<name>.
10
10
  | `tolstoy_war_and_peace_ru.pdf` | 2 | Russian | Cyrillic mixed with French, translated footnotes, margin line numbers | Leo Tolstoy, *War and Peace*, vol. 1, Complete Works vol. 9 (1937), pp. 13–14 |
11
11
  | `grimm_fairy_tales_de.pdf` | 2 | German | Fraktur blackletter, 19th-century spelling | Brothers Grimm, *Kinder- und Hausmärchen*, 7th ed., vol. 2 (1857), tale 88 |
12
12
  | `shijing_gupu_zh.pdf` | 2 | Chinese | Vertical right-to-left classical text, staff notation with numbered notes | Yuan Jiagu (ed.), *Shijing Gupu* (1908 lithograph), preface and first score |
13
+ | `census_1880_tables_en.pdf` | 2 | English | Yellowed microfiche scan: two tables side by side, tiny type, dotted leaders, remarks wrapped across rows | US Census Office, *Statistics of the Population at the Tenth Census* (1883), Table III, pp. 245–246 |
14
+ | `census_1980_ancestry_en.pdf` | 2 | English | Dense statistical table with two-level column headers, space-separated thousands, `(NA)` cells | US Bureau of the Census, *Ancestry of the Population by State: 1980* (1983), Table 3b |
13
15
 
14
- The Darwin, Tolstoy, Grimm, and Shijing samples are public-domain texts. They're two-page excerpts of full-book scans, kept small so the repository and the source distribution stay light.
16
+ The census outputs show when each mode is worth it. The 1980 table converts correctly in the default `fast` mode. The 1880 microfiche page uses `--mode accurate`, which removes the dotted leaders and fixes digits that `fast` misreads on this scan (May township 899 instead of 609). The manifest records the mode for each sample.
17
+
18
+ The Darwin, Tolstoy, Grimm, and Shijing samples are public-domain texts, and the census reports are US government works. They're two-page excerpts of full-book scans, kept small so the repository and the source distribution stay light.
15
19
 
16
20
  ## How the tests use them
17
21
 
18
- - [`tests/samples.py`](../tests/samples.py) lists every sample with its page count and words a correct conversion must contain.
22
+ - [`tests/samples.py`](../tests/samples.py) lists every sample with its page count, the words a correct conversion must contain, the minimum number of table rows, and the mode, if it isn't the default.
19
23
  - `tests/test_samples.py` checks, offline, that each PDF opens and splits correctly, and that each committed `.md` file here is complete: it contains the expected words and every image link resolves.
20
24
  - `tests/test_live.py` converts every sample with the real API, one page per chunk with pagination, then checks the text, page numbering, and images. Run it with `DATALAB_API_KEY=... pytest -m live` when changing anything that affects output.
21
25
 
22
26
  ## Adding a sample
23
27
 
24
28
  1. Put a short excerpt (one to three pages) of a public-domain document here. It should exercise something the other samples don't.
25
- 2. Generate its output: `pdf-to-md examples`. Existing outputs are skipped, so only the new file is converted.
29
+ 2. Generate its output: `pdf-to-md examples`, adding `--mode` if the sample needs it. Existing outputs are skipped, so only the new file is converted.
26
30
  3. Add an entry to `tests/samples.py` and a row to the tables here and in the main README.
27
31
 
28
32
  To refresh every output after a change in conversion behavior, run `pdf-to-md examples --overwrite` and review the diff.
@@ -0,0 +1,193 @@
1
+ TABLE III.—MISSOURI—Continued.
2
+
3
+ | MINOR CIVIL DIVISIONS. | 1880. | 1870. | REMARKS. | MINOR CIVIL DIVISIONS. | 1880. | 1870. | REMARKS. |
4
+ |----------------------------------------|-------|-------|------------------------------|----------------------------------------------------------------|-------|-------|------------------------------------|
5
+ | <b>PLATTE—continued.</b> | | | | <b>REYNOLDS.</b> | | | |
6
+ | Marshall township | 1,910 | 2,038 | [roll and Pettis. | Black River township | 567 | 1,280 | In 1872, pt. to Lesterville. |
7
+ | May township | 899 | | In 1876, fr. pts. of Car- | Carroll township | 1,234 | 605 | |
8
+ | Pettis township | 2,354 | 3,943 | In 1876, parts to May and | Jackson township | 540 | 327 | |
9
+ | Preston township | 1,608 | 1,692 | [Waldron. | Lesterville township | 1,068 | | In 1872, from pt. of Black |
10
+ | Waldron township | 840 | | In 1876, from pts. of Lee | Logan township | 1,159 | 910 | [River. |
11
+ | | | | and Pettis. | Webb township | 1,154 | 634 | |
12
+ | Weston township, incl. Weston town | 2,156 | 2,453 | In 1870, part to Fair. | <b>RIPLEY.</b> | | | |
13
+ | Weston town | 1,329 | 1,614 | | Current River township | 299 | 960 | In 1871, pt. to Doniphan. |
14
+ | <b>POLK.</b> | | | | Doniphan township | 791 | | In 1871, fr. pt. of Current River. |
15
+ | Benton township | 1,726 | 1,650 | | Fourchee township | 230 | | In 1871, fr. pt. of Union. |
16
+ | Greene township | 1,430 | 1,074 | | Harris township | 566 | | [son and Kelly. |
17
+ | Jackson township | 1,746 | 1,483 | | Jorden township | 289 | | In 1871, from pts. of John- |
18
+ | Jefferson township | 885 | 480 | | Johnson township | 271 | 280 | In 1871, part to Jorden. |
19
+ | Johnson township | 1,278 | 898 | | Kelly township | 496 | 240 | Do. |
20
+ | Looney township | 2,117 | 1,750 | | Thomas township | 241 | | In 1871, reformed. |
21
+ | Madison township | 1,709 | 1,361 | | Union township | 1,417 | 855 | In 1871, pt. to Fourchee. |
22
+ | Marion township, incl. Bolivar village | 3,282 | 2,489 | | Washington township | 777 | 680 | |
23
+ | Bolivar village | 516 | | | Information as to changes in minor civil divisions incomplete. | | | |
24
+ | Mooney township | 1,561 | 1,260 | | | | | |
25
+ | <b>PULASKI.</b> | | | | <b>SAINT CHARLES.</b> | | | |
26
+ | Cullen township | 1,252 | 849 | | Callaway township | 1,830 | 1,745 | |
27
+ | Liberty twp., incl. Richland town | 1,684 | 893 | | Cuivre twp., incl. Wentzville village | 3,820 | 3,174 | |
28
+ | Richland town | 360 | | | Wentzville village | 543 | | |
29
+ | Piney township | 535 | 541 | In 1870, published Big | Dardenne township | 4,056 | 3,092 | |
30
+ | Robideaux township | 768 | 677 | [Piney. | Femme Osage twp., incl. Augusta vill. | 2,401 | 2,383 | |
31
+ | Tavern township | 1,232 | 796 | | Augusta village | 318 | | |
32
+ | Union township | 1,779 | 958 | | Portage des Sioux twp., incl. Portage village | 2,541 | 1,861 | |
33
+ | <b>PUTNAM.</b> | | | | Portage village | 225 | 160 | |
34
+ | Elm township | 2,371 | 1,640 | | Saint Charles twp., incl. Saint Charles city | 8,417 | 9,049 | |
35
+ | Grant township | 704 | 638 | | Saint Charles city | 5,014 | 5,570 | |
36
+ | Jackson township | 1,005 | 799 | | <b>SAINT CLAIR.</b> | | | |
37
+ | Liberty township | 1,402 | 1,174 | | Appleton twp., incl. Appleton City vill. | 1,983 | | In 1871, fr. pt. of Monegan. |
38
+ | Lincoln township | 1,285 | 1,057 | | Appleton City village | 1,034 | | |
39
+ | Medicine township | 818 | 665 | | Butler township | 1,399 | 646 | |
40
+ | Richland township | 785 | 720 | | Chalk Level township | 861 | 851 | In 1871, part to Tabor. |
41
+ | Sherman township | 1,058 | 987 | | Collins township | 863 | | In 1871, fr. pt. of Polk. |
42
+ | Union twp., incl. Unionville town | 1,763 | 2,053 | In 1873, part to Wilson. | Dallas township | 635 | | Do. |
43
+ | Unionville town | 772 | 462 | | Doyal township | 838 | | In 1871, fr. pts. of Osceola |
44
+ | Wilson township | 791 | | In 1873, fr. pt. of Union. | Jackson township | 775 | 411 | [and Washington |
45
+ | York township | 1,573 | 1,484 | | Monegan township | 1,321 | 1,434 | In 1871, pts. to Appleton |
46
+ | <b>RALLS.</b> | | | | | | | and Tabor. |
47
+ | Centre township | 1,153 | 726 | | Osceola twp., incl. Osceola town | 1,162 | 957 | In 1871, part to Doyal. |
48
+ | Clay township | 1,700 | 1,701 | | Osceola town | 373 | 331 | |
49
+ | Jasper township | 1,866 | 1,394 | | Polk township | 605 | 316 | In 1871, parts to Collins |
50
+ | Saline township | 1,682 | 1,634 | | Roscoe township, incl. Roscoe town | 1,253 | 922 | [and Dallas. |
51
+ | Salt River township | 1,681 | 1,337 | | Roscoe town | 172 | 302 | |
52
+ | Saverton township | 1,488 | 1,599 | | Speedwell township | 1,133 | 606 | [Level and Monegan. |
53
+ | Spencer twp., incl. New London vill. | 2,268 | 2,119 | | Tabor township | 951 | | In 1871, fr. pts. of Chalk |
54
+ | New London village | 502 | 410 | | Washington township | 346 | 599 | In 1871, part to Doyal. |
55
+ | <b>RANDOLPH.</b> | | | | <b>SAINT FRANÇOIS.</b> | | | |
56
+ | Cairo township | 1,193 | | In 1871, fr. pts. of Jack- | Big River township | 875 | 436 | |
57
+ | | | | son, Salt River, Sugar | Iron twp., incl. the following villages | 2,159 | 2,555 | |
58
+ | | | | Creek, and Union. | Bismarck village | 286 | | |
59
+ | Chariton township | 1,964 | 1,699 | [Spring & Silver Creek. | Iron Mountain village | 1,243 | 2,018 | |
60
+ | Clifton township | 844 | | In 1872, from pts. of Salt | Liberty twp., incl. Libertyville village | 1,802 | 1,405 | |
61
+ | Jackson twp., incl. Jacksonville town | 975 | 1,175 | In 1871, part to Cairo. | Libertyville village | 80 | | |
62
+ | Jacksonville town | 163 | | | Marion township | 1,183 | 854 | |
63
+ | Moniteau twp., incl. Higbee town | 1,472 | | In 1874, fr. pts. of Prairie | Pendleton township | 958 | 851 | |
64
+ | Higbee town | 347 | | [and Silver Creek. | Perry township | 3,755 | 1,351 | |
65
+ | Prairie twp., incl. Renick town | 3,081 | 2,863 | In 1874, pt. to Moniteau. | Randolph township | 765 | 676 | |
66
+ | Renick town | 460 | | | Saint François twp., incl. Farmington village | 2,325 | 1,614 | |
67
+ | Salt River township | 861 | 782 | In 1871, part to Cairo. | Farmington village | 608 | 393 | |
68
+ | Salt Spring twp., incl. Huntsville twn | 3,218 | 3,526 | In 1872, part to Clifton. | <b>SAINTE GENEVIEVE.</b> | | | |
69
+ | Huntsville town | 1,527 | | [1874, pt. to Moniteau. | Beauvais twp., incl. Saint Mary town | 1,722 | 1,306 | |
70
+ | Silver Creek township | 1,391 | 1,831 | In 1872, pt. to Clifton; in | Saint Mary town | 419 | 397 | |
71
+ | Sugar Creek twp., incl. Moberly city | 7,031 | 2,896 | In 1871, part to Cairo. | Jackson township | 1,364 | 1,112 | |
72
+ | Moberly city | 6,070 | 1,514 | | Sainte Genevieve twp., incl. Sainte Genevieve city | 3,929 | 3,409 | |
73
+ | Ward 1 | 1,501 | | | Sainte Genevieve city | 1,422 | 1,521 | |
74
+ | “ 2 | 2,597 | | | Saline township | 1,493 | 980 | |
75
+ | “ 3 | 1,972 | | | Union township | 1,882 | 1,577 | |
76
+ | Union township | 721 | 1,136 | In 1871, part to Cairo. | <b>SAINT LOUIS.</b> | | | |
77
+ | <b>RAY.</b> | | | | Bonhomme twp., incl. Kirkwood vill. | 7,043 | 6,162 | [city. |
78
+ | Camden twp., incl. the following twns. | 3,353 | 3,347 | | Kirkwood village | 1,280 | | In 1876, pt. to Saint Louis |
79
+ | Camden town | 509 | 357 | | Carondelet township | 5,691 | 5,387 | |
80
+ | Orrick town | 193 | | | Central township | 7,485 | 8,923 | Do. |
81
+ | Crooked River twp., incl. Hardin town | 1,883 | 1,622 | | Meramec township | 3,746 | 3,436 | Do. |
82
+ | Hardin town | 247 | | | Saint Ferdinand twp., incl. the following villages: | 7,923 | 7,214 | |
83
+ | Fishing River twp., incl. Vibbard twn | 1,961 | 1,653 | | Bridgeton village | 197 | | |
84
+ | Vibbard town | 140 | | | Saint Ferdinand village | 817 | | |
85
+ | Grape Grove township | 3,090 | 2,660 | | | | | |
86
+ | Knoxville twp., incl. Taitsville town | 2,301 | 2,469 | | | | | |
87
+ | Taitsville town | 108 | | | | | | |
88
+ | Polk township, incl. Lawson town | 1,534 | 1,368 | | | | | |
89
+ | Lawson town | 223 | | | | | | |
90
+ | Richmond twp., incl. Richmond town | 6,068 | 5,581 | | | | | |
91
+ | Richmond town | 1,424 | 1,218 | | | | | |
92
+
93
+ TABLE III.—MISSOURI—Continued.
94
+
95
+ | MINOR CIVIL DIVISIONS. | 1880. | 1870. | REMARKS. | MINOR CIVIL DIVISIONS. | 1880. | 1870. | REMARKS. |
96
+ |------------------------------------------|---------|---------|-----------------------------|------------------------------------------|-------|-------|-------------------------------|
97
+ | <b>SAINT LOUIS CITY.</b> | | | | <b>SCOTT—continued.</b> | | | |
98
+ | Saint Louis city ..... | 350,518 | 310,804 | | Morley township, incl. Morley village. | 828 | | In 1872, fr. part of More- |
99
+ | Ward 1..... | 17,434 | | | Morley village ..... | 232 | | [land. |
100
+ | " 2..... | 13,997 | | | Richland twp., incl. Sikeston village .. | 1,204 | 1,080 | |
101
+ | " 3..... | 14,494 | | | Sikeston village ..... | 101 | | |
102
+ | " 4..... | 24,502 | | | Sandywood township ..... | 879 | 777 | |
103
+ | " 5..... | 19,445 | | | Sylvania township ..... | 841 | | In 1872, fr. part of More- |
104
+ | " 6..... | 9,949 | | | Tywappity township ..... | 692 | 580 | [land. |
105
+ | " 7..... | 13,143 | | | <b>SHANNON.</b> | | | |
106
+ | " 8..... | 6,657 | | | Birch Tree township ..... | 569 | 312 | |
107
+ | " 9..... | 10,812 | | | Blair's Creek township ..... | 187 | | In 1875, fr. part of Emi- |
108
+ | " 10..... | 26,904 | | | Bowlan township ..... | 239 | 156 | [nence. |
109
+ | " 11..... | 5,584 | | | Casto township ..... | 213 | | In 1876, fr. pts. of Jackson, |
110
+ | " 12..... | 28,536 | | | | | | Jasper, and Spring Val- |
111
+ | " 13..... | 8,773 | | | | | | ley. |
112
+ | " 14..... | 20,333 | | | Delaware township ..... | 230 | 198 | |
113
+ | " 15..... | 13,562 | | | Eminence township ..... | 535 | 325 | In 1871, name changed fr. |
114
+ | " 16..... | 11,699 | | | | | | Current River; in 1875, |
115
+ | " 17..... | 17,227 | | | | | | part to Blair's Creek. |
116
+ | " 18..... | 24,673 | | | | | | In 1876, part to Casto. |
117
+ | " 19..... | 7,229 | | | | | | Do. Do. |
118
+ | " 20..... | 12,246 | | | Jackson township ..... | 332 | 370 | |
119
+ | " 21..... | 4,187 | | | Jasper township ..... | 177 | 93 | |
120
+ | " 22..... | 3,294 | | | Moore township ..... | 149 | 286 | |
121
+ | " 23..... | 5,737 | | | Newton township ..... | 261 | 193 | |
122
+ | " 24..... | 12,256 | | | Pike Creek township ..... | 340 | 155 | |
123
+ | " 25..... | 1,015 | | | Spring Valley township ..... | 209 | 251 | In 1876, part to Casto. |
124
+ | " 26..... | 2,594 | | | | | | |
125
+ | " 27..... | 4,824 | | | <b>SHELBY.</b> | | | |
126
+ | " 28..... | 9,412 | | | Bethel township ..... | 1,343 | 1,224 | |
127
+ | In 1876, formed as a separate mu- | | | | Black Creek twp., incl. Shelbyville tn. | 2,074 | 1,418 | |
128
+ | nicipality and increased by pts. | | | | Shelbyville town ..... | 619 | 530 | |
129
+ | of Carondelet and Central and | | | | Clay township, incl. Clarence town .. | 1,761 | 1,433 | |
130
+ | all of Saint Louis twps., Saint | | | | Clarence town ..... | 570 | 444 | |
131
+ | Louis county. | | | | Jackson twp., incl. Hunnewell town .. | 2,057 | 1,416 | |
132
+ | <b>SALINE.</b> | | | | Hunnewell town ..... | 424 | 327 | |
133
+ | Arrow Rock township, incl. Arrow | 2,445 | 3,174 | In 1873, pt. to Salt Fork; | Jefferson township ..... | 1,548 | 867 | |
134
+ | Rock town ..... | | | in '74, pt. fr. Salt Fork. | Salt River twp., incl. Shelbina town .. | 2,866 | 1,986 | |
135
+ | Arrow Rock town ..... | 304 | | | Shelbina town ..... | 1,289 | 1,145 | |
136
+ | Blackwater township, incl. Ridge Prai- | 1,230 | 1,784 | In 1871, pt. to Liberty; in | Taylor township ..... | 1,212 | 920 | |
137
+ | rie town ..... | 46 | | 1873, part to Salt Fork. | Tiger Fork township ..... | 1,163 | 855 | |
138
+ | Ridge Prairie town ..... | 46 | | | <b>STODDARD.</b> | | | |
139
+ | Cambridge township, incl. the follow- | 2,462 | | In 1871, from part of Jef- | Castor twp., incl. Bloomfield village .. | 3,422 | 2,785 | |
140
+ | ing towns: | | | ferson. | Bloomfield village ..... | 389 | 379 | |
141
+ | Cambridge town ..... | 275 | 375 | | Duck Creek township ..... | 1,646 | 781 | |
142
+ | Gilliam town ..... | 56 | | | Elk township ..... | 894 | 621 | |
143
+ | Slater town ..... | 771 | | | Liberty township, incl. Dexter village. | 2,800 | 1,307 | |
144
+ | Clay township ..... | 2,242 | | In 1873, organized. | Dexter village ..... | 489 | | |
145
+ | Elmwood township, incl. the follow- | 2,297 | 1,538 | | New Lisbon township ..... | 1,850 | 1,182 | |
146
+ | ing villages: | | | | Pike township ..... | 1,834 | 1,421 | |
147
+ | Blackburn village ..... | 214 | | | Richland township, incl. Essex village. | 976 | 438 | |
148
+ | Mount Leonard village ..... | 28 | | | Essex village ..... | 77 | | |
149
+ | Grand Passtwp., incl. Malta Bend twp. | 2,425 | 1,956 | | <b>STONE.</b> | | | |
150
+ | Malta Bend town ..... | 412 | | | Cass township ..... | 710 | 592 | |
151
+ | Jefferson township ..... | 1,542 | 3,002 | In 1871, pt. to Cambridge. | Flat Creek township ..... | 560 | 595 | |
152
+ | Liberty township, incl. Herndon vill .. | 1,819 | | In 1871, fr. pts. of Black- | James township ..... | 395 | 447 | |
153
+ | Herndon village ..... | 55 | | [water and Salt Pond. | Pierce township ..... | 1,388 | 781 | |
154
+ | Marshall twp., incl. Marshall town ..... | 5,945 | 3,701 | In 1874, from part of Salt | Washington township ..... | 646 | 506 | |
155
+ | Marshall town ..... | 2,701 | | [Fork. | Williams township ..... | 705 | 332 | |
156
+ | Miami township, incl. Miami town ..... | 4,140 | 3,622 | | | | | |
157
+ | Miami town ..... | 813 | 742 | | <b>SULLIVAN.</b> | | | |
158
+ | Salt Fork township ..... | 838 | | In 1873, fr. pts. of Arrow | Bowman township ..... | 1,080 | 581 | |
159
+ | | | | Rock and Blackwater; | Buchanan township ..... | 995 | 1,104 | |
160
+ | | | | in 1874, parts to Arrow | Clay township ..... | 1,062 | 877 | |
161
+ | | | | Rock and Marshall. | Duncan twp., incl. Browning town .. | 1,688 | 1,064 | |
162
+ | Salt Pond twp., incl. Brownsville twp. | 2,526 | 2,895 | In 1871, part to Liberty. | Browning town ..... | 93 | | |
163
+ | Brownsville town ..... | 1,182 | | | Jackson township, incl. Pollock town. | 2,043 | 902 | |
164
+ | <b>SCHUYLER.</b> | | | | Pollock town ..... | 104 | | |
165
+ | Chariton twp., incl. Coatsville town .. | 765 | 833 | | Liberty township ..... | 1,063 | 772 | |
166
+ | Coatsville town ..... | 98 | | | Morris township ..... | 909 | 964 | |
167
+ | Fabius township ..... | 1,826 | 1,474 | | Penn township ..... | 1,713 | 1,744 | |
168
+ | Glenwood township ..... | 1,316 | 1,101 | | Pleasant Hill township ..... | 1,052 | 634 | |
169
+ | Independence township ..... | 1,496 | 1,115 | | Polk township, incl. Milan town ..... | 3,002 | 1,415 | |
170
+ | Liberty township, incl. Lancaster twp. | 1,729 | 1,529 | | Milan town ..... | 1,117 | 319 | |
171
+ | Lancaster town ..... | 528 | 427 | | Taylor township ..... | 856 | 628 | |
172
+ | Prairie township, incl. Queen City twp. | 2,227 | 1,653 | | Union township ..... | 1,106 | 1,222 | |
173
+ | Queen City town ..... | 357 | | | <b>TANEY.</b> | | | |
174
+ | Salt River twp., incl. Green Top vill .. | 1,111 | 1,115 | | Beaver township ..... | 893 | 581 | |
175
+ | Green Top village ..... | 220 | | | Big Creek township ..... | 656 | 267 | |
176
+ | <b>SCOTLAND.</b> | | | | Jasper township ..... | 625 | 615 | |
177
+ | Harrison township, incl. Arbela town .. | 1,804 | 1,491 | | Newton township ..... | 575 | 603 | |
178
+ | Arbela town ..... | 144 | | | Oliver township ..... | 869 | | In 1879, fr. part of Swan. |
179
+ | Jefferson twp., incl. Memphis town .. | 4,243 | 3,297 | | Scott township ..... | 742 | 554 | |
180
+ | Memphis town ..... | 1,418 | 1,007 | | Swan township ..... | 1,239 | 1,787 | In 1879, part to Oliver. |
181
+ | Johnson township ..... | 1,230 | 1,219 | | <b>TEXAS.</b> | | | |
182
+ | Miller township ..... | 1,227 | 1,245 | | Boone township ..... | 399 | 323 | |
183
+ | Mount Pleasant township ..... | 1,239 | 1,230 | | Burdine township ..... | 425 | 316 | |
184
+ | Sand Hill township ..... | 1,065 | 784 | | Carroll township ..... | 661 | 519 | |
185
+ | Union township ..... | 1,700 | 1,404 | | Cass township ..... | 1,122 | 779 | |
186
+ | <b>SCOTT.</b> | | | | Clinton township ..... | 1,145 | 721 | |
187
+ | Commerce twp., incl. Commerce city .. | 1,611 | 1,267 | | Current township ..... | 231 | | |
188
+ | Commerce city ..... | 440 | | | Jackson township ..... | 532 | 537 | |
189
+ | Kelso township ..... | 1,101 | 1,000 | | Lynch township ..... | 792 | 522 | |
190
+ | Moreland township, incl. the follow- | 1,371 | 2,613 | In 1872, parts to Morley | Morris township ..... | 1,080 | 539 | |
191
+ | ing villages: | | | and Sylvania. | Ozark township ..... | 476 | 638 | |
192
+ | Benton village ..... | 109 | | | | | | |
193
+ | New Hamburg village ..... | 103 | | | | | | |