AguaClara AIDE Document
This is a tool for combining .yaml data files with Markdown templates via the Jinja2 templating engine to produce complete Markdown/.pdf files.
Installation Instructions
aide_document
Installing
git
Via - Ensure that you have
git
installed by runninggit --version
. If you don't have it, get it here and configure it using these instructions. - Run
git clone https://github.com/AguaClara/aide_document.git
in the location of your choice.
If you choose to install via git
, be sure to put the aide_document/aide_document
subfolder in the same directory as the files that utilize the package.
pip
Via NOTE: the current pip
installation is nonfunctional at this time. Please git clone
this repository for the time being.
- Ensure that you have
pip
installed by runningpip -V
.pip
comes with Python 2 >=2.7.9 or Python 3 >=3.4, but if you don't have it, follow these instructions. - Run
pip install aide_document --user
anywhere.
Installing a LaTeX Engine
To convert Markdown to PDF using Pandoc, you must install TeX Live for your operating system. Here are installation files for each OS:
Installing Pandoc
Pandoc is required for converting Markdown files to PDF. More detailed instructions can be found here.
- Windows Installation File
- MacOS: in Terminal, run
brew install pandoc
- Linux Installation File
Using the Package
First, import the package at the top of your file:
from aide_document import convert
Within convert
, there are two methods with self-explanatory functions:
yaml_to_md(input_name, output_name, template_name)
md_to_pdf(input_filename, output_filename)
docx_to_md(input_filename, output_filename)
You can also translate the file on a line by line base:
from aide_document import translate
Within translate
, there is one methods with self-explanatory functions:
translate(input_name, source_language, target_language, output_name)
About
Semester Goals
The AIDE Document sub-team's goals for the Spring 2018 semester are to use Jinja2 to parse YAML input and convert it to Markdown/.pdf files conforming to templates provided by AIDE Design.
Team
Name | Role | |
---|---|---|
Matan Presberg | Lead | mgp64@cornell.edu |
Kevin Juan | RA | kj89@cornell.edu |
Karan Newatia | Member | kn348@cornell.edu |
Oliver Leung | Member | oal22@cornell.edu |
Yilin Lu | Member | yl668@cornell.edu |