<html>
  <head>
    <meta content="text/html; charset=windows-1252"
      http-equiv="Content-Type">
  </head>
  <body text="#000000" bgcolor="#FFFFFF">
    <div class="moz-cite-prefix">A simple solution could be to save the
      date together with f<br>
      dt=datenum()<br>
      save <font face="Arial">test.sod datenum f</font><br>
      <br>
      <br>
      then<br>
      load <font face="Arial">test.sod datenum<br>
        <br>
        Serge<br>
      </font>Le 10/06/2015 00:03, Samuel Gougeon a écrit :<br>
    </div>
    <blockquote cite="mid:5577629B.8050509@free.fr" type="cite">
      <meta http-equiv="content-type" content="text/html;
        charset=windows-1252">
      <font face="Arial">Hi,<br>
        <br>
        I have N figures. I would like to re-export only those that were
        modified in the meanwhile.<br>
        Indeed, exporting with xs2### is rather time-consuming, in such
        a way that i am looking for a short-circuit.<br>
        <br>
        The way that i imagined is the following, for a figure of handle
        f :<br>
        1) f is saved in file1.sod. This is quite faster than exporting.<br>
        2) later, f is re-saved in file2.sod<br>
        3) we compute the MD5 checksums of the contents of file1.sod and
        file2.sod<br>
        4) we compare both checksums. If they are different, we
        re-export f.<br>
        <br>
        Unfortunately, it looks that save(..) likely saves also an
        internal timestamp, or something varying external to the main
        saved content.<br>
        This ruins the idea, and i do not see any reflief plan. Here is
        a proof:</font><br>
      <pre style="font-family:Monospaced;font-style:normal;font-size:13.0;"><span style="color:rgb(174,92,176);text-decoration:underline;">clf</span>
<span style="color:rgb(50,185,185);">plot2d</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(0,0,0);">f</span> <span style="color:rgb(92,92,92);">=</span> <span style="color:rgb(174,92,176);text-decoration:underline;">gcf</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(74,85,219);">)</span><span style="color:rgb(0,0,0);">;</span>
<span style="color:rgb(50,185,185);">save</span> <span style="color:rgb(188,143,143);">test.sod</span> <span style="color:rgb(188,143,143);">f</span>
<span style="color:rgb(50,185,185);">getmd5</span> <span style="color:rgb(188,143,143);">test.sod</span>
<span style="color:rgb(50,185,185);">sleep</span><span style="color:rgb(74,85,219);">(</span><span style="color:rgb(188,143,143);">5000</span><span style="color:rgb(74,85,219);">)</span>
<span style="color:rgb(50,185,185);">save</span> <span style="color:rgb(188,143,143);">test.sod</span> <span style="color:rgb(188,143,143);">f</span>
<span style="color:rgb(50,185,185);">getmd5</span> <span style="color:rgb(188,143,143);">test.sod</span>  
<span style="color:rgb(188,143,143);"></span></pre>
      <font face="Arial">Yielding:<br>
        <br>
        -->clf<br>
        -->plot2d()<br>
        -->f = gcf();<br>
        -->save test.sod f<br>
        -->getmd5 test.sod<br>
         ans  =<br>
         e015481486eb9708a4fe1d3df1cbbbb9   <br>
        -->sleep(5000)<br>
        -->save test.sod f<br>
        -->getmd5 test.sod<br>
         ans  =<br>
         3c6319b5d3a2299caaacc2f95c3efb32   </font><br>
      <font face="Arial"><br>
        Other tests show that<br>
        1) renaming the file does not change its checksum returned by
        getmd5()<br>
        2) modifying the OS timestamp of the file (any of creation, last
        access, last write) does not change its checksum.<br>
        <br>
        Hence, it really looks that an internal timestamp is recorded
        with the proper data.<br>
        So, my questions are :<br>
        1) do -- you developers -- confirm this save()'s behavior? I did
        you go the the source code.<br>
        2) Why doing that? Is is on purpose, or is it a bug?<br>
        3) Is there a way to avoid it? <br>
            a) There is presently no usage option to avoid it<br>
            b) On option, recording only the date with a fixed
        conventionnal hour such that 00:00:00.000 would be ok for me.<br>
                10s of export is <<< 24h ;)<br>
        4) Would you have any idea to do what i expect with figures,
        without using their saved handles?<br>
            I posted a wish and proposal <a moz-do-not-send="true"
          class="moz-txt-link-freetext"
          href="http://bugzilla.scilab.org/show_bug.cgi?id=11658">http://bugzilla.scilab.org/show_bug.cgi?id=11658</a> 
        3 years ago, in order to <br>
            open the possibillity to save copies of handles (in
        structures) and then becomes able to compare them.<br>
            But the thread does not breathe...<br>
        <br>
        Reading you soon<br>
        <br>
        Samuel<br>
        <br>
      </font> <br>
      <fieldset class="mimeAttachmentHeader"></fieldset>
      <br>
      <pre wrap="">_______________________________________________
dev mailing list
<a class="moz-txt-link-abbreviated" href="mailto:dev@lists.scilab.org">dev@lists.scilab.org</a>
<a class="moz-txt-link-freetext" href="http://lists.scilab.org/mailman/listinfo/dev">http://lists.scilab.org/mailman/listinfo/dev</a>
</pre>
    </blockquote>
    <br>
  </body>
</html>