Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 79 lines (57 sloc) 2.152 kb
f20855d Stole lots of code from the twitter gem today. I'll steal more tomor…
papyromancer authored
1 archive
2f2ae45 Initial commit to archive.org.
papyromancer authored
2 ===========
3
f20855d Stole lots of code from the twitter gem today. I'll steal more tomor…
papyromancer authored
4 This is a gem for storing files on The Internet Archive, http://Archive.org/ .
2f2ae45 Initial commit to archive.org.
papyromancer authored
5
6 COPYRIGHT
7 =========
8
4c85979 thinking about use cases and class structure. This is way disorganiz…
Philip (flip) Kromer authored
9 Copyright (c) 2009 Papyromancer. See LICENSE for details.
10
11 Use cases
12
13 * create a payload
14 - add files
15 - specify payload metadata
16
17 * transfer payload from one place to another
18 - check availability on destination
19 - create repository on destination
20 - transfer bundle (files and metadata files)
21 - verify transfer succeeded
22
23 Classes
24
b315686 Organizing into payload / payload_files / repositories
Philip (flip) Kromer authored
25 A Payload contains PayloadFiles and has associated freeform metadata describing
26 the Payload as a whole.
84204c9 maybe the right way to organize
Philip (flip) Kromer authored
27
28 A PayloadFile describes a single file within a payload, along with its freeform
29 metadata.
30
31 A repository contains many payloads. It can be a RemoteRepository or a Local
32 Repository
33
34 A PayloadInstance is a realization of a payload -- perhaps a directory on disk,
35 or its instance on archive.org
36
37 An ArchiveOrgFormatPayloadInstance is in archive.org format; it can be local or
38 remote.
39
4c85979 thinking about use cases and class structure. This is way disorganiz…
Philip (flip) Kromer authored
40 * Payload -- specifies [PayloadItem]s to include and the associated metadata
41 * PayloadItem -- a file within a payload
42
43 * GenericPayloadInstance
44 - add items
45 - list items
46 - metadata_store
47 - load
48 - save
49
50 * PayloadInstance::GenericRemote
51 - local_payload_instance
52 - fetch_from_remote
53 - send_to_remote
54
55 * PayloadInstance::GenericLocalDir --
56 - root_path -- directory containing payload
57 - metadata_file_path --
58 - listing_file_path -- file on disk
59 - contents_file_paths -- paths to the actual PayloadFiles on disk
60
61 * ArchiveOrg::RemotePayloadInstance -- the instantiation of a given payload on the
62 archive.org servers.
63
64 * ArchiveOrg::LocalDirPayloadInstance --
65 - metadata_store -- archive.org _meta.xml file on disk
66 - listing_store -- archive.org _files.xml file on disk
67 - files -- the actual PayloadFiles on disk
68
69 * ArchiveOrg::PayloadMetadataXml
70 - Archive.org format XML stream for metadata
71 * ArchiveOrg::PayloadListingXml
72 - Archive.org format XML stream for file listing
73
74 * TmpDirPayloadInstance
75 Specifically locates payload instance in the tmp dir
76
77 * PayloadTransferStrategy
78 Figures out how to transfer data from one payload instance to another
Something went wrong with that request. Please try again.