archive_is

Crates.ioarchive_is
lib.rsarchive_is
version0.2.0
sourcesrc
created_at2023-04-04 05:43:51.107553
updated_at2023-04-05 02:42:06.210124
descriptionA small crate to use for archiving and accessing already-archived websites on https://archive.is
homepagehttps://github.com/UnsafeOats/archive_rs
repositoryhttps://github.com/UnsafeOats/archive_rs
max_upload_size
id829893
size15,329
shane s (UnsafeOats)

documentation

README

archive-rs

just a small crate to interact with https://archive.is in the wild. i reverse-engineered the major parts of the archive.is api and have provided two simple methods of interacting with archive.is from inside your rust code.

how to use

this crate is designed with simplicity in mind. most people will want to use the wait_for_archive method of the ArchiveSesh struct. this method will simply take a url and some time parameters (for waiting) and then executing the following sequential steps:

  1. if url has already been archived, returns a link to the most recent archived version
  2. if url has not been archived, submit the url to be archived and wait until the archival process is complete * there are limitations to this waiting, however. you must set a wait duration and maximum number of retries, if you hit those max retries it will simply return the link to the in-progress archive

that's it (for the most part). check the examples folder for a simple crate example showing how to use.

limitations

it uses tokio for async. that's it. if you like a different async runtime, i'm sorry, but no one else will ever see this and i use tokio. (i'm open to PRs if you want tho)

license

mit.

Commit count: 8

cargo fmt