To be clear, I switched to fossil a day or two ago from git, so there may well be things I don't quite get about it yet.
Chris On Saturday, February 10, 2018 at 6:30:39 PM UTC-8, Edward K. Ream wrote: > > On Sat, Feb 10, 2018 at 3:09 PM, Chris George <techn...@gmail.com > <javascript:>> wrote: > > I use Leo to write my weekly column using @clean nodes created using an >> abbreviation. >> > > >> [I want an @button script to do the following]: >> >> 1) Save the @clean file to disk. >> > > c.save() will do this. > > > >> 2) Run a system command in the folder specified in the @clean file path: >> > >> >> >> fossil commit -m "<Text from child node here>". >> > > See below. > > >> 3) Clear a child node of the commit message to prepare for next time. >> > > See below. > > > The child node with the commit message shouldn't be written to the @clean >> file. >> > > I would put the commit message in a "standard place" known to the @button > script. Your script can find this node using: > > p = g.findNodeAnywhere(c, "fossil commit message") > > Putting this all together we get: > > if c.isChanged(): > c.save() > p = g.findNodeAnywhere(c, "commit node") > message = p.b.replace('"', "'") > command = > 'fossil commit -m "%s"' % message > > c.controlCommands.executeSubprocess( > event=None, > command=command, > ) > > In my prototype, the command was "ls" and all output went to Leo's log > pane and the console. > > Give it a whirl. Please report your experiences. > > 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 leo-editor+unsubscr...@googlegroups.com. To post to this group, send email to leo-editor@googlegroups.com. Visit this group at https://groups.google.com/group/leo-editor. For more options, visit https://groups.google.com/d/optout.