File Selection Language 0.5.1
File Selection Language is a descriptive language for file selection.
FSL is useful for selective backups, for instance. FSL uses glob patterns as the basic building block.
For fine-tuning the selection, inclusion/exclusion rule combinations and conditional expressions are available. File size and modification date can be used in expressions.
Here are some key features of "File Selection Language":
· FSL can be used with a command line tool (fsltool) or, for Python programmers, with a programmable interface. For the Python interface, see the documentation of Interpreter.py.
· Several FSL rule files can be combined in a cascading manner similar to CSS. The effect is the same as if the rule files were pasted into a single file.
· Support for both Windows-like and Unix-like paths.
· Strict parse-time type checking to catch as many errors as possible before run-time. For example, you can't say EACH f IF size(5) > 1000 because function size expects filename argument.
· Python 2.3 or greater
· Download FSL
· Unpack the archive
· Install FSL:
If you have Python 2.4 or greater, and you want to install automatically, run python setup.py install. This installs FSL into your site-packages directory. You must have write permissions under site-packages.
If you have Python 2.3, you must install manually. If you plan to use FSL from the command line interface only, copy the FSL file tree into any directory of your choosing. If you plan to use FSL as a Python module as well, copy the fsl/ directory somewhere on your Python search path. To make sure you installed FSL correctly on the search path, execute import fsl.fsltool in a Python session.
· Test that the installation works by executing testall.py under fsl/test/. The tests take some time to finish. Expected result: one test fails (test_lexer.TestLexer.test_invalid), all others pass. If you get this result, you can assume the program is installed correctly. If more tests fail, try to see if there is something obviously wrong with the installation or environment; if not, contact the author.
· Next, you can start playing with fsltool (fsl/fsltool.py)
What's New in This Release:
· When root directory is the root of file system, globs beginning with * don't work (severity: high)
· make_struct.sh fails by raising exceptions (severity: low)
· test cases that check the modification time of a file don't work (severity: low)
· Interpreter.run raised other exceptions (such as WindowsError) than the ones mentioned in documentation (severity: low)