iTranslated by AI
Released a Tool to Easily Generate PDFs from Markdown using Re:VIEW
I have created a Docker container image that allows for easy PDF generation from Markdown and published it to DockerHub.
You can create a PDF by running just two commands.
Under the hood, it is based on the Re:VIEW container image, with md2review installed and several support shell scripts added.
This entry introduces the usage for Windows consoles, but if you are running it in other environments, please refer to the following links:
Pull the Docker image
Execute the following command:
docker pull nuitsjp/mdview
Create the writing environment
Create the necessary configuration files for writing your document.
docker run --rm -v %cd%:/work nuitsjp/mdview /bin/sh -c "cd /work && mdview-init.sh document"
Since "document" is specified as an argument for mdview-init.sh, a subdirectory named "document" will be created, and the required files will be placed inside it.
If folder sharing between the host and guest does not work properly, please refer to this page.
Write your document
Open the "document.md" file inside the "document" folder and edit it as follows:
# Title
Hello, Re:View!
Build to PDF
After moving your current directory to the "document" folder, execute the following command to build the PDF:
docker run --rm -v %cd%:/work nuitsjp/mdview /bin/sh -c "cd /work && review-pdfmaker.sh config.yml"
Once the execution is complete, a PDF like the one below should be generated.

You can also generate a single PDF from multiple Markdown files by defining them in "catalog.yml". You can also control the details of the generated PDF by adjusting parameters.
Although the file extensions may differ, these aspects comply with Re:VIEW specifications, so please also refer to the Re:VIEW documentation.
That is all.
Please feel free to use it.
Discussion