JeNeSuisPasDave / MarkdownTools

Markdown processing tools, including mdmerge
Mozilla Public License 2.0
78 stars 11 forks source link

Umlaut Problem running from Hazel #1

Closed wetty closed 10 years ago

wetty commented 10 years ago

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

JeNeSuisPasDave commented 10 years ago

I could not reproduce this problem on my system, perhaps because I don't have Hazel, but I took a guess at what might be causing the problem and addressed that issue. Please try 1.0rc4 and see whether it plays nice with Hazel now.

You can upgrade with:

pip install --pre --upgrade MarkdownTools2
wetty commented 10 years ago

Hello,

rc4 is working fine!

Hazel looks for changes in the markdown file with all the includes, then merges the file and finally generate a PDF out of it. That how I generate documentaion for my customers.

So thanks a lot

Regards Thomas

Dave Hein mailto:notifications@github.com

  1. März 2014 04:26

I could not reproduce this problem on my system, perhaps because I don't have Hazel, but I took a guess at what might be causing the problem and addressed that issue. Please try 1.0rc4 and see whether it plays nice with Hazel now.

You can upgrade with:

pip install --pre --upgrade MarkdownTools2

— Reply to this email directly or view it on GitHub https://github.com/JeNeSuisPasDave/MarkdownTools/issues/1#issuecomment-38527359.

Dipl.-Ing. (TU) Thomas Wetterer Breslauer Strasse 44 64579 Gernsheim Mobil: +49 163 8493889 Telefon: +49 6258 5102865-0 Telefax: +49 6258 5102865-9

JeNeSuisPasDave commented 10 years ago

Thanks for the quick feed back. A couple more bugs to fix and then I should be able to publish the stable release. :-)