Source

django-filewatcher /

Filename Size Date modified Message
management
21 B
0 B
5.3 KB
1.9 KB
1.7 KB
===========
filewatcher
===========

This django's app is a command-line tool to watch a web app files modification.
It stores files description in database. It provides no view or form.

Typical usage
=============

1. Execute "manage.py filewatch --add path" to add files in path to watchlist
    May be a single file. If path is a directory, it will add files in path
    in watchlist if they have a .py, .php, .php4, .php5, .html or .js extension.
2. Add "manage.py filewatch --email" as a cronjob. If one or more file has been modifed,
    it will sends a report by email to settings.ADMINS
    
If you update files intentionnaly, you will have to execute
"manage.py filewatch --update path" to update file signatures.
Elsewhere, you may keep receiving alert reports.
    
Reports are saved in database too. See management/commands/filewatch.py
docstring for more options (update, list, remove, clear etc)

command options
===============

without option
    to build and save report
    
--print
    prints report to console (standard output)

--email
    sends report by email to settings.ADMINS

--add path
    add a path to watch list, either single file
    or any .php(4|5)? .py .html .js within path
    
--update path
    update files signature within path
    same filters as -add

--remove path
    remove files in path from watch list
    (all listed files, any extension)
    
--list
    prints watch list to standard output
    
--clear
    removes all files from watchlist
    
configuration
=============

Use the settings file.

You may define an alternatve database with
FILEWATCHER_USE_DB = 'alternate_db_configuration_name'

You can also define regular expression filters to define files being added when
the add path is a folder with

FILEWATCHER_REGEX_FILTERS = ('\.py$', '\.php\d?$', '\.html?$', '\.js$',)

default is above.