Package: md2pdf-client
md2pdf ClientIntroductionmd2pdf is a little project that aims to make it easy to produce
professional-looking PDF documents from Markdown files via a LaTeX template and
the help of Pandoc.There are several motivations for this:Word processor software does not work very nicely with version control, plain-text Markdown files doCollaborating on a single ODT/DOC file is prone to overwriting others' workLibreOffice and Word both suck with automatic figure and table numbering on long files, and with TOCs etcIt's painful trying to keep everyone using the right font, spacing, formatting, etc. when collaborating with ODT/DOC filesPDF output from LibreOffice and Word often looks pretty averageIt's distracting having to worry about formatting while writing - Markdown takes away all but the most basic formatting options to focus you on writingWith with an appropriate template, LaTeX PDF output is undeniably the prettiest-
looking way to create documents. But, learning LaTeX is hard. Markdown
is much easier to use, and when used with Pandoc can still produce superb PDF
documents. md2pdf makes it simple to manage having the right LaTeX templates and
configuration across a whole team, by using a central server to do the PDF
generation and then share the result with those who need it.Client applicationThis simple Python program is the md2pdf client application. It is intended to
be used with anmd2pdf-webserverinstance, running locally or remotely.
Seethe md2pdf-webserver hompage for more informationUsageUsage is quite simple, runmd2pdf-client -hfor more information:md2pdf client v1.3.0 - connect to an md2pdf server and create a PDF file

positional arguments:
  FILEPATH              Input Markdown file to be converted

optional arguments:
  -h, --help            show this help message and exit
  -c FILEPATH, --compare FILEPATH
                        Activates 'compare' mode. Specify the file to compare
                        changes with, e.g.: 'md2pdf-client --compare
                        path/file-old.md path/file-new.md'
  --set-default OPTION VALUE
                        Change a default value for an option. Use the full
                        argument name, separated by a space, e.g.: '--set-
                        default proto https' or '--set-default server
                        192.168.1.1:9090'
  -s ADDRESS[:PORT], --server ADDRESS[:PORT]
                        Server address to request PDF generation from. Use
                        hostname or IP address, and port number if required
                        (i.e. '127.0.0.1:9090', or 'my-host.com:8888'). If
                        port is not specified, port 80 will be used
  --proto {http,https}  Protocol to use
  -t TEMPLATE, --template TEMPLATE
                        Template to use, instead of the server default
                        (include the file extension)Usage hintsDon't forget to set a default port when you set the default server! You probably won't be using port 80, so make sure you set it correctly, with something likemd2pdf-client --set-default server 1.2.3.4:9090ormd2pdf-client --set-default server hostname.tld:9090. Don't include the protocol here.md2pdf-webserverby default doesn't do HTTPS - but it would be possible to put it behind a HTTPS reverse proxy. If that is the case, don't forget to set the default protocol withmd2pdf-client --set-default proto httpsIf you use the--templateoption, don't forget that the template must also exist in the server - you can't use a local template (at least not yet).If something doesn't work on the server end, you should get a.logfile in the same directory as your input Markdown file - take a look in there for more information.If something doesn't work on the client end, it can be helpful to runmd2pdf-clientfrom the command line to check the output.Compare mode can only be used from the command-line, it won't show up in the "Open With" menu. Use the flag--comparefollowed by the path to theoldversion, then the path to thenewversion. The output PDF will be in the location of the new Markdown version. Images are removed in compare mode.InstallationPyPimd2pdf-clientis available through thePython Package Index(PyPi), it can be installed throughpip:$ python3 -m pip install md2pdf-clientThis should work on Linux, Windows, and OS X (and really anywhere that Python 3 can run)Snap Packagemd2pdf-clientis available as an Ubuntu Snap package. You can install it with :$ sudo snap install md2pdf-clientThe packaging is done automatically by Launchpad, based on the Snapcraft configin this repo.Direct Python scriptmd2pdf-clientcan also be run as a Python script (typically only needed during development):python3 -m md2pdf_client.md2pdf_client -f <file>LicenseThis project is released under the terms of the GNU Affero GPL version 3 (or
later). Please seeLICENSEfor details.ThanksThe base of my (very crappy) icon is from the standardGNOME icons. These are GPL licensed.