emacs-orgmode@gnu.org archives
 help / color / mirror / code / Atom feed
* Importing ODT/libreoffice into Org
@ 2016-07-16 19:05 Eric Abrahamsen
  2016-07-16 19:15 ` Samuel W. Flint
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-16 19:05 UTC (permalink / raw)
  To: emacs-orgmode

Has anyone written a Libreoffice extension that will export Org mode? I
do this a lot, and it's a huge waste of time -- doing a search and
replace for bold or italics, in particular, is very annoying, and
sometimes doesn't work for reasons I don't understand. I just had to
convert a 200+ page document to Org by hand: searching for italics
worked, but not replace.

Does anyone have any handy tools? Most of it can be done after a
document has been turned into plain text, but not headings and emphasis
markup...

Thanks,
Eric

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 19:05 Importing ODT/libreoffice into Org Eric Abrahamsen
@ 2016-07-16 19:15 ` Samuel W. Flint
  2016-07-16 19:38   ` Eric Abrahamsen
  2016-07-16 19:41   ` Eric Abrahamsen
  2016-07-16 21:08 ` John Kitchin
  2016-07-17 17:53 ` Christian Moe
  2 siblings, 2 replies; 10+ messages in thread
From: Samuel W. Flint @ 2016-07-16 19:15 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode

Export to docx and use pandoc?  Something like `pandoc input.doc -o
output.org` should work.

HTH,

Sam

-- 
Samuel W. Flint
4096R/266596F4
      (9477 D23E 389E 40C5 2F10  DE19 68E5 318E 2665 96F4)
(λs.s s) λs.s s

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 19:15 ` Samuel W. Flint
@ 2016-07-16 19:38   ` Eric Abrahamsen
  2016-07-16 19:41   ` Eric Abrahamsen
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-16 19:38 UTC (permalink / raw)
  To: emacs-orgmode

swflint@flintfam.org (Samuel W. Flint) writes:

> Export to docx and use pandoc?  Something like `pandoc input.doc -o
> output.org` should work.

I should have thought of that! Will give it a shot.

I also noticed (too late) that my Libreoffice will export to mediawiki
format. That's plain text, at any rate, and keeps formatting, so regular
expressions should do the trick.

E

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 19:15 ` Samuel W. Flint
  2016-07-16 19:38   ` Eric Abrahamsen
@ 2016-07-16 19:41   ` Eric Abrahamsen
  1 sibling, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-16 19:41 UTC (permalink / raw)
  To: emacs-orgmode

swflint@flintfam.org (Samuel W. Flint) writes:

> Export to docx and use pandoc?  Something like `pandoc input.doc -o
> output.org` should work.

Well dammit. I just tried it, and it worked great. Next time...

E

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 19:05 Importing ODT/libreoffice into Org Eric Abrahamsen
  2016-07-16 19:15 ` Samuel W. Flint
@ 2016-07-16 21:08 ` John Kitchin
  2016-07-16 21:14   ` Eric Abrahamsen
  2016-07-17 17:53 ` Christian Moe
  2 siblings, 1 reply; 10+ messages in thread
From: John Kitchin @ 2016-07-16 21:08 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode@gnu.org

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

Check out ox-clip. It does formatted copy and paste. It is on Melpa.

On Saturday, July 16, 2016, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

> Has anyone written a Libreoffice extension that will export Org mode? I
> do this a lot, and it's a huge waste of time -- doing a search and
> replace for bold or italics, in particular, is very annoying, and
> sometimes doesn't work for reasons I don't understand. I just had to
> convert a 200+ page document to Org by hand: searching for italics
> worked, but not replace.
>
> Does anyone have any handy tools? Most of it can be done after a
> document has been turned into plain text, but not headings and emphasis
> markup...
>
> Thanks,
> Eric
>
>
>

-- 
John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 21:08 ` John Kitchin
@ 2016-07-16 21:14   ` Eric Abrahamsen
  2016-07-16 22:13     ` John Kitchin
  0 siblings, 1 reply; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-16 21:14 UTC (permalink / raw)
  To: emacs-orgmode

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> Check out ox-clip. It does formatted copy and paste. It is on Melpa. 

Oh cool -- thanks for the tip!

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 21:14   ` Eric Abrahamsen
@ 2016-07-16 22:13     ` John Kitchin
  2016-07-16 22:15       ` Eric Abrahamsen
  0 siblings, 1 reply; 10+ messages in thread
From: John Kitchin @ 2016-07-16 22:13 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode@gnu.org

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

It is formatted from org to applications. That may not be the direction you
were going.

