Decision letter and author response document parser.
Project description
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.
- Install pandoc so it can be executed locally, or
- Install docker and
pandoc
can be called using thedocker_image
specified in theletterparser.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.
Project details
Release history Release notifications | RSS feed
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
File details
Details for the file letterparser-0.14.0.tar.gz
.
File metadata
- Download URL: letterparser-0.14.0.tar.gz
- Upload date:
- Size: 19.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | eb6f600c2a7081710f7c607e88538c35767c4542c2032084a4a539af2f7d11a1 |
|
MD5 | a177fe3f0a7d73285c087b43a72c642d |
|
BLAKE2b-256 | 587a34ac1fb3be6c0555f1a332414bf963029229c699a3f69180e42b2a7cd873 |
File details
Details for the file letterparser-0.14.0-py3-none-any.whl
.
File metadata
- Download URL: letterparser-0.14.0-py3-none-any.whl
- Upload date:
- Size: 20.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3a5463dc04b003aa82506d325a67f185c686f9c6ce34ab3512fd0a0c998d836b |
|
MD5 | 69883d00279c7a3474e3af2b8044796f |
|
BLAKE2b-256 | b107efbdbafcf0d135d094199f69d368565985f9fd536ded94dfa650d3abc68a |