Skip to main content

decision-letter-parser

Parse docx file containing decision letter and author response content and produce output in other formats.

The contents of the .docx must follow a specific formatting scheme for it to be separated out into multiple JATS XML <sub-article> tags, and for figure and table data to be recognised.

Requirements

Parsing .docx files requires pandoc, and there are two options to make it available.

  1. Install pandoc so it can be executed locally, or
  2. Install docker and pandoc can be called using the docker_image specified in the letterparser.cfg configuration file

Example usage

This library is meant to be integrated into another operational system, however the following are examples using interactive Python:

Example 1 - Convert a test fixture zip containing a .docx and asset files

>>> from letterparser import generate
>>> jats_xml = generate.generate_xml_from_file("tests/test_data/elife-00666.zip")

Example 2 - Convert just a .docx file only

>>> from letterparser import generate
>>> jats_xml = generate.generate_xml_from_file("tests/test_data/elife-68041.docx")

License

Licensed under MIT.

Metadata

Release files for letterparser 0.14.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for letterparser 0.14.0
File Size Uploaded Provenance Actions
letterparser-0.14.0.tar.gz 19.0 kB Without provenance Details for letterparser-0.14.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for letterparser 0.14.0
File Interpreter ABI Platform Actions
letterparser-0.14.0-py3-none-any.whl Python 3 none any Details for letterparser-0.14.0-py3-none-any.whl

Total release size: 39.5 kB

Release files / letterparser-0.14.0.tar.gz

Download URL letterparser-0.14.0.tar.gz
Size 19.0 kB
Tags Source
SHA-256 checksum
How to use checksums
eb6f600c2a7081710f7c607e88538c35767c4542c2032084a4a539af2f7d11a1
BLAKE2b-256 checksum
How to use checksums
587a34ac1fb3be6c0555f1a332414bf963029229c699a3f69180e42b2a7cd873
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Release files / letterparser-0.14.0-py3-none-any.whl

Download URL letterparser-0.14.0-py3-none-any.whl
Size 20.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3a5463dc04b003aa82506d325a67f185c686f9c6ce34ab3512fd0a0c998d836b
BLAKE2b-256 checksum
How to use checksums
b107efbdbafcf0d135d094199f69d368565985f9fd536ded94dfa650d3abc68a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.8.10

Security for letterparser 0.14.0

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.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page