LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 08-20-2012, 08:57 AM   #1
jmabusela
LQ Newbie
 
Registered: Aug 2012
Posts: 1

Rep: Reputation: Disabled
Export text to odt file


How does one export contents of a file to odt (Open Document Format) using bash
 
Old 08-20-2012, 10:22 AM   #2
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
You could save yourself a lot of time by just importing the file to odt format in open office.
 
Old 08-20-2012, 12:16 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by jmabusela View Post
How does one export contents of a file to odt (Open Document Format) using bash
See http://www.jejik.com/articles/2010/0...nts_using_zip/ to get you started. You need an empty ODT document that you can unzip, manipulate (modify content.xml) and zip.

For ease of manipulation, you might want a bit of recognizable text in your 'empty' ODT document.

Quote:
Originally Posted by mreff555 View Post
You could save yourself a lot of time by just importing the file to odt format in open office.
And if you don't have a gui?

Last edited by Wim Sturkenboom; 08-20-2012 at 01:01 PM.
 
2 members found this post helpful.
Old 08-20-2012, 01:20 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
I have tested the steps above (using vi) and they work; I modified content.xml using vi

And http://www.linuxquestions.org/questi...script-212983/ (answers for post #4) might help to do the manipulation (or at least point you in the right direction). Or http://www.unix.com/shell-programmin...ther-file.html

Last edited by Wim Sturkenboom; 08-20-2012 at 01:33 PM.
 
1 members found this post helpful.
Old 08-20-2012, 02:31 PM   #5
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
Quote:


And if you don't have a gui?
If you don't have a GUI, why would you want to put something in a format which requires one
 
Old 08-20-2012, 04:08 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852

Rep: Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037Reputation: 2037
Assuming the file is something that libreoffice can handle:

Code:
libreoffice --headless --convert-to odt inputfile
 
Old 08-20-2012, 11:40 PM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by mreff555 View Post
If you don't have a GUI, why would you want to put something in a format which requires one
Because e.g. you might have a server that needs to prepare documents in ODT format for users to download
 
Old 08-22-2012, 06:05 AM   #8
mreff555
Member
 
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473

Rep: Reputation: Disabled
I have to admit, that is actually a pretty cool feature in openoffice.

I don't suppose there is a headless feature to turn a csv file in to an open office spreadsheet?
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
iperf won't export all command output to text file buee Linux - Newbie 1 10-19-2010 10:34 AM
Command line text file viewing and editing - .odt etc. mitchellray Linux - Newbie 1 04-14-2009 03:41 PM
Odt File Convert To Odf Format DOUGLASdc6b Linux - Newbie 3 05-06-2008 07:27 AM
How to parse text file to a set text column width and output to new text file? jsstevenson Programming 12 04-23-2008 02:36 PM
MAN Pages..can I export to a text file? phil1076 Linux - General 4 10-29-2001 08:11 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration