Package: pymd
pymdDescriptionpymd is a command line wrapper forPython
Markdownlibrary but having a
full HTML file instead of only what it’s originally parsed.pymd can parse a file, a folder or a list of files (in a .list) in their
folder or to a specific one using-o. If the folder doesn’t exist,
it will be created.It includes all the extensions (extra (abbreviations, attributes lists,
definition lists, fenced code blocks, footnotes, tables, smart strong),
admonition, codehilite, headerid, meta, nl2br, sane_lists, toc,
wikilinks) and you can add your own with--extension.You can merge the files with the--mergeormergeflag. This is
where the .list is useful because it parses the files in order. If you
merge the files but don’t specify an-o, the script will take the
header parent folder as the filename or where the script runs.By default, the script embeds the css file in each document, but by
using the--css, the documents will link to the specified css. You
can switch between sans (default) or serif fonts with the--serifcommandThe header file is just a normal (markdown) file that is shared among
the “project” or is the header/title of the merged file. Thus it can
have, for example, metadata (title, author, date…), the TOC of the
merged files (using [TOC_HERE] placeholder), etc. The TOC’s depth can
be modified using--toc(by default it shows all the headings).The header can be specified with the--headeror using a file named_headerin the folder or .list.You can create a “book” using--bookorbook; it just add
navigational links in the documents and creates an index files which
links to them. There two “styles” of navigation links: “prev & next”
(default) and using the titles of the files with--nav. You can also
create a custom index file and name it_indexin the folder or
.list, or specify one with--indexUsage examplesIn same folder:pymd.py nicefile.mdProcess files in folder and create a book with serif font:pymd.py /myfolder book -o /output --serifProcess files in .list, merge them:pymd.py nice.list merge -o /output --header im_a_header.mdMore examples and explanation (with images, yay!) in thisblog
postFeaturesBatch process files (in folder or in a .list) with .md, .txt or
.markdown extensionsSpecify an output folder (with automatic creation)Includes all the extensions installed byPython
Markdownand you can even
specify your own!Merge files into one big HTML or create a little book with navigation
links (NEW! create your own index file)CSSed: leave the no-so-ugly embeded CSS (you can even switch between
sans and serif fonts) or link to one of your own if you prefer.Headers for files! So you can share the same metadata (like your
beautiful name and the creative title of your work) in all the files
or when you merge the files and forgot to include the main title of
your project.Wiki links:[](path)->[title linkedfile](file|output_path)Made with love <3Changelog0.5.5Modified configuration: now globalfix relatives paths (book)Wiki links to local files must use [](file|nice_file.md) syntax0.5.4code refactoring: to classes, def changes, vars…fix bug when using a .list & output folder (not having name)python 3.3 compatibility0.5.3check book pages for navigation (if only one file, disallow)fix book navigation bug (having 2 files, and linking next with the 2nd, when shouldn’t)fix: output path with one filefix: finding <h1>files are saved according to source dir treeoption to save files in one depth dirrelative links for bookwiki links parsing ( [](path) -> [title linked file](output_path) )custom index for bookminor python 3 compatibilitytoc depth filteringnavbar: change css, style links, titles for navbar (option)better handling for merge/book optionsfix: command line options0.5fix bug in output folder (merged files)book support (resulting html files will have navigational links)User can specify installed extensionsoutput folder support, with folder creationfixed bugshtml5fying0.3.list support (convert & merge files according order)filter files to parse by extensions0.2add merge optionadd embeded CSS0.1Created