LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 07-27-2005, 11:12 PM   #1
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Rep: Reputation: 56
Reading OpenOffice .doc document


Hi folks,

LFS LiveCD 6.1

Is there any way to "READ" OpenOffice .doc document?

I'm running LFS LiveCD to build LFS. The former runs Xfce as destop without word processing software built-in. My problem is how to read .doc documents stored on the HD. After mounting the corresponding partition on the HD I can retrieve .doc document but could not open/read it.

I'm not prepared to Remaster the LiveCD. Is there any solution?

TIA

B.R.
satimis
 
Old 07-28-2005, 04:15 PM   #2
tuxdev
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 2,012

Rep: Reputation: 115Reputation: 115
try to read it with your preffered text editor.
 
Old 07-28-2005, 05:40 PM   #3
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi tuxdev,

Quote:
try to read it with your preffered text editor.
I tried 'nano' and 'vim' without success. They are the editor on LFS LiveCD.

B.R.
satimis
 
Old 07-28-2005, 05:52 PM   #4
kencaz
Senior Member
 
Registered: Mar 2005
Location: Las Vegas, NV
Distribution: Mandriva Slackware FreeBSD
Posts: 1,468

Rep: Reputation: 48
I would suggest burning a Knoppix or other LiveCD that has OpenOffice, Load your .doc files then export them as regular .txt files to be read in LFS 6.1...

KC
 
Old 07-28-2005, 06:10 PM   #5
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Hi kencaz,

Tks for your advice.

Quote:
I would suggest burning a Knoppix or other LiveCD that has OpenOffice......
I have other LiveCD with OO included available. The reason for me preferring LFS LiveCD is taking shorter time to boot because of the light-weight desktop 'xfce' . Besides it has the same fs as LFS 6.1 to be built. I found some opposite information about using Knoppix to build LFS. For such reasons I'm trying to solve the problem in making use of the packages included on the HD, the Host.

B.R.
satimis
 
Old 08-06-2005, 07:19 AM   #6
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
OpenOffice.org (OOo) XML file format names

You mention "OpenOffice .doc document". Technically, .doc is an M$ format that OpenOffice.org supports. The native OpenOffice.org formats are all compressed XML (".sx?"). If by any chance you misspoke & actually need to read a .sxw file, then all you should have to do is unpack it before using your favorite/available text editor.

For everyone's (esp. mine) future reference, here is a table I copied & pasted from the OOo 1.1.3 help:
Code:
XML file format names

OpenOffice.org uses the following XML

Application                     File extension
OpenOffice.org Writer              *.sxw
OpenOffice.org Writer templates    *.stw
OpenOffice.org Calc                *.sxc
OpenOffice.org Calc templates      *.stc
OpenOffice.org Impress             *.sxi
OpenOffice.org Impress templates   *.sti
OpenOffice.org Draw                *.sxd
OpenOffice.org Draw templates      *.std
OpenOffice.org Math                *.sxm
Master documents                   *.sxg
 
Old 08-06-2005, 07:30 AM   #7
satimis
Senior Member
 
Registered: Apr 2003
Posts: 3,695

Original Poster
Rep: Reputation: 56
Re: OpenOffice.org (OOo) XML file format names

Hi archtoad6,

Tks for your advice.

Quote:
....to read a .sxw file, then all you should have to do is unpack it before using your favorite/available text editor.....
Please explain how to unpack a .sxw file. Usually on OO Writer I just click File -> Open and then clicked the file to read it.

TIA

B.R.
satimis
 
Old 08-06-2005, 09:10 AM   #8
archtoad6
Senior Member
 
Registered: Oct 2004
Location: Houston, TX (usa)
Distribution: MEPIS, Debian, Knoppix,
Posts: 4,727
Blog Entries: 15

Rep: Reputation: 234Reputation: 234Reputation: 234
From a little further down in the "XML File Formats" section of OOo help:
Quote:
XML file structure
The OpenOffice.org XML file formats are compressed according to the ZIP method. Use an unpacking program of your choice to unpack the content of an XML file with its subdirectories. You see a structure similar to the following illustration.

<could not paste image>

The text content of the document is located in content.xml.
By default, content.xml is stored without formatting elements like indentation or line breaks to minimize the time for saving and opening the document. On the Tools - Options - Load/Save - General tab page you can activate the use of indentations and line breaks by clearing the check box Size optimization for XML format (no pretty printing).
The file meta.xml contains the meta information of the document, which you can enter under File - Properties.
If you save a document with a password, all XML files except meta.xml will be encrypted.
The file settings.xml contains further information about the settings for this document.
In styles.xml, you find the Styles applied to the document that can be seen in the Stylist.
The meta-inf/manifest.xml file describes the structure of the XML file.
Additional files can be contained in the packed file format. For example, illustrations can be contained in a Pictures subdirectory, Basic code in a Basic subdirectory, and linked Basic libraries in further subdirectories of Basic.
unzip works, I tried it.

Warning, the actual text is in content.xml which is 1 line of XML id & 1 loooong line of "content". The actual words of the content are almost at the end in a series of "<text:p ... >" tags. Good luck reading it. less is probably just as good as vi.
Code:
$ unzip -d <extract_dir> <target_file>.sxw 
$ cd <extract_dir> 
$ less content.xml
If you need to work w/ the text, you probably should load Knoppix 1ce & save your target files in .txt format. Otherwise I see vi macros, or sed or awk scripts, with hairy regex's in your future.
 
  


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 On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
i want pdf 2 openoffice or doc AL MOSLEM Linux - Software 4 03-26-2008 12:04 AM
Convert openoffice document into ms document through cli? bruno buys Linux - Software 0 07-05-2004 09:59 AM
openoffice autosave .doc fibbi Linux - Software 4 04-30-2004 02:33 AM
Reading a xml document: amirspl Programming 3 09-10-2003 07:51 AM
Attaching a doc document sheek Linux - Newbie 1 07-24-2003 07:49 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 09:05 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