Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/p3t3r67x0/markdown-converter
A tool to convert markdown with help of pandoc and LaTeX to pdf
https://github.com/p3t3r67x0/markdown-converter
converter latex markdown pandoc pdf
Last synced: 3 months ago
JSON representation
A tool to convert markdown with help of pandoc and LaTeX to pdf
- Host: GitHub
- URL: https://github.com/p3t3r67x0/markdown-converter
- Owner: p3t3r67x0
- License: mit
- Created: 2020-05-03T13:34:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2023-01-03T16:20:25.000Z (about 2 years ago)
- Last Synced: 2023-03-06T16:20:22.034Z (almost 2 years ago)
- Topics: converter, latex, markdown, pandoc, pdf
- Language: Python
- Homepage: https://reedo.me
- Size: 135 MB
- Stars: 6
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ๐ฐ markdown-converter
![mit license](https://img.shields.io/github/license/p3t3r67x0/markdown-converter)
![github build status](https://img.shields.io/github/workflow/status/p3t3r67x0/markdown-converter/markdown-converter)
![repository size](https://img.shields.io/github/repo-size/p3t3r67x0/markdown-converter)
![python version](https://img.shields.io/github/pipenv/locked/python-version/p3t3r67x0/markdown-converter)
![docker build](https://img.shields.io/docker/cloud/build/opendatacoder/markdown)> A tool to convert markdown with help of pandoc and LaTeX to pdf
![Write markdown and convert it to pdf](https://github.com/p3t3r67x0/markdown-converter/raw/master/docs/undraw.png)
This tool downloads all images from any online markdown repository and converts it with help of pandoc and LaTeX into a beautiful pdf. There is also an image converter integrated to convert anmimated gif or svg images into a png image. All together this tool turns text, images, links as well as emojies ๐ into a pdf file.
You can choose to build the markdown converter or to run the docker container
## ๐ฆ Docker Hub
Make use of the pre build docker image
```bash
docker pull opendatacoder/markdown
```## ๐ฆ Docker Usage
```bash
docker run --rm -v $PWD:/home/latex/data/output opendatacoder/markdown --format md \
--output readme --input https://raw.githubusercontent.com/repository/project/README.md
```In case you want to access the container you can run this command
```bash
docker run --rm -it --entrypoint /bin/bash opendatacoder/markdown
```## ๐งฑ Local Docker Setup
To run the docker container have a look at **Docker Usage** section
```bash
docker build -t markdown .
```## ๐งฑ Local Build Setup
```bash
# install build dependencies on debian or ubuntu
sudo apt install virtualenv python3.7 python3.7-dev \
pandoc gir1.2-rsvg-2.0 libcairo2-dev libgirepository1.0-dev \
python3-cairo python-gi-cairo python3-gi texlive-full# create a virtualenv
virtualenv -p /usr/bin/python3.7 venv# activate virtualenv
. venv/bin/activate# install dependencies
pip3 install -r requirements.txt
```## ๐งฑ Local Usage
Here you have a few usage examples which you can try as well on the Docker container
### ๐งพ Convert markdown to LaTeX and PDF
*HINT*: You can choose between different `--format` options like `md` or `gfm` and `html`.
Fetch all assets from a remote url and convert a markdown into a **LaTeX** file and render a **pdf**.
```bash
./convert.py --format md --output readme --input \
https://raw.githubusercontent.com/repository/project/README.md
```### ๐งพ Convert markdown to LaTeX
Use the `--dry` flag to not render a **pdf** file but convert the markdown into a **LaTeX** file with all fetched assets.
```bash
./convert.py --format md --output readme --dry --input \
https://raw.githubusercontent.com/repository/project/README.md
```