Internet Archive CLI Tool

From Minetest
Revision as of 23:04, 23 November 2023 by Poetry (talk | contribs)



Introduction

This page provides some information related to an Internet Archive CLI tool.

Internet Archive CLIs tool 

The Internet Archive can be used for FOSS distribution and backup purposes. The procedures used are finicky, flaky, and unreliable. However, this approach may be useful to a limited extent.

The steps below worked as of Fall 2023. They may or may not still work.

S1) As of Fall 2023, the link below worked and pointed to a Python binary script:

https://ia800702.us.archive.org/27/items/ia-pex/ia

Install the script on a Debian 11 box and chmod it to 755. This may then provide CLI access to Internet Archive.

S2) Use the following command to configure the tool:

ia configure

S3) A command similar to the following may then work to upload a source code tarball to Internet Archive:

ia upload \
--metadata=mediatype:software \
Final_Minetest_Assemble \
minetest-assemble-231123.tgz

The user needs to enter some information manually using the Internet Archive web GUI. This includes original creator, original date, and description.

The "Final_Minetest_Assemble" string in this example should be replaced with a unique item ID. Note: The ID can't be changed later.

S4) To replace the uploaded file, without deleting the item ID, one could try this:

ia delete Final_Minetest_Assemble
# repeat the ia upload

S5) Two warnings:

Warning #1: If one deletes the item ID at the GUI level, it is then gone forever.

Warning #2: It doesn't seem to be possible to change mediatype for an item ID once it's set; either using the IArchive GUI or CLI. An item ID can have multiple files. The primary file needs to be uploaded first and the mediatype needs to be specified, and specified correctly, for that file.

S6) Supported mediatypes seem to include: software, movies, image, texts

For anything else, don't set the mediatype.

S7) If a source-code tarball is uploaded in this manner, one can upload a JPEG or PNG file subsequently to the same item ID:

ia upload \
Final_Minetest_Assemble \
screenshot.png

Note that mediatype isn't specified here because this isn't an upload of the primary file.

If things work correctly, the IArchive GUI may then display the screenshot in connection with the tarball.

End of page