LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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, 09: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, 11: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, 01:16 PM   #3
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

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 02:01 PM.
 
2 members found this post helpful.
Old 08-20-2012, 02:20 PM   #4
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

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 02:33 PM.
 
1 members found this post helpful.
Old 08-20-2012, 03: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, 05:08 PM   #6
David the H.
Bash Guru
 
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Debian sid + kde 3.5 & 4.4
Posts: 6,823

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

Code:
libreoffice --headless --convert-to odt inputfile
 
Old 08-21-2012, 12:40 AM   #7
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Slackware 10.1/10.2/12, Ubuntu 12.04, Crunchbang Statler
Posts: 3,786

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, 07: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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 11:34 AM
Command line text file viewing and editing - .odt etc. mitchellray Linux - Newbie 1 04-14-2009 04:41 PM
Odt File Convert To Odf Format DOUGLASdc6b Linux - Newbie 3 05-06-2008 08: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 03:36 PM
MAN Pages..can I export to a text file? phil1076 Linux - General 4 10-29-2001 09:11 AM


All times are GMT -5. The time now is 11:32 PM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration