emacs-orgmode
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [O] HTML --> Org-mode?


From: Matt Price
Subject: Re: [O] HTML --> Org-mode?
Date: Mon, 26 Jan 2015 23:42:06 -0500

I think the answer may be something like:

(shell-command-to-string (concat  "pandoc -f html -t org <<< '"  :html "'" )

Though I'm not quite sure how to go about it just yet. 

On Mon, Jan 26, 2015 at 3:50 PM, Tory S. Anderson <address@hidden> wrote:
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 <address@hidden> 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
> <address@hidden> 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 <address@hidden> 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
>


reply via email to

[Prev in Thread] Current Thread [Next in Thread]