man pandoc will be your friend. It guided me to the following simple (interactive) use:
pandoc -f html -t org
<b> how are you? </b>
<i> I am good </i>
*how are you?* /I am good/
I won't be able to help you much farther than that, though.
- Tory
Matt Price <moptop99@gmail.com> writes:
> That should be enough. I would need to feed a string form emacs to
> pandoc, then capture the output as a new string that can be output in
> the export filter. Do you know how to do that part?
> Thanks,
> Matt
>
> On Mon, Jan 26, 2015 at 3:31 PM, Tory S. Anderson
> <torys.anderson@gmail.com> wrote:
>
> Using the magic wizard program Pandoc, I just had success with a
> simple little example:
>
> pandoc -o test.org test.html
>
> Input test.html:
> <html>
> <body>
> <strong>TEST strong!</strong>
> <div class='table'>
> <div class='cell'>Cell 1</div>
> <div class='cell'>Cell 2</div>
> <div class='cell'>Cell 3</div>
> <div class='cell'>Cell 4</div>
> </div>
> </body>
> </html>
>
> Output test.org:
> *TEST strong!*
> Cell 1
> Cell 2
> Cell 3
> Cell 4
>
> I'm not sure how sophisticated the strings you are dealing with,
> but pandoc might do the trick for you.
> - Tory
>
>
>
>
> Matt Price <moptop99@gmail.com> writes:
>
> > Hmm,
> >
> > Looks like I asked this about a year ago and didn't follow up on
> it.
> > Does anyone know a way to generate org-mode syntax from an html
> > string? I would like to extend zotxt slightly (see my last post)
> and
> > at present zotxt can pull citations 7 bibliography entries from
> Zotero
> > only in plain-text and HTML form. The plaintext form loses
> > information, so I would like to translate the HTML into org-mode
> > syntax.
> >
> > Since this would have to happen in the context of an
> >
> > (org-add-link-type )
> >
> > invocation, it would be best if this could be done directly in
> emacs
> > somehow...
> >
> > Thanks as always,
> >
> > Matt
>