On Saturday, July 16, 2016, Eric Abrahamsen <eric@ericabrahamsen.net> wrote:

> John Kitchin <jkitchin@andrew.cmu.edu <javascript:;>> writes:
>
> > Check out ox-clip. It does formatted copy and paste. It is on Melpa.
>
> Oh cool -- thanks for the tip!
>
>
>

-- 
John

-----------------------------------
Professor John Kitchin
Doherty Hall A207F
Department of Chemical Engineering
Carnegie Mellon University
Pittsburgh, PA 15213
412-268-7803
@johnkitchin
http://kitchingroup.cheme.cmu.edu

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

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 22:13     ` John Kitchin
@ 2016-07-16 22:15       ` Eric Abrahamsen
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-16 22:15 UTC (permalink / raw)
  To: emacs-orgmode

John Kitchin <jkitchin@andrew.cmu.edu> writes:

> It is formatted from org to applications. That may not be the
> direction you were going. 

Ah, no -- I'm going in the other direction, into Org. I installed the
package anyway :)

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

* Re: Importing ODT/libreoffice into Org
  2016-07-16 19:05 Importing ODT/libreoffice into Org Eric Abrahamsen
  2016-07-16 19:15 ` Samuel W. Flint
  2016-07-16 21:08 ` John Kitchin
@ 2016-07-17 17:53 ` Christian Moe
  2016-07-17 19:24   ` Eric Abrahamsen
  2 siblings, 1 reply; 10+ messages in thread
From: Christian Moe @ 2016-07-17 17:53 UTC (permalink / raw)
  To: Eric Abrahamsen; +Cc: emacs-orgmode


Eric Abrahamsen writes:

> I just had to convert a 200+ page document to Org by hand: searching
> for italics worked, but not replace.

Looks like pandoc is the way to go, I'll have to try it.

Still, Search/Replace for italics in LibreOffice ought to work. Try this
recipe:

1) Edit -> Find / Replace -> More options: check the box for "regular
   expressions".
2) On "Search for", type "(.*)" (without the quotes, with the parens).
3) With the cursor still on the "Search for" box, click on "Format" and
   select "Italics".
4) As a replacement, type: "/$1/" (for Org).
5) Replace all.

Annoyingly, there seems to be no way to write a macro for this in
LibreOffice, as formating attributes on search/replace isn't part of the
API. (If anyone has information to the contrary, please let me know.)

Yours,
Christian

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

* Re: Importing ODT/libreoffice into Org
  2016-07-17 17:53 ` Christian Moe
@ 2016-07-17 19:24   ` Eric Abrahamsen
  0 siblings, 0 replies; 10+ messages in thread
From: Eric Abrahamsen @ 2016-07-17 19:24 UTC (permalink / raw)
  To: emacs-orgmode

Christian Moe <mail@christianmoe.com> writes:

> Eric Abrahamsen writes:
>
>> I just had to convert a 200+ page document to Org by hand: searching
>> for italics worked, but not replace.
>
> Looks like pandoc is the way to go, I'll have to try it.
>
> Still, Search/Replace for italics in LibreOffice ought to work. Try this
> recipe:
>
> 1) Edit -> Find / Replace -> More options: check the box for "regular
>    expressions".
> 2) On "Search for", type "(.*)" (without the quotes, with the parens).
> 3) With the cursor still on the "Search for" box, click on "Format" and
>    select "Italics".
> 4) As a replacement, type: "/$1/" (for Org).
> 5) Replace all.

I have done that successfully in the past! This time it wouldn't work.
In the "other options" menu, after you choose the italics, there's a
"including styles" checkbox. Libreoffice would only find the italics if
that was checked, but if it was checked, clicking replace wouldn't work
-- it would ignore the contents of the replace box, and instead change
the style of the paragraph to "paragraph style". No matter what I poked,
that's all it would do. I appreciate Libreoffice in a way, but it's
mystery behavior like that that makes me get out of it as soon as
humanly possible.

It can be pandoc's job now!

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

end of thread, other threads:[~2016-07-17 19:25 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-07-16 19:05 Importing ODT/libreoffice into Org Eric Abrahamsen
2016-07-16 19:15 ` Samuel W. Flint
2016-07-16 19:38   ` Eric Abrahamsen
2016-07-16 19:41   ` Eric Abrahamsen
2016-07-16 21:08 ` John Kitchin
2016-07-16 21:14   ` Eric Abrahamsen
2016-07-16 22:13     ` John Kitchin
2016-07-16 22:15       ` Eric Abrahamsen
2016-07-17 17:53 ` Christian Moe
2016-07-17 19:24   ` Eric Abrahamsen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).