- Register a dropbox account
- Create a folder with the following name :
Public - Upload the style folder to the Public folder.
/style/style.css
-
Create a ./bin directory in your home directory
cd ~ mkdir .bin cd ./bin -
Download the PDI
wget https://github.com/bor-attila/python-indexer/archive/master.zip -
Unzip
unzip master.zip -
Create a (soft) link in ./bin
ln -s python-indexer-master/ppdi_vX.X.X/ppdi.py pdi
The PDI comes before the first index, it will open your webbrowser, and you will need to give permission to the PDI to index your dropbox. If this permission will be denied the PDI won't index your dropbox.
After the first successful indexing, the PDI will not ask permission again, so you can use it with crontab. (Don't forget to use -q for quiet mode, or use > /dev/null)
usage: ppdi.py [-h] [-l LANG] [-a] [-d DISABLER] [-s STYLEDIR] [-o] [-q]
optional arguments:
-h, --help
shows a help message
-l LANG, --lang LANG
Selected language in LanguageCode_Country format. eg: en_US
-a, --all
Indexing of folders.Each folder will appear on the generated HTML page. (Ignoring the disabler.)
-d DISABLER, --disabler DISABLER
It sets the prefix of the folder which is to be excluded from indexing. For example, if you do not want to share a directory from the Public dir, just rename the directory in a way that the first character should be the disabler. The dafult disabler is "." . eg: .mydir will be excluded from indexing.
-s STYLEDIR, --styledir STYLEDIR
The style directory in the Dropbox which contains the CSS stylesheet. You can put here images,js,css files as well. The style directory is automatically excluded from indexing.
-o, --openbrowser
It automatically opens the index.html from the root directory
-q, --quiet
No output
Run python pdi -h for more help