Permalink
Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
79 lines (57 sloc) 2.1 KB
archive
===========
This is a gem for storing files on The Internet Archive, http://Archive.org/ .
COPYRIGHT
=========
Copyright (c) 2009 Papyromancer. See LICENSE for details.
Use cases
* create a payload
- add files
- specify payload metadata
* transfer payload from one place to another
- check availability on destination
- create repository on destination
- transfer bundle (files and metadata files)
- verify transfer succeeded
Classes
A Payload contains PayloadFiles and has associated freeform metadata describing
the Payload as a whole.
A PayloadFile describes a single file within a payload, along with its freeform
metadata.
A repository contains many payloads. It can be a RemoteRepository or a Local
Repository
A PayloadInstance is a realization of a payload -- perhaps a directory on disk,
or its instance on archive.org
An ArchiveOrgFormatPayloadInstance is in archive.org format; it can be local or
remote.
* Payload -- specifies [PayloadItem]s to include and the associated metadata
* PayloadItem -- a file within a payload
* GenericPayloadInstance
- add items
- list items
- metadata_store
- load
- save
* PayloadInstance::GenericRemote
- local_payload_instance
- fetch_from_remote
- send_to_remote
* PayloadInstance::GenericLocalDir --
- root_path -- directory containing payload
- metadata_file_path --
- listing_file_path -- file on disk
- contents_file_paths -- paths to the actual PayloadFiles on disk
* ArchiveOrg::RemotePayloadInstance -- the instantiation of a given payload on the
archive.org servers.
* ArchiveOrg::LocalDirPayloadInstance --
- metadata_store -- archive.org _meta.xml file on disk
- listing_store -- archive.org _files.xml file on disk
- files -- the actual PayloadFiles on disk
* ArchiveOrg::PayloadMetadataXml
- Archive.org format XML stream for metadata
* ArchiveOrg::PayloadListingXml
- Archive.org format XML stream for file listing
* TmpDirPayloadInstance
Specifically locates payload instance in the tmp dir
* PayloadTransferStrategy
Figures out how to transfer data from one payload instance to another