Skip to content
commandline edited this page Sep 13, 2010 · 22 revisions

All of the documentation is now located here and maintained as a wiki so hopefully it can be collaboratively maintained.

Using Cron

Flashbake can be run manually to generate a commit but is most effectively when run by a scheduler, such as cron. That is also when the quiet period starts to make since. For example, say you have a project in ~/my_novel/ that you want to track. Add a cron job like:

15/* * * * * flashbake ~/my_novel 5 > /dev/null

Cron will then run flashbake every fifteen minutes and commit any changes to hot files in the project that have not been changed in the last 5 minutes. If there have been recent changes, flashbake will pick them up next time cron runs it, assuming the files haven’t been edited within five minutes of that invocation. You can tweak that quiet interval argument to make flashbake more greedy, committing more often, or more cautious, waiting until edits have stopped for a considerable duration. I encourage some experimentation to find what suits you.

You can also completely disable the quiet period behavior by suing the value 0 or, as of version 0.19, completely omitting the quiet period argument. Disabling the quiet period means that when cron runs flashbake, all outstanding changes to hot files in a project will be committed.
Usage

In the previous section, you’ve already seen the two main arguments to flashbake, the project directory and the optional quiet period. There are a few other options that can be used, run “flashbake —help” to see the all with some explanatory notes.

For this early release, the to options of interest are -c or —context and -v or —verbose.

If you run

flashbake -c ~/my_novel

flashbake will not commit any changes, rather it will show you the commit message it would generate if run normal. This is useful for checking that you’ve entered the options in the control file correctly. As I work on the plugin system, this will also be useful for plugin authors to check their output.

I am also planning on adding a proper dry run option that will run the script against a project directory, report what would be done but not execute the git commands.

The verbose switch simply increases what flashbake reports to the console. I mention it in case you give flashbake a try and want to contact me for help. Capturing that verbose output and including it in help requests will ensure a quicker reponse and hopefully a faster fix.

I will document new options, here, as they become available and try to note in which version they were added.

Clone this wiki locally