[Gambas-user] Output to Libre Office Writer ??

rocko sunblaster5 at ...626...
Mon Apr 1 04:19:16 CEST 2013


Ok I got this to unzip the .odt file, but where does it unzip to???
I looked in all my directories and I cannot find it.

My Code:
'/Gambas module file//
//
//Public nFile As File//
//Public fName As String//
//
//Public Sub Main()//
//
//
//fName = "/home/rocko/Documents/Proposal.odt"//
//
//
//
//If Exist(fName) Then//
//  testFile()//
//  Print "File found"//
//  Shell "unzip -v " & fname Wait//
////
//  Else//
//    Print "File not found" //
//    Print nFile//
//    Print fName//
//    Shell "ls"//
////
////
//Endif//
//End//
//
//Sub testFile()//
//nFile = Open fName For Read Write//
//End//
//
/OUPUT:

/File found//
//Archive:  /home/rocko/Documents/Proposal.odt//
// Length   Method    Size  Cmpr    Date    Time   CRC-32 Name//
//--------  ------  ------- ---- ---------- ----- -------- ----//
//      39  Stored       39   0% 2013-04-01 02:02 0c32c65e mimetype//
//   17497  Stored    17497   0% 2013-04-01 02:02 5dc81dbb 
Thumbnails/thumbnail.png//
//   15440  Defl:N     2492  84% 2013-04-01 02:02 3f9d5b20 content.xml//
//   11846  Defl:N     2132  82% 2013-04-01 02:02 59c29432 styles.xml//
//    9760  Defl:N     1753  82% 2013-04-01 02:02 6c2d9295 settings.xml//
//    1138  Stored     1138   0% 2013-04-01 02:02 a931d5b8 meta.xml//
//     899  Defl:N      261  71% 2013-04-01 02:02 d268f7b4 manifest.rdf//
//       0  Defl:N        2   0% 2013-04-01 02:02 00000000 
Configurations2/accelerator/current.xml//
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/statusbar///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/popupmenu///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/images/Bitmaps///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/progressbar///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/toolbar///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/toolpanel///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/floater///
//       0  Stored        0   0% 2013-04-01 02:02 00000000 
Configurations2/menubar///
//    1086  Defl:N      282  74% 2013-04-01 02:02 4aa75c8b 
META-INF/manifest.xml//
//--------          -------  --- -------//
//   57705            25596  56%                            17 files/


On 03/31/2013 05:21 PM, Benoît Minisini wrote:
> Le 01/04/2013 01:32, rocko a écrit :
>> I actually tried that after sending my response.
>> lo and behold! XML file woo hoo!
>>
>> So I assume I can just do a search thru th XML file and change things
>> then re-save
>> the file and re-zip it like you said.
>>
>>
>>
>> So how do I unzip and re-zip a file in Gambas?, sorry  this is kinda new
>> to me.
> SHELL "zip ..." WAIT
>
> SHELL "unzip ..." WAIT
>
> That run the shell commands as if you typed them in a terminal.
>
> There is a compression component that allows you to do the same thing
> without running external process, but it is a more complex to explain.
>
>> Which kind of search functions does gambas have?? regex I assume, any
>> others??
>>
> I use Replace$(). No need for regexp. If your search pattern are like
> "$(field name)", you won't mix up with any OpenOffice XML syntax.
>
> Don't forget to look at XML format for correctly quoting characters that
> must be quoted.
>
> Regards,
>




More information about the User mailing list