Re: [Zim-wiki] Proof of Concept markdown export for zim
On Sat, Feb 18, 2012 at 4:27 AM, hans...@gmail.com wrote: On Sat, Feb 18, 2012 at 4:32 AM, Jaap Karssenberg jaap.karssenb...@gmail.com wrote: Ok, so I now merge support for exporting pandoc markdown to zim. It is in rev494 of the main trunk. Will be in next release in a couple of weeks. Excellent Jaap, thanks, and the within-Zim paste-as is a great bonus as well. Also for the quick work on the case-only name-change bug. Unfortunately I'll need to wait for the binaries - should I be able to just drop them in as replacements to the PortableApps.com folders? Don't know - don't make the installer myself. Finally, how did you resolve the first few necessary issues you posted - I think checkboxes and paths? For checkboxes I use list bullets followed by an utf-8 checkbox character. This way the items flow in bullets lists as intended. For link I use the same semantics as I use for HTML export. Regards, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
Features work beautifully, Jaap. Thanks! - Kurt On Fri, Feb 17, 2012 at 4:32 PM, Jaap Karssenberg jaap.karssenb...@gmail.com wrote: Ok, so I now merge support for exporting pandoc markdown to zim. It is in rev494 of the main trunk. Will be in next release in a couple of weeks. If you want it early there is an Ubuntu PPA with daily builds here: https://launchpad.net/~jaap.karssenberg/+archive/zim-snapshots . And of course you can also grep the source from launchpad. Added Markdown also as Copy As format, so in zim you can select some text, right click it and the context menu will have a Copy As sub menu with Markdown in there. Might make it easier pasting directly into emails / websites etc. Same option also allows you to configure markdown as default format for copy paste. Enjoy ! Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
On Sat, Feb 18, 2012 at 4:32 AM, Jaap Karssenberg jaap.karssenb...@gmail.com wrote: Ok, so I now merge support for exporting pandoc markdown to zim. It is in rev494 of the main trunk. Will be in next release in a couple of weeks. Excellent Jaap, thanks, and the within-Zim paste-as is a great bonus as well. Also for the quick work on the case-only name-change bug. Unfortunately I'll need to wait for the binaries - should I be able to just drop them in as replacements to the PortableApps.com folders? Finally, how did you resolve the first few necessary issues you posted - I think checkboxes and paths? ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
Jaap (and all) Finally got around to trying the proof-of-concept script. Have to say it worked beautifully. I took my most complicated zim article, replete with special arrow characters that I have mapped in zim, New Testament Greek words, and most if not all of the formatting options available in zim. First experience after running the resulting markdown through pandoc to generate html was marginal. Then, after realizing that --standalone might be helpful (pandoc newbie here) - results were magnificent. Only issue I had is concatenating sequential lines. In zim I can use: Here's a list: * item 1 * item 2 but it comes out in the html as Here's a list: * item 1 * item 2 Fix, of course, was to put a blank line between the line and the list. Similar issue happens with any set of sequential lines. I know this is probably a tweak - or I can change my habits too for that matter. Having the translation capability is very helpful. I use Simplenote - which reads markdown, so pasting the translated markup into Simplenote gives me an on-line copy of any zim article I want. Similarly, I like Instapaper for capturing web pages for reading, and use Instafetch on my Android tablet to grab offline copies of the same. Turns out that I can send the html generated by pandoc to my Instapaper account, and then I will have an offline version of the rendered markup on my tablet as well. This is handy for having on-the-go access to rendered articles that I have written up in zim. Great job Jaap - I know this is proof-of-concept - but it is already production quality in my book. - Kurt On Fri, Jan 27, 2012 at 4:52 AM, Jaap Karssenberg jaap.karssenb...@gmail.com wrote: Dear all, Attached a quick and dirty proof of concept for converting zim formatting into markdown with pandoc extensions. This script takes a file name for a zim page as argument and outputs markdown to stdout. If the people interested in this could go ahead and test it I can include it in the next version of zim as an export option. The script requires zim to be installed, or at least to have zim modules in the path. To test it I suggest: 1) Create a page in the zim GUI with lots of markup 2) Convert it to markdown using this script and check if it looks as expected 3) Convert to html/pdf/... with pandoc and check again if it looks as expected Feel free to mail any test results to me personally or put a bug in the zim bug tracker. Open issues questions: 1) How to deal with checkbox lists ? Current I leave them in the same syntax as zim (using [ ], [*] and [x]) but this will not translate well in pandoc's interpretation 2) How should we link to other files when exporting a notebook ? I can link the file as file:///path/to/file.txt or as ./file.txt 3) How to deal with underline / mark formatting ? Now rendering as bold, which is acceptable for the time being 4) How to deal with indented paragraphs in zim ? Now ignoring any indenting, because it would turn paragraphs into verbatim in markdown 5) How to deal with image properties, like setting width and height ? 6) How to deal with with tags (and in the future anchors) ? For now will just put them in as plain text 7) How to deal with inline objects ? (This is a future feature being tested, allows plugins to do custom rendering for a block of data.) Probably can re-use syntax for verbatim with code highlighting properties - e.g. ask to highlight as x-zim-plugin-foo. This will be transparent as verbatim text if not supported. For proper export at least item 1) and 2) need to be addressed. Other can be ignored because there is at least a fallback behavior that will not mess up parsing in pandoc, and export is a one-way process. However for native support in zim (which means storing all pages directly in markdown) also 3) to 7) need to be addressed to make sure we can write a page and then read it again getting the exact same content. (And probable I forgot a few, but this is what I saw so far.) Regards, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
On Fri, Feb 10, 2012 at 7:50 PM, kwood...@gmail.com kwood...@gmail.comwrote: Only issue I had is concatenating sequential lines. In zim I can use: Here's a list: * item 1 * item 2 but it comes out in the html as Here's a list: * item 1 * item 2 Fix, of course, was to put a blank line between the line and the list. Similar issue happens with any set of sequential lines. I know this is probably a tweak - or I can change my habits too for that matter. Thanks for the catch - will add that tweak to the export code. Having the translation capability is very helpful. I use Simplenote - which reads markdown, so pasting the translated markup into Simplenote gives me an on-line copy of any zim article I want. Memo to self: add markdown also as Copy As format in context menu. Great job Jaap - I know this is proof-of-concept - but it is already production quality in my book. Afraid there are at least two issues preventing me from including it in the next release: 1) How to deal with checkbox lists ? Current I leave them in the same syntax as zim (using [ ], [*] and [x]) but this will not translate well in pandoc's interpretation 2) How should we link to other files when exporting a notebook ? I can link the file as file:///path/to/file.txt or as ./file.txt Maybe someone on the list has a suggestion ? Thanks, Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
On Fri, Feb 10, 2012 at 8:56 PM, John MacFarlane fiddlosop...@gmail.comwrote: +++ Jaap Karssenberg [Feb 10 12 20:08 ]: 1) How to deal with checkbox lists ? Current I leave them in the same syntax as zim (using [ ], [*] and [x]) but this will not translate well in pandoc's interpretation Maybe you could make them definition lists; the definition term could be [ ], [*], or [x]. In that case it would probably be better to create a bullet with a checkbox behind it, like: * [ ] OK * [x] NOK That way it will at least flow as intended with other list items. Could use images for the checkboxes, but afraid that will make the markdown very convoluted. -- Jaap ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp
Re: [Zim-wiki] Proof of Concept markdown export for zim
On Saturday, February 11, 2012 3:04:46 AM UTC+7, Jaap Karssenberg wrote: Maybe you could make them definition lists; the definition term could be [ ], [*], or [x]. In that case it would probably be better to create a bullet with a checkbox behind it, like: * [ ] OK * [x] NOK That way it will at least flow as intended with other list items. Could use images for the checkboxes, but afraid that will make the markdown very convoluted. Great to see progress on this, I'm afraid I've been caught up in a shaving the yak recursion, got Python installed but still setting up my pandoc environment - stuck on figuring out make. Yes, I'd say if images were wanted, leave that for a supplementary script for the from-markdown conversion in conjunction with Pandoc; shouldn't be a problem as long as your resulting markdown weren't a naturally occuring combination. Actually since everything is unicode-aware these days I have to believe there are suitable glyphs that can just be passed through as straight characters? I mean if this pile of cr^phttp://www.jwz.org/blog/2012/02/unicode-character-pile-of-poo-u1f4a9/made it in! OK, google says: U+2610 = ☐ U+2611 = ☑ U+2612 = ☒ Regarding the file paths issue, just thinking aloud, if we have to go one way or the other my vote is to relative link to the same directory as the .PMD source file, and have your export routine copy the image files. However the ideal IMO would be to make this a configurable choice, ideally very flexible of course, but if not to start with, at least a choice between the above and a {docroot}/images folder. Is there a location we can pull your changes as you make them for testing purposes? ___ Mailing list: https://launchpad.net/~zim-wiki Post to : zim-wiki@lists.launchpad.net Unsubscribe : https://launchpad.net/~zim-wiki More help : https://help.launchpad.net/ListHelp