Package: memento-cli
memento-cliA command line tool interacting with Memento (RFC 7089) supporting web archives, such as the Internet Archive's Wayback Machine.For more background on why this tool was created see:https://inkdroid.org/2023/09/14/memento-bisect/UsageList SnapshotsTo list all the available snapshots (or Mementos) for a given snapshot you can use thelistcommand:$mementolisthttps://web.archive.org/web/20230407140923/https:/help.twitter.com/en/rules-and-policies/hateful-conduct-policy2017-12-2905:40:51https://web.archive.org/web/20171229054051/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-0320:03:00https://web.archive.org/web/20180103200300/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-0406:39:58https://web.archive.org/web/20180104063958/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-0616:08:07https://web.archive.org/web/20180106160807/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-1206:10:07https://web.archive.org/web/20180112061007/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-1217:40:16https://web.archive.org/web/20180112174016/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-1218:40:34https://web.archive.org/web/20180112184034/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-1219:11:48https://web.archive.org/web/20180112191148/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-2019:05:57https://web.archive.org/web/20180120190557/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy2018-01-2019:19:20https://web.archive.org/web/20180120191920/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy
...Sincemementoworks with any RFC 7089 supporting archive you can use it to list versions in other web archives as well:$mementolisthttps://www.webarchive.org.uk/wayback/archive/20130501020401/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition/2013-05-0102:03:57https://www.webarchive.org.uk/wayback/archive/20130501020357mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition2013-05-0102:04:01https://www.webarchive.org.uk/wayback/archive/20130501020401mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition/2013-07-2912:58:03https://www.webarchive.org.uk/wayback/archive/20130729125803mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition2013-07-2912:58:06https://www.webarchive.org.uk/wayback/archive/20130729125806mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition/2021-01-2206:38:21https://www.webarchive.org.uk/wayback/archive/20210122063821mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition/2022-03-1416:36:16https://www.webarchive.org.uk/wayback/archive/20220314163616mp_/http://www.vam.ac.uk/content/exhibitions/david-bowie-is/david-bowie-is-inside-the-exhibition/Searching for Changes (Bisect)Let's suppose you know that theTwitter Hateful Conduct Policyused to have language about:women, people of color, lesbian, gay, bisexual, transgender, queer, intersex, asexual individualsYou can see it in the Internet Archive Wayback Machinein 2019. But you can't see iton the page in 2023. To identify when the change was introduced, you canbisectthe version history to search for the version where the text went missing, using the two snapshots and the--textoption. This will perform a binary search between the two versions looking for the text.$mementobisect--missing--text"women, people of color, lesbian, gay"\https://web.archive.org/web/20190711134608/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policy\https://web.archive.org/web/20230621094005/https://help.twitter.com/en/rules-and-policies/hateful-conduct-policyThe--textvalue can be a regular expression too if you want. If you only provide one snapshot URL it will use that as the start index, and use the last snapshot in the archive as the end.Thebisectcommand uses a browser behind the scenes (using Selenium) in order to fully render the page. If you wanted to find out when some text appears (rather than goes missing) then remove the--missingparameter from the command.And if you would prefer to examine the pages in between manually, leave off the--textparameter andmementowill prompt you to continue, and show you the browser it is controlling.If you would like to see the browser when using--textuse the--show-browseroption.