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
Hashes for letterparser-0.13.0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a07e38b87bf128e8ad2a01eca7afd3c33b22d0312bbecc2d1cfd533893caf60d |
|
MD5 | 0fac775a5b4f70a80fbe2907d9dcc5a0 |
|
BLAKE2b-256 | 1f25494ee6af4ce2cca0e8ee06038b04101344f7ad03ad25579ccf0fc999bf75 |