No project description provided
Project description
PressProof
PressProof is a command-line tool designed for proofreading pressbook books. Given the a starting page URL, pressbook automatically crawls through each consecutive page, extracting text and identifying errors using an LLM of choice (restricted to OpenAI). Results are logged in realtime to a log file containing each error, the reason it was flagged, and their solutions!
Installation & Configuration
Assuming you have python installed, run:
pip install pressproof
PressProof makes use of the OpenAI API so you will need to set a OPENAI_API_KEY environment variable in order to use the tool. You can set a temporary environment variable for the terminal session as follow:
export OPENAI_API_KEY="<your_super_secret_key>"
Example Usage
Scanning a pressbook with default configuration:
pressproof --url <Starting page URL>
Sidenote: If you pass in the table of contents as the first page, PressProof will not automatically detect the next page. Only pass in the first page onwards.
Scanning a pressbook with maximum depth depth and a custom LLM condition:
pressproof --url <Starting page URL> --maddepth 10 --llmcondition <Custom condition>
pressproof --url https://ecampusontario.pressbooks.pub/auditinginformationsystems/chapter/0101/ --maxdepth 10 --llmcondition "Ignore grammatical mistakes involving apostrophes"
PressProof offers many more arguments that can be configured that were not directly covered above. If you would like to learn more about them and their usage, run pressproof --help in your terminal.
Custom Rules and LLM Conditions
If you would like to tune how you strict PressProof is, ignore certain types or errors, or only search for specific issues, PressProof provides an --llmcondition parameter. It is important to not however, that due to context window limitations, the default gpt-4o-mini model has a hard time following custom rules/conditions. It is recommended that you use a more advanced model such as gpt-4.1 via --model "gpt-4.1". Do note that this does bring the price/proofread up significantly.
As shown in the example below, each condition should be seperated by a return carraige \n.
PressProof --url https://ecampusontario.pressbooks.pub/auditinginformationsystems/chapter/0101/ --llmcondition "ONLY flag issues that change meaning or area clearly wrong\n IGNORE ALL issues about punctuation of dates, years, or decades (e.g. 1990s, 1990's)"
Outputs
Pressproof generates a log file in the current working directory on the fly, which means you can safely interrupt the proof read at any moment. The default output is written to pplog.txt however, a custom filename can be set using the --filename argument.
Output Log Format
===========================
| <Page Title> | <Page URL>
Quote: <Original Text> | Issue : <Explenation and Solution to error>
Risk Notice ⚠️
PressProof makes use of web scraping in order to pull information from each page. While Pressbook does not explicitely prohibit web scraping in their terms of service, site policies may change, and access could be restricted at any time.
Project details
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 pressproof-1.2.0.tar.gz.
File metadata
- Download URL: pressproof-1.2.0.tar.gz
- Upload date:
- Size: 9.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
620cd4935fc0d19e24c0602f3f24f98d17b60357ef3cc9f458d7a4911ea43044
|
|
| MD5 |
479cb88dd950e3269fb0695ec843722d
|
|
| BLAKE2b-256 |
d75a2133ccd5b623c704774294da816359d5407ddaa805f0de515f7bb1cf3af6
|
File details
Details for the file pressproof-1.2.0-py3-none-any.whl.
File metadata
- Download URL: pressproof-1.2.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.11.6
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d8020409a2451f37a382e8bf1da19e317a07e6ab2b7a5e525be993a30341ec41
|
|
| MD5 |
e9a74f5938bc0e1cafd8ef6b695c5f7b
|
|
| BLAKE2b-256 |
e8fe7420f6fb8b2563caf7bd9d3339730c415f1efbc727cc9b951c31ded9ee39
|