This release is a pre-release and may not be stable for production use.
PageSequence
A page sequence is a short string that says which labels are printed on each page of a
document, such as a PDF. With it, a reference written in the labels printed in the publication,
such as "20-21", is turned into the right pages of the document.
pip install pagesequence
from pagesequence import PageSequence
# An unnumbered cover, roman front matter, then pages 1 to 48: 53 pages in all.
seq = PageSequence('"Omslag", i-iv, 1-48', 53)
seq.get_index_list("20-21") # [24, 25]: the document pages, counted from 0
seq.format_at(1) # "i"
Invalid input raises a PageSequenceError with kind and position; PageSequence.create
returns None instead. normalize, clean and equals work on sequence strings.
The plugin systems are imported from their own modules and passed in each call:
from pagesequence import normalize
from pagesequence.plugins.roman_additive import roman_additive
normalize("I, II, III, IIII, V", plugins=[roman_additive]) # "I-V/roman_additive"
The plugins are roman_additive, latin_sv, greek and hebrew. The package has no
dependencies and needs Python 3.11 or later.
The notation and the API are in the specification. PageSequence is part of publication-md. The code is under the MIT licence.
Metadata
Release files for pagesequence 2.0.0rc2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| pagesequence-2.0.0rc2.tar.gz | 13.0 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pagesequence-2.0.0rc2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 28.3 kB
Release files / pagesequence-2.0.0rc2.tar.gz
| Download URL | pagesequence-2.0.0rc2.tar.gz |
|---|---|
| Size | 13.0 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
875ec3c71d570c7631778b9223e0fe4f0c275011f79c94e5de3b0987354c8179
|
|
BLAKE2b-256 checksum How to use checksums |
0a632d3e818ea0045d55c6c4e84c957ebde0181342f81cb73dc9c51efea08e91
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Release files / pagesequence-2.0.0rc2-py3-none-any.whl
| Download URL | pagesequence-2.0.0rc2-py3-none-any.whl |
|---|---|
| Size | 15.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
3fb5f8af89d2c5ce540149029dff627ba0180b71252dbe206b58999bcb720831
|
|
BLAKE2b-256 checksum How to use checksums |
06b8d63ada34bc88392462da2db0792c09cf0e37d136783438487b0e4155a4ba
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
uv/0.13.1 {"installer":{"name":"uv","version":"0.13.1","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}
|
Security for pagesequence 2.0.0rc2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.