979e2b0735c0f60924a7e585c09e7438
dropbox

Contents of 1.0.1 Size Date

Index file generated on 2011-10-19 18:39 with pyndexer v.1.2.4
upParent directory
file_README-FIRST.html 7 KB 2011-01-06 16:05
filejsencryption.js 23 KB 2010-06-21 15:50
filejwplay.js 1 KB 2011-03-01 15:41
fileplayer.swf 80 KB 2009-12-04 12:44
filepyndexer.empty.ini 4 KB 2011-01-06 19:20
filepyndexer.exe 3.38 MB 2011-01-06 19:28
filepyndexer.html 134 KB 2011-01-06 19:28
filepyndexer.ini 4 KB 2011-01-06 19:20
filepyndexer.py 22 KB 2011-01-06 20:06
filepyndexer.template.css 1 KB 2010-06-28 19:26
filepyndexer.template.html 4 KB 2011-03-01 15:42
filesetup.py 594 bytes 2011-01-06 16:52
fileswfobject.js 7 KB 2010-03-08 14:31

pyndexer - index your public folders (semi) automatically!

Dropbox Forum's discussion thread: http://forums.dropbox.com/topic.php?id=3075

This README is for the 1.0.1 version.
If you do find any bugs, please give feedback on the forum thread listed above.

Description of the script

As it is now, (even after the new sharing model), the files on your Public folder are only public if you know the address to get them, or you want to customize it further - ignore some files, or subfolders, or even password protect some of them.

As a workaround, this script generates an HTML index for a folder and all folders within, with links for files inside each folder.
Optionally it encrypts the listing so only one with the password can see what is listed.
As a bonus it will embed the JW Player to play some mp3 or mp4 files, and more if you want to tweak it.

ChangeLog

Read it on the script itself, or the pyndexer.html auto-generated beautifully colored file :)

License

Copyleft. Feel free to copy, edit, and share your thoughts and patches ;)

Install

See the index to locate what you need to download.

Windows (XP, Vista, 7):
Download the EXE if you do not have a python environment setup.
If the EXE does not run or gives you weird errors like msvcX71.dll not found or EOFError while reading line, you probably need to first download these two DLLs from here and here.
Check your antivirus too, maybe it is blocking the program - Already happened at least once.

Linux, OSX, Windows with python environment:
Download the PY script and set its permission to execute (chmod +x pyndexer.py or use your "explorer" thing).
If you are online, the script will download a helper module called dbconfig.
If you are off the internets, you will need to download (link) it yourself. Place it in the same folder.

Usage

Download (if needed set it to execute!) and double click.
It will download the template HTML file, and then the sample pyndexer.empty.ini INI file (will rename it to pyndexer.ini on save -- this is what I use to generate these indexes here) to the same folder as the script itself, and will probably rant about no configured folders found as they are all commented out. ;)

Edit the pyndexer.ini as per the examples in the INI.

Caveat: if you have unicode or accented (anything like "ümlauth" or "cachaça") named folders/files to be indexed, and you want to list them on the INI file, you have to edit it with an unicode-aware text editor (like notepad++ - a nice editor!).
As my tests indicate if you just have non-configured subfolders it will index them fine.

It is a terminal (console, text-only, white-on-black-scary!) program!
Run it from your favorite terminal (shell) and pass to it the name of the folder/folders you want to index as arguments. It accepts no other things.
If no arguments are passed, it will index the "Current Configured Folders" defined in the INI file.
You can drag and drop a folder to the script to automatically "pass" it as the argument.

Template

The first thing the script does is check for the pyndexer.template.html file and if not found it will download it to the same folder where it is located. If you want, you can change it but keep in mind that I use a somewhat simplistic parser that will bail in any syntax error. Keep it conforming to the "XML/1.0 Transitional" standard to be safe.

Online play of media files

By default it uses my own template, which means that it will set as playable all MP3 and MP4 files it sees on the indexed folders. If you want to change it, change the template (and the INI:playinbrowser option) to remove/alter this functionality.
The player was tested to work only on the same subdomain as the files, so if you aren't publishing your files from dl.dropbox.com (it's configured in the template and in the jwplay.js file), then you need to publish the dependencies yourself.

Encryption

The EXE version includes the AES support, but if you use the script version, you will need M2Crypto installed.
Use apt-get or something else to install it, like:
apt-get install python-m2crypto (ubuntu)
easy_install m2crypto (python's setuptools)
Then just set the INI:password option. Keep in mind that it is not magical, and will NOT encrypt the files, just the links in the HTML index that point to them.
Thanks to Vincent Cheung's jsencript, the user's browser will decrypt it on-the-fly.

WARNING: DEFAULTS TO WORK RECURSIVELY.

Meaning it WILL overwrite ALL index.html files in the configured folders and subfolders, if you do not specify the INI:skipdir=yes for the ones you want to protect.
Note: you can use skipdir=index.html if you want the script to just put a link to them in the parent listing.

Side note: You can always use the revisions feature of dropbox to revert a lost index.html.

Remember, Dropbox is NOT a content distribution system.

Original: http://dl.dropbox.com/u/552/pyndexer/1.0.1/_README-FIRST.html
Other versions of pyndexer scripts: http://dl.dropbox.com/u/552/pyndexer/index.html
The pyndexer discussion thread on dropbox forums: http://forums.dropbox.com/topic.php?id=3075

EOF