GithubHelp home page GithubHelp logo

jenesuispasdave / markdowntools Goto Github PK

View Code? Open in Web Editor NEW
77.0 77.0 11.0 553 KB

Markdown processing tools, including mdmerge

License: Mozilla Public License 2.0

JavaScript 0.16% Ruby 0.90% CSS 98.80% Shell 0.14%

markdowntools's People

Contributors

jenesuispasdave avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

markdowntools's Issues

Third include in sequence is ignored

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.

mdmerge not working as expected

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?

Process a file and return a new .md file as output

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?

mdmerge in python 2?

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.

Umlaut Problem running from Hazel

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 ==

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.