Internet Archive CLI Tool: Difference between revisions

From Minetest
No edit summary
No edit summary
Line 69: Line 69:
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.
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.


Warning #3: "ia" operations don't complete immediately on the Internet Archive side. Sometimes they may never complete. The only way to clean things up may be to delete an item ID on the GUI side. This is one reason to use numeric IDs instead of descriptive IDs. If you use a descriptive ID, you may end up needing to delete it and it won't be possible in this case to bring it up.
Warning #3: "ia" operations don't complete immediately on the Internet Archive side. Sometimes they may never complete. The only way to clean things up may be to delete an item ID on the GUI side.
 
The third warning above is one reason to use numeric IDs instead of descriptive IDs. If you use a descriptive ID, you may end up needing to delete it and it won't be possible in this case to bring it back. So descriptive IDs may end up being lost permanently and therefore wasted.


S6) Supported mediatypes seem to include: software, movies, image. "text" or "texts" may work as well but this hasn't been confirmed yet.
S6) Supported mediatypes seem to include: software, movies, image. "text" or "texts" may work as well but this hasn't been confirmed yet.

Revision as of 22:51, 23 November 2023



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 \
23112301 \
minetest-assemble-231123.tgz

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

The "23112301" string in this example should be replaced with a unique item ID. Note: The ID can't be changed later. The ID can be a descriptive string [using underscores instead of spaces] but for technical reasons this isn't recommended.

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

ia delete 23112301
# Repeat the "ia" upload

Replace 23112301 here with the appropriate item ID. Note: This operation deletes the contents of the item ID but not the item ID itself.

S5) Three warnings:

Warning #1: If one deletes an 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.

Warning #3: "ia" operations don't complete immediately on the Internet Archive side. Sometimes they may never complete. The only way to clean things up may be to delete an item ID on the GUI side.

The third warning above is one reason to use numeric IDs instead of descriptive IDs. If you use a descriptive ID, you may end up needing to delete it and it won't be possible in this case to bring it back. So descriptive IDs may end up being lost permanently and therefore wasted.

S6) Supported mediatypes seem to include: software, movies, image. "text" or "texts" may work as well but this hasn't been confirmed yet.

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 23112301 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