From b6c54d40e5562303c6e5aff59aca01342f0056bd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 28 Feb 2014 18:42:31 -0400 Subject: show how to set up preferred content for IA like the webapp does --- doc/tips/Internet_Archive_via_S3.mdwn | 35 +++++++++++++++++++++++++++++++---- 1 file changed, 31 insertions(+), 4 deletions(-) (limited to 'doc/tips/Internet_Archive_via_S3.mdwn') diff --git a/doc/tips/Internet_Archive_via_S3.mdwn b/doc/tips/Internet_Archive_via_S3.mdwn index eba28961d..15f241c9f 100644 --- a/doc/tips/Internet_Archive_via_S3.mdwn +++ b/doc/tips/Internet_Archive_via_S3.mdwn @@ -15,7 +15,12 @@ from archive.org, without needing any login or password info. This makes the Internet Archive a nice way to publish the large files associated with a public git repository. ----- +## webapp setup + +Just go to "Add Another Repository", pick "Internet Archive", +and you're on your way. + +## basic setup Sign up for an account, and get your access keys here: @@ -40,7 +45,7 @@ specify `x-archive-meta*` headers to add metadata as explained in their Then you can annex files and copy them to the remote as usual: - # git annex add photo1.jpeg --backend=SHA1E + # git annex add photo1.jpeg --backend=SHA256E add photo1.jpeg (checksum...) ok # git annex copy photo1.jpeg --fast --to archive-panama copy (to archive-panama...) ok @@ -50,9 +55,31 @@ from it. Also, git-annex whereis will tell you a public url for the file on archive.org. (It may take a while for archive.org to make the file publically visibile.) -Note the use of the SHA1E [[backend|backends]] when adding files. That is +Note the use of the SHA256E [[backend|backends]] when adding files. That is the default backend used by git-annex, but even if you don't normally use -it, it makes most sense to use the WORM or SHA1E backend for files that +it, it makes most sense to use the WORM or SHA256E backend for files that will be stored in the Internet Archive, since the key name will be exposed as the filename there, and since the Archive does special processing of files based on their extension. + +## publishing only one subdirectory + +Perhaps you have a repository with lots of files in it, and only want +to publish some of them to a particular Internet Archive item. Of course +you can specify which files to send manually, but it's useful to +configure [[preferred_content]] settings so git-annex knows what content +you want to store in the Internet Archive. + +One way to do this is using the "public" repository type. + + git annex enableremote archive-panama preferreddir=panama + git annex wanted archive-panama standard + git annex group archive-panama public + +Now anything in a "panama" directory will be sent to that remote, +and anything else won't. You can use `git annex copy --auto` or the +assistant and it'll do the right thing. + +When setting up an Internet Archive item using the webapp, this +configuration is automatically done, using an item name that the user +enters as the name of the subdirectory. -- cgit v1.2.3