jenesuispasdave / markdowntools Goto Github PK
View Code? Open in Web Editor NEWMarkdown processing tools, including mdmerge
License: Mozilla Public License 2.0
Markdown processing tools, including mdmerge
License: Mozilla Public License 2.0
The mdmerge tools seems very interesting but I can't get it to work. When I use it, it just copy the input to the output.
(master *)$ mdmerge --export-target html -o t.html book.md
(master *)$ more t.html
<<[frontmatter.md]
<<[foreword.md]
<<[introduction.md]
<<[atoms.md]
<<[expressions.md]
<<[relations.md]
<<[fields.md]
<<[puzzles.md]
<footer>
This is the text that goes at the bottom of every page.
</footer>
(master *)$ mdmerge --version
mdmerge version 1.0.1
Copyright 2015 Dave Hein. Licensed under MPL-2.0.
Any ideas?
So as you can probably imagine, I'm after a markdown transclusion to merge multiple .md files to return another markdown file that should be later be processed by a static website generator.
Accordingly to the --export-target parameter your script support the most common formats but not markdown itself.
Is this possible?
rc3 is working fine with files that contain umlaut character.
But when I run the script from the OS X tool Hazel, I get the following error (it is running fine, when there are no umlauts)
2014-03-24 13:50:19.942 hazelworker[9852] DEBUG: New rule signature. Executing actions.
Old signature: (null)
New Signature:{(NOT dateModified hazelIsInTheLast: 1 Minute) AND dateMatched <[cd] dateModified AND ANY displayExtensions ==[cd] "txt" AND textContent containsText: "MdMerge: 1"}:{(shellscript:/Users/wetty/Dropbox/Notes/mergepdf.sh,{
})}
2014-03-24 13:50:20.217 hazelworker[9852] DEBUG: == script output ==
Traceback (most recent call last):
File "/usr/local/bin/mdmerge", line 9, in
load_entry_point('MarkdownTools2==1.0rc3', 'console_scripts', 'mdmerge')()
File "/Library/Python/2.7/site-packages/mdmerge/cli.py", line 377, in mdmerge_command
m.execute()
File "/Library/Python/2.7/site-packages/mdmerge/cli.py", line 346, in execute
merger.merge(infileNode, self.__outfile)
File "/Library/Python/2.7/site-packages/mdmerge/markdownMerge.py", line 853, in merge
elif self._isFileAnIndex(absInfilePath):
File "/Library/Python/2.7/site-packages/mdmerge/markdownMerge.py", line 386, in _isFileAnIndex
for line in idxfile:
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/encodings/ascii.py", line 26, in decode
return codecs.ascii_decode(input, self.errors)[0]
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 274: ordinal not in range(128)
== End script output ==
With version 1.0rc3, if I have three includes in a row, the third one is not processed (not included in the output).
For example:
My document is all of this ...
<<[file1.md]
<<[file2.md]
<<[file3.md]
In that case, the contents of file3.md
is not included in the output.
MultiMarkdown meta data is not being stripped from the included files. Marked does this, so mdmerge should as well.
I think this is extremely useful for an md workflow, that would be really useful as a macOS service or workflow.
However, I cannot get it to work in macOS Sierra with original system python 2. I'm not using sudo, and pip seems to install only the multimarkdown not the mdmerge directory.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.