I need some help as I'm trying to use Leo scripting to get and display the 
old and new mod times and checksums because obviously, both appear to 
change immediately after I save a Leo file and external file (caused by the 
action of saving to the cloud, which shouldn't happen). Anyway, I tried 
making a script from using the leoExternalFiles.py as a starting point and 
inserting these display commands in the appropriate places:

g.es(old_time)
g.es(new_time)
g.es(old_sum)
g.es(new_sum)

Running this as a script does nothing. No errors, no anything.

I also tried a variety of other scripts attempting to get this information 
into the log pane to no avail (kept getting errors not knowing what 'self' 
was).

Obviously, I have no idea what I'm doing, but I'm trying to solve a major 
problem which is preventing me from using a cloud backup solution.

Any guidance or suggestions on how to easily display these values?

On a related note, I see from the script that it evaluates the checksum for 
change if the mod time is different. Any idea why the checksum would change 
if the file contents haven't changed?

Rob...


On Thursday, November 1, 2018 at 10:46:03 AM UTC-4, Edward K. Ream wrote:
>
> On Fri, Oct 19, 2018 at 4:34 PM Rob <[email protected] <javascript:>> 
> wrote:
>
> So, two questions for the Leo gurus:
>>
>>    1. What does Leo `see` in the files that triggers the message and the 
>>    dialog?
>>    
>> Iirc, Leo looks at the actual modification dates.  This is done at idle 
> time. For all the details, see the ExternalFilesController class in 
> leoExternalFiles.py. Here is the docstring:
>
> A class tracking changes to external files:
> - temp files created by open-with commands.
> - external files corresponding to @file nodes.
> This class raises a dialog when a file changes outside of Leo.
> [snip]
>
> HTH.
>
> Edward
>

-- 
You received this message because you are subscribed to the Google Groups 
"leo-editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/leo-editor.
For more options, visit https://groups.google.com/d/optout.

Reply via email to