public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
* opml > markdown convert (but with my own rules)
@ 2018-03-08 22:01 mvalle-dVO3j+d89GJhl2p70BpVqQ
       [not found] ` <ac5dfbf3-b769-42ec-8027-05dcb6bbedc1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: mvalle-dVO3j+d89GJhl2p70BpVqQ @ 2018-03-08 22:01 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 2177 bytes --]

Hey there !

I'm using pandoc along with hazel <https://www.noodlesoft.com> to convert 
my Mindnode <https://mindnode.com> OPML exports to ulysses 
<https://ulyssesapp.com>.

My workflow is this one :
1. Create an outline with Mindnode & export it to OPML
2. Let hazel auto-convert it to commonmark with a script :
pandoc "$1" -t commonmark -o "$1"
3. Open that markdown file in ulysses and start writing from there.

This is very useful but I'd be even more happy if pandoc could convert it 
in my own needs.

If I have this OPML file :
<?xml version="1.0" encoding="UTF-8"?>
<opml version="1.0">
<head>
<title>Plan type - Titre du projet</title>
</head>
<body>
<outline text="Titre du projet"><outline text="Partie 1"></outline>
<outline text="Partie 2" _note="Blablabla"><outline text="Sous-partie A" 
_note="kdfmsdqlkgqn"></outline>
<outline text="Sous-partie B"><outline text="Sous-sous-partie 
(1)"></outline>
<outline text="Sous-sous-partie (2)"></outline>
</outline>
</outline>
</outline>
</body>
</opml>

pandoc convert it to :
# Titre du projet

## Partie 1

## Partie 2

Blablabla

### Sous-partie A

kdfmsdqlkgqn

### Sous-partie B

#### Sous-sous-partie (1)

#### Sous-sous-partie (2)

I'd like to have :
# Titre du projet

### Partie 1

### Partie 2

%% Blablabla

#### Sous-partie A

%% kdfmsdqlkgqn

#### Sous-partie B

##### Sous-sous-partie (1)

##### Sous-sous-partie (2)


Titles should rise by one level (excepted Title "#") and plain text should 
ideally have "%% " prefix.

Does that seem possible to you ?

Many thanks for your help if you can help me !!

Best regards,
Matthieu 


-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/ac5dfbf3-b769-42ec-8027-05dcb6bbedc1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6270 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: opml > markdown convert (but with my own rules)
       [not found] ` <ac5dfbf3-b769-42ec-8027-05dcb6bbedc1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-12-01 16:17   ` Richard Holmes
       [not found]     ` <1633f745-1737-4c6c-9cd1-766e3c0a9bda-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: Richard Holmes @ 2018-12-01 16:17 UTC (permalink / raw)
  To: pandoc-discuss


