Changes To Cookbook
Not logged in

Changes to "Cookbook" between 2010-07-07 09:21:40 and 2010-07-07 09:27:37

902
903
904
905
906
907
908

909

910
911
912
913
914
915

916
917

918

919
920
921
922
923

924
925
926
927
928
929
930
902
903
904
905
906
907
908
909

910
911
912
913
914
915

916
917
918
919

920
921
922
923
924

925
926
927
928
929
930
931
932







+
-
+





-
+


+
-
+




-
+







  example Microsoft Office 2007 and newer use docx, xlsx and pptx extensions to
  store what is merely xml files zipped into a file.</p>
  <p>When edits are made to such files a versioning system is not efficient
  because diffing is no more appropriate</p>
  <p>The idea is to version the decompressed folder. A script will toggle
  Compressed/Uncompressed state</p>
  <h3>Sample batch script for use with docx, xlsx and pptx documents</h3>
  <p>This script is intended to work under MS Windows. It requires
  <p>This script is useful under Windows. It requires zip.exe and unzip.exe
  zip.exe and unzip.exe
  that you can find for example in gnuwin32 ([http://getgnuwin32.sf.net]).</p>
  <p>You have three variables to set. Running this script will</p>
  <ul compact='compact'>
    <li>Autodetect whether the document is in compressed or uncompressed
    state</li>
    <li>Convert file My_document.docx to a folder named My_document.docx too</li>
    <li>Convert file My_document.docx into a directory of the same name</li>
    <li>Rename file <nowiki>[Content_Types]</nowiki>.xml to a name without
    brackets (brackets in file names are not supported by Fossil)</li>
    <li>perform reverse operations to convert directory to compressed
    <li>Convert back My_document.docx to file My_document.docx
    docx/xlsx/pptx file.</li>
  </ul>
  <p>In this way you can work on a docx document, run the script, insert the
  uncompressed folder into fossil and run the script again to get your document
  back in editable state.</p>
  <pre>
  <font face="monospace">
<font color="#808080">&nbsp;1 </font><font color="#3a5fcd"><i>:: toggle docx state (compressed / uncompressed)</i></font><br />
<font color="#808080">&nbsp;2 </font><font color="#3a5fcd"><i>:: @echo off</i></font><br />
<font color="#808080">&nbsp;3 </font><br />
<font color="#808080">&nbsp;4 </font><font color="#8b4726">SET</font><font
color="#8b4726">&nbsp;DOCX</font><font
color="#8b4726"><b>=</b></font>My_document.docx<br />
<font color="#808080">&nbsp;5 </font><font color="#8b4726">SET</font><font
981
982
983
984
985
986
987
988

989
990
983
984
985
986
987
988
989

990
991
992







-
+


<font color="#808080">54 </font>&nbsp;&nbsp;<font color="#8b4726">del</font>&nbsp;<font color="#228b22">&quot;</font><font color="#8b4726">%TEMP%</font><font color="#228b22">\</font><font color="#8b4726">%TMPFILE%</font><font color="#228b22">&quot;</font><br />
<font color="#808080">55 </font>&nbsp;&nbsp;<font color="#8b4726">popd</font><br />
<font color="#808080">56 </font>&nbsp;&nbsp;<font color="#8b4726"><b>goto</b></font><font color="#8b4726"><b><u>&nbsp;:end</u></b></font><br />
<font color="#808080">57 </font><br />
<font color="#808080">58 </font><font color="#8b4726"><b><u>:end</u></b></font><br />
<font color="#808080">59 </font><br />
<font color="#808080">60 </font><font color="#3a5fcd"><i>:: vim: fenc=cp437</i></font>
  </pre>
  </font>

</div>