Libraries & Code Snippets

On this page we present Libraries, Modules and Code-Snippets from other applications that might be interesting for picurl. All entries are categorized after their field of application and if any FOSS license applies, it should also be stated. We also try to describe the library in a short summary and give a "suitability rating" (does the code really fit into picurl's concept?).

Some of the listed libraries are already serving picurl - see Dependencies

Metadata Extraction

  • The big picture "The Big Picture is an early attempt for a Python library to read and write Exif and IPTC metadata from and to JPEG and TIFF files" (Quoting from the website). Still needs to be tested exhaustively (LGPL)
  • JPEG.py - "A python library to parse, read and write JPEG EXIF, IPTC and COM metadata." (The Gist License - OSI approved)
  • PIL IPTC Hack A helper function from Frederik Lundh that extends PIL with simple IPTC parsing capabilities.
  • XMP.py Very simple module to extract XMP information from a JPEG or PDF file and return it in XML format.
  • Good ol' EXIF.py Python library to extract EXIF data from tiff and jpeg files. Very easy to use - $ ./EXIF.py image.jpg. Originally written by Gene Cash / Thierry Bousch. (License: BSD)
  • ExifTool ExifTool ist the most feature-complete Metadata extractor. It can read/write EXIF,GPS,IPTC,XMP data to numerous image/audio/video files. Unfortunately, it is written in perl and distributed under the Perl License.

File Transfer

The most dominant question that arises with file transfers and picurl is if picurl should support multiple transfers at once. while being a standard feature in every ftp client, no image uploading tool i know of supports this (Google Picasa, Flickr Uploadr,...). Multiple-Transfers has clear advantages with small files, but it would be interesting to measure their speed gain with bigger files.

  • URLGrabber URLGrabber is a HTTP/FTP-Download library in Python and based on Urllib2. It extends Urllib2 by providing multiple downloads, bandwidth throtteling,... Because no upload facility is provided, it can not make its way into picurl, but serves as a good extending example for urllib2.
  • pylibcurl pylibcurl is a python wrapper for libcurl, a very fast and feature complete library for HTTP(S),FTP and many other protocols. It's drawbacks are the "external" dependency (libcurl must be installed separately) and the more complex, C-oriented interface.
  • ftputil is a high-level wrapper for Python's integrated ftplib. It allows you to access files on FTP server similar to the os.path module.

Watching a Disk Folder for Changes

e.g. if pictures are saved/deleted in the folder and trigger an action.

  • EventGhost is an open-source, event-based automation tool for Windows in Python. It offers a Watch Folder Plugin, that triggers actions when a folder is modified (deletion of containing files,...). As this approach uses the win32 api, it scales quite well. However, it should only be used to watch a certain nested folderset (My Images in Windows Home directory) and not a complete hard disk.

MS Windows Specific

Information that can be retrieved using simple shell statements under Linux, requires more hacking under windows. Here are some recipes that might be helpful for picurl: