AutoLoad

AutoLoad plugin

AutoLoad is a simple plugin to monitor a folder for new files and automatically load them into a channel when they appear.

Plugin Type: Local

AutoLoad is a local plugin, which means it is associated with a channel. An instance can be opened for each channel.

Note

You need to install the Python “watchdog” package to use this plugin.

Usage

  • To set up a folder to be monitored, type a path of a folder (directory) in the “Watched folder” field and press ENTER or click “Set”.

  • If you need to distinguish between files that will be added to this folder, you may type a Python regular expression in the “Regex” box and click “Set”. Only files with names matching the pattern will be considered. Note that the regex is for the filename only; not any part of the folder path.

  • If you ever want to pause the auto loading, you can check the box marked “Pause”; this will stop any auto loading. Note that if you subsequently uncheck the box, files that arrived in the intervening period will not be loaded.

Note

Monitoring folders that reside on network drives may or may not work.

User Configuration

It is customizable using ~/.ginga/plugin_AutoLoad.cfg, where ~ is your HOME directory:

#
# AutoLoad plugin preferences file
#
# Place this in file under ~/.ginga with the name "plugin_AutoLoad.cfg"

# None or the name of a folder to watch
watch_folder = None

# None or a Python regex to check the filename.  If matching, will
# try to auto load it (example: "^.+\.fits$")
filename_regex = None

# Start off with auto-loading paused
start_paused = False