To Markdown macro

Get help using and writing Nisus Writer Pro macros.
Post Reply
tomoyuki-kosaka
Posts: 41
Joined: 2009-02-17 17:44:12

To Markdown macro

Post by tomoyuki-kosaka » 2017-08-21 17:49:04

Previously, I asked here about a macro for converting NWP file to Markdown format.
Just briefly, I made a not sophisticated one.
It is based on "Copy as HTML v3.3" macro by @loulesko.
And, @philip also helped me.

This macro worked for me as expect but I'm not sure about other files and situations.
It can handle, table, image, URL embedded file.
If someone use and find usefulness or improve points for this, it's very happy to me.
If you have some comment, please send it to me.
Anyway, I post this code.
Attachments
To Markdown.nwm
(36.08 KiB) Downloaded 764 times

Groucho
Posts: 496
Joined: 2007-03-03 09:55:06
Location: Europe

Re: To Markdown macro

Post by Groucho » 2017-08-26 03:30:26

Thank you very much, Tomoyuki!

Henry.

Axbax
Posts: 12
Joined: 2017-02-04 11:55:59

Re: To Markdown macro

Post by Axbax » 2018-01-14 08:28:18

Hi,
I have been trying to make this work, but it only changes Heading 1 to # and removes style from ordered lists. The rest of the document is still styled. Am I doing something wrong (style names are default as required in the macro) or is there an update to this macro that I could try?
Thanks for your help!
Ken

User avatar
phspaelti
Posts: 1001
Joined: 2007-02-07 00:58:12
Location: Japan

Re: To Markdown macro

Post by phspaelti » 2018-01-15 05:49:21

Axbax wrote:Hi,
I have been trying to make this work, but it only changes Heading 1 to # and removes style from ordered lists. The rest of the document is still styled. Am I doing something wrong (style names are default as required in the macro) or is there an update to this macro that I could try?
It seems that Tomoyuki left some kind of unusual language formatting on parts of the macro. Since the macro uses styled find and replace in his macro, those statements won't work for most people.

Here is a version with extraneous formatting removed:
Attachments
To Markdown.nwm
(23.96 KiB) Downloaded 752 times
philip

Axbax
Posts: 12
Joined: 2017-02-04 11:55:59

Re: To Markdown macro

Post by Axbax » 2018-01-16 00:22:44

Excellent, thanks!

tomoyuki-kosaka
Posts: 41
Joined: 2009-02-17 17:44:12

Re: To Markdown macro

Post by tomoyuki-kosaka » 2018-02-01 17:20:46

Sorry for the trouble, Axbax. I did not check this form a while.
And, thank you phspaelti! I appreciate your help!

Honestly, I'm not heavy user of this macro...
I'll try to use and improve this.

Axbax
Posts: 12
Joined: 2017-02-04 11:55:59

Re: To Markdown macro

Post by Axbax » 2019-02-21 11:41:06

Hi, it's been a while since I used this and now that I needed it, it doesn't seem to work anymore. Any thoughts? Any updates?
Thanks in advance!
Ken

User avatar
martin
Official Nisus Person
Posts: 4509
Joined: 2002-07-11 17:14:10
Location: San Diego, CA
Contact:

Re: To Markdown macro

Post by martin » 2019-02-25 14:30:23

What about the second macro (as posted by philip) doesn't work for you Ken? I just tried a quick test with a bit of formatting, headings, and links and the Markdown macro worked just fine.

tomoyuki-kosaka
Posts: 41
Joined: 2009-02-17 17:44:12

Re: To Markdown macro

Post by tomoyuki-kosaka » 2019-03-27 16:23:55

Probably, the macro should include "Paragraph styles" for exchange the "Headings".
I also remake macro as third one.
Please try this.
Attachments
To Markdown.nwm
(39.92 KiB) Downloaded 585 times

Post Reply