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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
|
08-20-2012, 09:57 AM
|
#1
|
LQ Newbie
Registered: Aug 2012
Posts: 1
Rep:
|
Export text to odt file
How does one export contents of a file to odt (Open Document Format) using bash
|
|
|
08-20-2012, 11:22 AM
|
#2
|
Member
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473
Rep:
|
You could save yourself a lot of time by just importing the file to odt format in open office.
|
|
|
08-20-2012, 01:16 PM
|
#3
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
Quote:
Originally Posted by jmabusela
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
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.
|
08-20-2012, 02:20 PM
|
#4
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
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.
|
08-20-2012, 03:31 PM
|
#5
|
Member
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473
Rep:
|
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
|
|
|
08-20-2012, 05:08 PM
|
#6
|
Bash Guru
Registered: Jun 2004
Location: Osaka, Japan
Distribution: Arch + Xfce
Posts: 6,852
|
Assuming the file is something that libreoffice can handle:
Code:
libreoffice --headless --convert-to odt inputfile
|
|
|
08-21-2012, 12:40 AM
|
#7
|
Senior Member
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,797
|
Quote:
Originally Posted by mreff555
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
|
|
|
08-22-2012, 07:05 AM
|
#8
|
Member
Registered: Sep 2011
Location: Philly
Distribution: Gentoo
Posts: 473
Rep:
|
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?
|
|
|
All times are GMT -5. The time now is 06:37 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|