[-- Attachment #1.1: Type: text/plain, Size: 3058 bytes --]

I found your post when trying to figure out how to customize Pandoc myself. 
I'd like to go from OPML to Markdown, but instead of outlining in header 
levels, use ordered lists. This would produce an output with bullet points 
rather than varying font sizes and styles, which I find a bit difficult see 
the outline structure in.

If anyone has suggestions on the fastest path: 

   - There's already an option in Pandoc that I just don't know about?
   - Post-process the Pandoc Markdown?
   - Use a filter?
   - Add an option to the code?

Any suggestions on the best avenue to explore would be much appreciated.

Thanks,
-Richard.

On Thursday, March 8, 2018 at 4:01:52 PM UTC-6, mva...-dVO3j+d89GJhl2p70BpVqQ@public.gmane.org wrote:
>
> Hey there !
>
> I'm using pandoc along with hazel <https://www.noodlesoft.com> to convert 
> my Mindnode <https://mindnode.com> OPML exports to ulysses 
> <https://ulyssesapp.com>.
>
> My workflow is this one :
> 1. Create an outline with Mindnode & export it to OPML
> 2. Let hazel auto-convert it to commonmark with a script :
> pandoc "$1" -t commonmark -o "$1"
> 3. Open that markdown file in ulysses and start writing from there.
>
> This is very useful but I'd be even more happy if pandoc could convert it 
> in my own needs.
>
> If I have this OPML file :
> <?xml version="1.0" encoding="UTF-8"?>
> <opml version="1.0">
> <head>
> <title>Plan type - Titre du projet</title>
> </head>
> <body>
> <outline text="Titre du projet"><outline text="Partie 1"></outline>
> <outline text="Partie 2" _note="Blablabla"><outline text="Sous-partie A" 
> _note="kdfmsdqlkgqn"></outline>
> <outline text="Sous-partie B"><outline text="Sous-sous-partie 
> (1)"></outline>
> <outline text="Sous-sous-partie (2)"></outline>
> </outline>
> </outline>
> </outline>
> </body>
> </opml>
>
> pandoc convert it to :
> # Titre du projet
>
> ## Partie 1
>
> ## Partie 2
>
> Blablabla
>
> ### Sous-partie A
>
> kdfmsdqlkgqn
>
> ### Sous-partie B
>
> #### Sous-sous-partie (1)
>
> #### Sous-sous-partie (2)
>
> I'd like to have :
> # Titre du projet
>
> ### Partie 1
>
> ### Partie 2
>
> %% Blablabla
>
> #### Sous-partie A
>
> %% kdfmsdqlkgqn
>
> #### Sous-partie B
>
> ##### Sous-sous-partie (1)
>
> ##### Sous-sous-partie (2)
>
>
> Titles should rise by one level (excepted Title "#") and plain text should 
> ideally have "%% " prefix.
>
> Does that seem possible to you ?
>
> Many thanks for your help if you can help me !!
>
> Best regards,
> Matthieu 
>
>
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1633f745-1737-4c6c-9cd1-766e3c0a9bda%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 6737 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: opml > markdown convert (but with my own rules)
       [not found]     ` <1633f745-1737-4c6c-9cd1-766e3c0a9bda-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
@ 2018-12-01 20:16       ` John MacFarlane
       [not found]         ` <m2a7lp2ea6.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
  0 siblings, 1 reply; 4+ messages in thread
From: John MacFarlane @ 2018-12-01 20:16 UTC (permalink / raw)
  To: Richard Holmes, pandoc-discuss


Your best bet is probably using a lua filter.  See
the hierarchicalize function in the documentation.
https://pandoc.org/lua-filters.html
This will create a hierarchical structure based
on the headings; you then have only to convert this
into a list.

Richard Holmes <rholmes777-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:

> I found your post when trying to figure out how to customize Pandoc myself. 
> I'd like to go from OPML to Markdown, but instead of outlining in header 
> levels, use ordered lists. This would produce an output with bullet points 
> rather than varying font sizes and styles, which I find a bit difficult see 
> the outline structure in.
>
> If anyone has suggestions on the fastest path: 
>
>    - There's already an option in Pandoc that I just don't know about?
>    - Post-process the Pandoc Markdown?
>    - Use a filter?
>    - Add an option to the code?
>
> Any suggestions on the best avenue to explore would be much appreciated.
>
> Thanks,
> -Richard.
>
> On Thursday, March 8, 2018 at 4:01:52 PM UTC-6, mva...-dVO3j+d89GJhl2p70BpVqQ@public.gmane.org wrote:
>>
>> Hey there !
>>
>> I'm using pandoc along with hazel <https://www.noodlesoft.com> to convert 
>> my Mindnode <https://mindnode.com> OPML exports to ulysses 
>> <https://ulyssesapp.com>.
>>
>> My workflow is this one :
>> 1. Create an outline with Mindnode & export it to OPML
>> 2. Let hazel auto-convert it to commonmark with a script :
>> pandoc "$1" -t commonmark -o "$1"
>> 3. Open that markdown file in ulysses and start writing from there.
>>
>> This is very useful but I'd be even more happy if pandoc could convert it 
>> in my own needs.
>>
>> If I have this OPML file :
>> <?xml version="1.0" encoding="UTF-8"?>
>> <opml version="1.0">
>> <head>
>> <title>Plan type - Titre du projet</title>
>> </head>
>> <body>
>> <outline text="Titre du projet"><outline text="Partie 1"></outline>
>> <outline text="Partie 2" _note="Blablabla"><outline text="Sous-partie A" 
>> _note="kdfmsdqlkgqn"></outline>
>> <outline text="Sous-partie B"><outline text="Sous-sous-partie 
>> (1)"></outline>
>> <outline text="Sous-sous-partie (2)"></outline>
>> </outline>
>> </outline>
>> </outline>
>> </body>
>> </opml>
>>
>> pandoc convert it to :
>> # Titre du projet
>>
>> ## Partie 1
>>
>> ## Partie 2
>>
>> Blablabla
>>
>> ### Sous-partie A
>>
>> kdfmsdqlkgqn
>>
>> ### Sous-partie B
>>
>> #### Sous-sous-partie (1)
>>
>> #### Sous-sous-partie (2)
>>
>> I'd like to have :
>> # Titre du projet
>>
>> ### Partie 1
>>
>> ### Partie 2
>>
>> %% Blablabla
>>
>> #### Sous-partie A
>>
>> %% kdfmsdqlkgqn
>>
>> #### Sous-partie B
>>
>> ##### Sous-sous-partie (1)
>>
>> ##### Sous-sous-partie (2)
>>
>>
>> Titles should rise by one level (excepted Title "#") and plain text should 
>> ideally have "%% " prefix.
>>
>> Does that seem possible to you ?
>>
>> Many thanks for your help if you can help me !!
>>
>> Best regards,
>> Matthieu 
>>
>>
>>
>
> -- 
> You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
> To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/1633f745-1737-4c6c-9cd1-766e3c0a9bda%40googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: opml > markdown convert (but with my own rules)
       [not found]         ` <m2a7lp2ea6.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
@ 2018-12-03  0:46           ` Richard Holmes
  0 siblings, 0 replies; 4+ messages in thread
From: Richard Holmes @ 2018-12-03  0:46 UTC (permalink / raw)
  To: jgm-TVLZxgkOlNX2fBVCVOL8/A; +Cc: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw

[-- Attachment #1: Type: text/plain, Size: 4516 bytes --]

Thanks! This is a pointer in the right direction...

On Sat, Dec 1, 2018 at 2:17 PM John MacFarlane <jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org> wrote:

>
> Your best bet is probably using a lua filter.  See
> the hierarchicalize function in the documentation.
> https://pandoc.org/lua-filters.html
> This will create a hierarchical structure based
> on the headings; you then have only to convert this
> into a list.
>
> Richard Holmes <rholmes777-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> writes:
>
> > I found your post when trying to figure out how to customize Pandoc
> myself.
> > I'd like to go from OPML to Markdown, but instead of outlining in header
> > levels, use ordered lists. This would produce an output with bullet
> points
> > rather than varying font sizes and styles, which I find a bit difficult
> see
> > the outline structure in.
> >
> > If anyone has suggestions on the fastest path:
> >
> >    - There's already an option in Pandoc that I just don't know about?
> >    - Post-process the Pandoc Markdown?
> >    - Use a filter?
> >    - Add an option to the code?
> >
> > Any suggestions on the best avenue to explore would be much appreciated.
> >
> > Thanks,
> > -Richard.
> >
> > On Thursday, March 8, 2018 at 4:01:52 PM UTC-6, mva...-dVO3j+d89GJhl2p70BpVqQ@public.gmane.org wrote:
> >>
> >> Hey there !
> >>
> >> I'm using pandoc along with hazel <https://www.noodlesoft.com> to
> convert
> >> my Mindnode <https://mindnode.com> OPML exports to ulysses
> >> <https://ulyssesapp.com>.
> >>
> >> My workflow is this one :
> >> 1. Create an outline with Mindnode & export it to OPML
> >> 2. Let hazel auto-convert it to commonmark with a script :
> >> pandoc "$1" -t commonmark -o "$1"
> >> 3. Open that markdown file in ulysses and start writing from there.
> >>
> >> This is very useful but I'd be even more happy if pandoc could convert
> it
> >> in my own needs.
> >>
> >> If I have this OPML file :
> >> <?xml version="1.0" encoding="UTF-8"?>
> >> <opml version="1.0">
> >> <head>
> >> <title>Plan type - Titre du projet</title>
> >> </head>
> >> <body>
> >> <outline text="Titre du projet"><outline text="Partie 1"></outline>
> >> <outline text="Partie 2" _note="Blablabla"><outline text="Sous-partie
> A"
> >> _note="kdfmsdqlkgqn"></outline>
> >> <outline text="Sous-partie B"><outline text="Sous-sous-partie
> >> (1)"></outline>
> >> <outline text="Sous-sous-partie (2)"></outline>
> >> </outline>
> >> </outline>
> >> </outline>
> >> </body>
> >> </opml>
> >>
> >> pandoc convert it to :
> >> # Titre du projet
> >>
> >> ## Partie 1
> >>
> >> ## Partie 2
> >>
> >> Blablabla
> >>
> >> ### Sous-partie A
> >>
> >> kdfmsdqlkgqn
> >>
> >> ### Sous-partie B
> >>
> >> #### Sous-sous-partie (1)
> >>
> >> #### Sous-sous-partie (2)
> >>
> >> I'd like to have :
> >> # Titre du projet
> >>
> >> ### Partie 1
> >>
> >> ### Partie 2
> >>
> >> %% Blablabla
> >>
> >> #### Sous-partie A
> >>
> >> %% kdfmsdqlkgqn
> >>
> >> #### Sous-partie B
> >>
> >> ##### Sous-sous-partie (1)
> >>
> >> ##### Sous-sous-partie (2)
> >>
> >>
> >> Titles should rise by one level (excepted Title "#") and plain text
> should
> >> ideally have "%% " prefix.
> >>
> >> Does that seem possible to you ?
> >>
> >> Many thanks for your help if you can help me !!
> >>
> >> Best regards,
> >> Matthieu
> >>
> >>
> >>
> >
> > --
> > You received this message because you are subscribed to the Google
> Groups "pandoc-discuss" group.
> > To unsubscribe from this group and stop receiving emails from it, send
> an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
> > To view this discussion on the web visit
> https://groups.google.com/d/msgid/pandoc-discuss/1633f745-1737-4c6c-9cd1-766e3c0a9bda%40googlegroups.com
> .
> > For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups "pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CAJaBf%3DpC3%3DJvCWETyiaQn2jYFN8ZszCUXODOb1CsbvH97F88KQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #2: Type: text/html, Size: 7312 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2018-12-03  0:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-08 22:01 opml > markdown convert (but with my own rules) mvalle-dVO3j+d89GJhl2p70BpVqQ
     [not found] ` <ac5dfbf3-b769-42ec-8027-05dcb6bbedc1-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-01 16:17   ` Richard Holmes
     [not found]     ` <1633f745-1737-4c6c-9cd1-766e3c0a9bda-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-12-01 20:16       ` John MacFarlane
     [not found]         ` <m2a7lp2ea6.fsf-pgq/RBwaQ+zq8tPRBa0AtqxOck334EZe@public.gmane.org>
2018-12-03  0:46           ` Richard Holmes

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).