On Sat, Mar 29, 2008 at 1:58 PM, zpcspm <[EMAIL PROTECTED]> wrote: > > On Mar 29, 4:28 pm, "Edward K. Ream" <[EMAIL PROTECTED]> wrote: > > Here is the correct def for clean_file: > > I had to change > > fileName = g.os_path_normpath( > g.os_path_join( > at.default_directory,'clean',p.anyAtFileNodeName())) > > in the original version to > > fileName = g.os_path_normpath( > g.os_path_join( > at.default_directory, 'clean', > g.os_path_basename(p.anyAtFileNodeName()))) > > and it worked as expected.
Thanks for this improvement. I'll put it in scripts.leo. > However, I can see that this script works just for a particular case > (when all derived files belong to the same directory). I think the script looks a directory named 'clean' as a subdirectory of the directory containing each file. I could be wrong :-) In any case, this is a minor detail that you can change to suit yourself. Many other changes are possible. For example, you could have the script put all the cleaned files in a single, global directory. The script could just process the selected tree, rather than the entire outline. The code is left as an exercise--feel free to ask for help. Edward --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en -~----------~----~----~----~------~----~------~--~---
