forked from edsu/ptree
-
Notifications
You must be signed in to change notification settings - Fork 0
minimal PairTree implementation
gsf/ptree
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
The ptree module has two functions to help you work with PairTree identifiers and file paths: id2ptree and ptree2id. PairTree [1] is an technique from the digital preservation community for safely mapping identifiers to file paths, and back again. It can be helpful when writing resources to disk so that they can be identified later on by merely looking at the filesystem layout. >>> import ptree >>> ptree.id2ptree("info:lccn/12345678") '/in/fo/+l/cc/n=/12/34/56/78/' >>> ptree.ptree2id('/in/fo/+l/cc/n=/12/34/56/78/') u'info:lccn/12345678' ptree draws from Ben O'Steen's PairTree Python module [2], which provides a lot more functionality for storing bitstreams on disk. ptree intentionally focuses soley on the identifier/filepath mapping, and leaves IO operations up to you. The unit tests were shamlessly stolen from John Kunze's File::PairTree CPAN module [3]. Author: Ed Summers <ehs@pobox.com> License: Public Domain [1] https://confluence.ucop.edu/display/Curation/PairTree [2] http://pypi.python.org/pypi/Pairtree [3] http://search.cpan.org/dist/Pairtree/
About
minimal PairTree implementation
Resources
Stars
Watchers
Forks
Releases
No releases published
Packages 0
No packages published
Languages
- Python 100.0%