Welcome to NeoOffice developer notes and announcements
NeoOffice
Developer notes and announcements
 
 

This website is an archive and is no longer active
NeoOffice announcements have moved to the NeoOffice News website


Support
· Forums
· NeoOffice Support
· NeoWiki


Announcements
· Twitter @NeoOffice


Downloads
· Download NeoOffice


  
NeoOffice :: View topic - how do I put the uncompressed .odt file back together?
how do I put the uncompressed .odt file back together?
 
   NeoOffice Forum Index -> NeoOffice Releases
View previous topic :: View next topic  
Author Message
DJ_Coder
Red Pill


Joined: Jul 19, 2005
Posts: 9

PostPosted: Fri Sep 08, 2006 7:26 pm    Post subject: how do I put the uncompressed .odt file back together?

I would like to put back together a .odt file I just unziped, however I cannot do it. I tried using gzip, gunzip, tar, and a few others on I found on version tracker.

First I saw this article( http://www.xml.com/pub/a/2005/01/26/hacking-ooo.html ) which skimmed over this important part, and it's for Linux. Then I saw this article ( http://www.oooforum.org/forum/viewtopic.phtml?t=5622&highlight= ) which outlines the same problem I am having but provides no solution( for a Mac ).

I have been unable to solve this, and it is driving me crazy.

I would greatly appreciate anyone who could tell me what program ( gui or command line )and command to use to recompress the folder.

Thanks in advance for your help.

P.S.
I am using OS 10.3.9, and NeoOffice 2.0 Aqua Beta 3 Patch 1
Back to top
iking
Operator


Joined: Apr 26, 2006
Posts: 49
Location: Vancouver, BC

PostPosted: Fri Sep 08, 2006 10:16 pm    Post subject:

Use zip instead of gzip; that should be all you need. (If for some reason zip isn't on your machine, you can get it through DarwinPorts.)

Ian
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Fri Sep 08, 2006 11:18 pm    Post subject:

Yeah, if you don't have zip on your Mac, something's awry with your OS install Sad

If you go to the /Applications/Utilities/Terminal and type
Code:
which zip
and press return, what do you see?

You *might* be able to use Mac OS X's "Create Archive of" option to recreate a valid file, but the chances of it ending up as a valid .odt file aren't great (based on how that thing works)....

Alternatively, the old standard Zipit (shareware) should work, but you'll still have to select the correct options (no MacBinary, etc.)....

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
DJ_Coder
Red Pill


Joined: Jul 19, 2005
Posts: 9

PostPosted: Sat Sep 09, 2006 7:33 am    Post subject:

I did not know that zip existed in my machine.
Code:
which zip
/usr/bin/zip


Some Background:
After reading the articles I mentioned above I first typed
Code:
man zip
just to make sure I had the right options/switches since the articles were specific to Linux. From that I got the response:
Code:
No manual entry for zip


Then I tried to locate all crompressing programs:
Code:
apropos zip
bzcmp(1), bzdiff(1)      - compare bzip2 compressed files
bzgrep(1), bzfgrep(1), bzegrep(1) - search possibly bzip2 compressed files for a regular expression
bzip2(1), bunzip2(1)     - a block-sorting file compressor, v1.0.2 bzcat - decompresses files to std
out bzip2recover - recovers data from damaged bzip2 files
bzmore(1), bzless(1)     - file perusal filter for crt viewing of bzip2 compressed text
gzip(1), gunzip(1), zcat(1) - compress or expand files
zforce(1)                - force a '.gz' extension on all gzip files


That is why I used gzip, gunzip and even tried tar and the Archive option from the OS; of which, none worked.

Anyway, I tried using zip and I have not gotten it to work for me, when I tried
Code:
zip test.odt\ Folder/

I got
Code:
zip error: Nothing to do! (test.odt Folder/.zip)


Same result if I used the -r option, and appending the * character only compresses the files individually.

Therefore what is the correct command to zip the folder contents into one file?
Back to top
Guest
Guest





PostPosted: Sat Sep 09, 2006 7:56 am    Post subject:

Isn't it included with the Developer Tookit that is on the Mac OS X CDs/DVD that comes with a new Mac? Or is it called X Code now? Anyway, when you get it on your machine it should be/go in Folder usr/bin. usr/ is invisible but can be reached thru Finder--> Go--> Go to Folder... (just type in usr/ or usr/bin)
Back to top
DJ_Coder
Red Pill


Joined: Jul 19, 2005
Posts: 9

PostPosted: Sat Sep 09, 2006 8:15 am    Post subject: Looking for the correct zip commnad

Yes it is called Xcode, and zip must be part of the regular install (Since I don't have Xcode intalled in this computer, yet have zip installed. )

What we are looking for now is the command necessary to get zip to compress the entire folders contents into one file.
Back to top
Guest
Guest





PostPosted: Sat Sep 09, 2006 9:27 am    Post subject:

From my experience, since you don't get the normal result for man zip which should basically explain how to use zip commands that tells me maybe zip isn't in usr/bin. I'm pretty sure zip blah blah blah path-to-file entered in a Terminal.app window should be zipping the file. I hosed my system recently and had to start over from my 10.2.3 CD and then upgraded to 10.2.8. I don't have zip in my /usr/bin as a result but I can grab it from one of my Previous Systems in my Previous Systems Folder that is created when one archives and (re)installs. I know I should get rid of those PS's as they take up space but I always find myself going back to get things from there that I had added to my system after an install/reinstall. My point is, maybe it isn't part of the basic install or at least wasn't back at that OS X version. I have Dev Tools though (XCode now) so I think that's where my zip binary file came from originally.

Another way is to Google and d/l an app called Zippist and zip with that or a similar program.
Back to top
Guest
Guest





PostPosted: Sat Sep 09, 2006 9:35 am    Post subject:

Actually, how 'bout this
Back to top
sardisson
Town Crier
Town Crier


Joined: Feb 01, 2004
Posts: 4588

PostPosted: Sat Sep 09, 2006 10:01 am    Post subject:

Zip is one of those programs that doesn't have a man page.

Code:
zip -h
gets you zip usage

If you have all the exploded contents in a folder "foo",
Code:
cd foo
zip -r mynewzip.sxw *
will do what you want.

.DS_Store files and Mac metadata seem not to make a difference here (they break images.zip, for instance), so the Mac OS X "create archive" command seems to work, too.

Smokey

_________________
"[...] whether the duck drinks hot chocolate or coffee is irrelevant." -- ovvldc and sardisson in the NeoWiki
Back to top
Guest
Guest





PostPosted: Sat Sep 09, 2006 10:20 am    Post subject:

OK, Smokey, since you're a Guru here, I'll take your word for it. Could have sworn I had seen it before though. Anyway, from Panther (10.3) on that Finder drop down option is included which is nice, but in Jaguar (10.2) I had to add something called On My Command which let's me do zipping and a bunch of otehr cool stuff by right-clicking on a file/folder (Control-clicking for the Mac faithful one-button purists).
Back to top
DJ_Coder
Red Pill


Joined: Jul 19, 2005
Posts: 9

PostPosted: Sat Sep 09, 2006 10:59 am    Post subject: the cycle is complete!

Thanks everyone; specially, Sardisson that command was right on the money.

Although I wish I would have tried the -h option to get the help guide.........oh well, too many details I guess.

Finally I can go and hack the xml.


Thanks.
Back to top
Display posts from previous:   
   NeoOffice Forum Index -> NeoOffice Releases All times are GMT - 7 Hours
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Powered by phpBB © 2001, 2005 phpBB Group

All logos and trademarks in this site are property of their respective owner. The comments are property of their posters, all the rest © Planamesa Inc.
NeoOffice is a registered trademark of Planamesa Inc. and may not be used without permission.
PHP-Nuke Copyright © 2005 by Francisco Burzi. This is free software, and you may redistribute it under the GPL. PHP-Nuke comes with absolutely no warranty, for details, see the license.