• Stars
    star
    232
  • Rank 169,309 (Top 4 %)
  • Language
    JavaScript
  • License
    GNU Affero Genera...
  • Created about 6 years ago
  • Updated 8 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Offline Internet Archive project

Offline Internet Archive

Introduction to the Offline Internet Archive project

The internet now seems like a utility, available everywhere from our homes and offices to trains and planes. But utility-level access is not yet a reality for more than half of the world’s population who lack consistent, or indeed any access, to the Internet.

Why?

  • Cost: Internet access is unaffordable to people with low or no income.
  • Connectivity: In many developing countries and rural areas the infrastructure that enables internet access is unreliable, slow, or simply unavailable. Natural disasters, uprisings, and war compound the challenge.
  • Censorship: Some countries limit internet access for political reasons. Several countries block the Internet Archive. In some countries, Facebook has become synonymous with the internet – but it is hardly a substitute for free and open World Wide Web.

The Internet Archive offers perhaps the world’s largest online store of open content. The wisdom of the ages, just a few clicks away. As Wikipedia has become the world’s encyclopedia, the Internet Archive has become its library. Central to our mission is establishing “Universal Access to All Knowledge”. Access to our library of millions of books, journals, audio and video recordings and beyond is free to anyone — with one caveat — the need for a reliable internet connection.

Lack of access to today’s internet is a significant factor in poorer educational outcomes, inter-generational poverty and disempowerment as identified by the UN in their Sustainable Development Goal #9. The Offline Archive project works towards making online collections available — regardless of internet availability.

Part of the challenge is that those of us who live where the Internet works well, are adding graphics, video and other demands on bandwidth faster than access is being improved in many parts of the world.

An evolving ecosystem is emerging to enable access over poorer internet. Typically the approaches build around low cost, low power, devices that can be installed, in communities and schools for example, and deliver content either offline or through better usage of a narrow pipe to the net.

We have built an offline server that:

  • Crawls Internet Archive collections to a local server,
  • Serves that content locally,
  • Caches content while browsing,
  • Moves content between servers by sneakernet — on disks, USB sticks, and SD cards,
  • Delivers (mostly) the Internet Archive UI offline in javascript in the browser,
  • Is open source,
  • And is being made available in other languages.

The server is integrated into the Internet-In-A-Box (IIAB) platform, and can be installed on top of the Rachel platform, or hopefully any linux based platform. Our approach should improve access for anything from a US$20 Raspberry Pi up to a server holding terabytes of data for an institution. We are also collaborating with other parts of the ecosystem, integrating the Archive’s APIs with those of other partners, to make it easier for them to incorporate Archive content.

Contributing

We'd love to have you contribute, please email [email protected], or interact with the rest of this repo, and I'll figure out how to help you get started. (TODO setup a better channel for this !)

Installation

If you would like to run the offline archive server then see INSTALLATION.md, and the documents it points to.

If you want to fix bugs, develop code or contribute in other ways then see INSTALLATION-dev.md. (Note this document was written for Mac OSX users, a useful task would be for someone with a Linux machine to make any edits to it if required, or just confirms it is correct.)

Also see these documents to update an existing installation, Or to troubleshoot an existing installation.

Using it - starting the server.

See the Installation docs, but on most platforms (except, currently, on Mac OSX) the server should start at reboot.

If not, then assuming you've got it installed in your home directory ...

cd ~/node_modules/dweb-mirror && ./internetarchive --server &

Or a slightly different location for the developers.

The startup is a little slow but you'll see some debugging when its live

On platforms where it starts automatically (e.g. IIAB, Rachel), it can be turned on or off at a terminal window with service internetarchive start or service internetarchive stop

Browsing

Open the web page - the address depends on the platform.

Try walking through ./USING.md to get a tour of the system, and you can click Home or the Internet Archive logo, if you just want to explore the Internet Archive's resources.

Administration

Administration is carried out mostly through the same User Interface as browsing.

Select local from any of the pages to access a display of local content. Administration tools are under Settings.

Click on the Archive logo, in the center-top, to get the Internet Archive main interface if connected to the net.

While viewing an item or collection, the Crawl button in the top bar indicates whether the item is being crawled or not. Clicking it will cycle through three levels:

  • No crawling
  • Details - sufficient information will be crawled to display the page, for a collection this also means getting the thumbnails and metadata for the top items.
  • Full - crawls everything on the item, this can be a LOT of data, including full size videos etc, so use with care if bandwidth/disk is limited.

Disk storage

The server checks for caches of content in directories called archiveorg in all the likely places, in particular it looks for any inserted USB drives on most systems, and if none are found, it uses ~/archiveorg.

The list of places it checks, in an unmodified installation can be seen at https://github.com/internetarchive/dweb-mirror/blob/master/configDefaults.yaml#L7.

You can override this in dweb-mirror.config.yaml in the home directory of the user that runs the server. (Note on IIAB this is currently in /root/dweb-mirror.config.yaml) (see 'Advanced' below)

Archive's Items are stored in subdirectories of the first of these directories found, but are read from any of the locations.

If your disk space is getting full, its perfectly safe to delete any subdirectories (except archiveorg/.hashstore), and the server will refetch anything else it needs next time you browse to the item while connected to the internet.

It is also safe to move directories to an attached USB (underneath a archiveorg directory at the top level of the disk) It is also safe to move attached USB's from one device to another.

Some of this functionality for handling disks is still under active development, but most of it works now.

Maintenance

If you are worried about corruption, or after for example hand-editing or moving cached items around.

Run everything as root

sudo su

cd into location for your installation

cd ~/node_modules/@internetarchive/dweb-mirror
./internetarchive -m

This will usually take about 5-10 minutes depending on the amount of material cached, just to rebuild a table of checksums.

Advanced

Most functionality of the tool is controlled by two YAML files, the second of which you can edit if you have access to the shell.

You can view the current configuration by going to /info on your server. The default, and user configurations are displayed as the 0 and 1 item in the /info call.

In the Repo is a default YAML file which is commented. You really should never need to edit this file, as anything in it can be overridden by lines in ~/dweb-mirror.config.yaml. Make sure you understand how yaml works before editing this file, if you break it, you can copy a new default from dweb-mirror.config.yaml on the repo

Note that this file is also edited automatically when the Crawl button described above is clicked.

As the project develops, this file will be more and more editable via a UI.

Crawling

The Crawler runs automatically at startup and when you add something to the crawl, but it can also be configurable through the YAML file described above or run at a command line for access to more functionality.

In a shell

sudo sh

cd into the location for your installation, on most platforms it is

cd ~/node_modules/@internetarchive/dweb-mirror 

Or on IIAB it would be

cd /opt/iiab/internetarchive/node_modules/@internetarchive/dweb-mirror

Perform a standard crawl

./internetarchive --crawl 

To fetch the "foobar" item from IA

./internetarchive --crawl foobar 

To crawl top 10 items in the prelinger collection sufficiently to display and put them on a disk plugged into the /media/pi/xyz

./internetarchive --copydirectory /media/pi/xyz/archiveorg --crawl --rows 10 --level details prelinger

To get a full list of possible arguments and some more examples

./internetarchive --help

More info

I recommend following through the tour in USING.md

Dweb-Mirror lives on GitHub at:

This project is part of the Internet Archive's larger Dweb project, see also:

More Repositories

1

openlibrary

One webpage for every book ever published!
Python
4,933
star
2

heritrix3

Heritrix is the Internet Archive's open-source, extensible, web-scale, archival-quality web crawler project.
Java
2,718
star
3

bookreader

The Internet Archive BookReader
JavaScript
945
star
4

brozzler

brozzler - distributed browser-based web crawler
Python
635
star
5

wayback-machine-webextension

A web browser extension for Chrome, Firefox, Edge, and Safari 14.
JavaScript
613
star
6

warcprox

WARC writing MITM HTTP/S proxy
Python
366
star
7

openlibrary-client

Python Client Library for the Archive.org OpenLibrary API
Python
352
star
8

warc

Python library for reading and writing warc files
Python
233
star
9

warctools

Command line tools and libraries for handling and manipulating WARC files (and HTTP contents)
Python
142
star
10

bookserver

Archive.org OPDS Bookserver - A standard for digital book distribution
Python
115
star
11

internetarchivebot

PHP
113
star
12

fatcat

Perpetual Access To The Scholarly Record
Python
109
star
13

archive-pdf-tools

Fast PDF generation and compression. Deals with millions of pages daily.
Python
79
star
14

fatcat-scholar

search interface for scholarly works
Python
76
star
15

iaux

Monorepo for Archive.org UX development and prototyping.
JavaScript
63
star
16

umbra

A queue-controlled browser automation tool for improving web crawl quality
Python
58
star
17

openlibrary-bots

A repository of cleanup bots implementing the openlibrary-client
Python
57
star
18

dweb-archive

JavaScript
54
star
19

hind

Hashistack-IN-Docker (single container with nomad + consul + caddy)
Shell
53
star
20

wayback-machine-firefox

Reduce annoying 404 pages by automatically checking for an archived copy in the Wayback Machine. Learn more about this Test Pilot experiment at https://testpilot.firefox.com/
JavaScript
52
star
21

cdx-summary

Summarize web archive capture index (CDX) files.
Python
47
star
22

Zeno

State-of-the-art web crawler đź”±
Go
45
star
23

internet-archive-voice-apps

Voice Apps (Actions on Google, Alexa Skill) of Internet Archive. Just say: "Ok Google, Ask Internet Archive to Play Jazz" or "Alexa, Ask Internet Internet Archive to play Instrumental Music"
JavaScript
45
star
24

liveweb

Liveweb proxy of the Wayback Machine project
Python
44
star
25

epub

For code related to making ePub files
Python
40
star
26

trough

Trough: Big data, small databases.
Python
36
star
27

dweb-transport

Internet Archive Decentralized Web Common API
36
star
28

archive-hocr-tools

Efficient hOCR tooling
Python
32
star
29

wayback-diff

React components to render differences between captures at the Wayback Machine
JavaScript
30
star
30

dweb-transports

JavaScript
25
star
31

sandcrawler

Backend, IA-specific tools for crawling and processing the scholarly web. Content ends up in https://fatcat.wiki
HTML
24
star
32

crawling-for-nomore404

Python
23
star
33

snakebite-py3

Pure python HDFS client: python3.x version
Python
22
star
34

ia-hadoop-tools

Java
21
star
35

iiif

The official Internet Archive IIIF service
JavaScript
21
star
36

dweb-gateway

Decentralized web Gateway for Internet Archive
Python
21
star
37

newsum

Daily TV News Summary using GPT
Python
20
star
38

arklet

ARK minter, binder, resolver
Python
18
star
39

xfetch

Cache stampede test harness. Code accompanies the presentation made at RedisConf 2017, 30 May to 1 June, 2017, in San Francisco.
PHP
18
star
40

openlibrary-librarians

Coordination between the OpenLibrary.org Librarian community
16
star
41

scrapy-warcio

Support for writing WARC files with Scrapy
Python
13
star
42

arch

Web application for distributed compute analysis of Archive-It web archive collections.
Scala
13
star
43

iacopilot

Summarize and ask questions about items in the Internet Archive
Python
13
star
44

iari

Import workflows for the Wikipedia Citations Database
Python
12
star
45

doublethink

rethinkdb python library
Python
11
star
46

s3_loader

Watch for local files to appear and move them into S3
Python
11
star
47

wayback-machine-android

Kotlin
10
star
48

Sparkling

Internet Archive's Sparkling Data Processing Library
Scala
10
star
49

archive-commons

Java
10
star
50

draintasker

a tool for continuously ingesting w/arc files into the archive
Python
9
star
51

ias3

Internet Archive S3-like connector
Python
8
star
52

cicd

build & test using github registry; deploy to nomad clusters
7
star
53

wayback-radial-tree

JavaScript
7
star
54

chocula

journal-level metadata munging. part of fatcat project
Python
7
star
55

read_api_extras

Demo code for the Open Library Read API
7
star
56

web_collection_search

An API wrapper to the Elasticsearch index of web archival collections and a web UI to explore those indexes.
Python
7
star
57

dweb-archivecontroller

JavaScript
7
star
58

epub-labs

epub-labs
6
star
59

ia

A JS interface to archive.org
JavaScript
6
star
60

iaux-typescript-wc-template

IAUX Typescript WebComponent Template
TypeScript
6
star
61

wikibase-patcher

Python library for interacting with the Wikibase REST API
Python
6
star
62

offlinesolr

Tool to build solr index offline
Java
6
star
63

ia-bin-tools

Internet Archive Command-line Utilities
C
6
star
64

dweb-objects

JavaScript
5
star
65

archive-ocr-tools

Python
5
star
66

iare

An interactive IARI JSON viewer
JavaScript
5
star
67

wayback-machine-safari

JavaScript
5
star
68

collections-cleaners

Shell
5
star
69

trendmachine

A mathematical model to calculate a normalized score to quantify the temporal resilience of a web page as a time-series data based on the historical observations of the page in web archives.
Python
5
star
70

acs4_py

Python interface to ACS4
Python
4
star
71

esbuild_es5

minify JS/TS files using `esbuild` and `swc` down to ES5 (uses `deno`)
TypeScript
4
star
72

iaux-search-service

TypeScript
4
star
73

map-of-the-web

Python
4
star
74

eventer

Eventer is a simple event dispatching library in Python
Python
4
star
75

iaux-donation-form

The Internet Archive Donation Form
TypeScript
4
star
76

internetarchive.github.com

Internet Archive Open Source Blog
CSS
4
star
77

isodos

Go module to interact with Internet Archive's Isodos API
Go
4
star
78

internet-archive-alexa-skill

JavaScript
3
star
79

mediawiki-extension-archive-leaf

A MediaWiki extension that supports importing of Archive.org palm leaf items
JavaScript
3
star
80

hashitalksdemo

JavaScript
3
star
81

openlibrary-api

API documentation for https://github.com/internetarchive/openlibrary
HTML
3
star
82

iaux-collection-browser

TypeScript
3
star
83

btget

Command line retrieval of torrents using transmission-daemon (via transmission-remote)
Python
3
star
84

strainer

Heritrix frontier files manipulation tool.
Go
3
star
85

httpd

Fast and easy-to-use web server, using the Deno native http server (hyper in rust). It serves static files & dirs, with arbitrary handling using an optional `handler` argument.
JavaScript
3
star
86

file_server_plus

`deno` static file webserver, clone of `file_server.ts`, PLUS an additional final "404 handler" to run arbitrary JS/TS
TypeScript
2
star
87

dyno

JavaScript
2
star
88

tarb_insights

A Streamlit application to visualize Wikipedia IABot statistics
Python
2
star
89

rulesengine-client

Python client package for the playback rules engine
Python
2
star
90

coderunr

deploy saved changes to website unique hostnames instantly -- can skip commits, pushes & full CI/CD
Shell
2
star
91

archiveorg-e2e-playwright

TypeScript
2
star
92

deferred

Redis promises & futures library for Predis / PHP
PHP
2
star
93

hello-js

an example of full CI/CD from GitHub to a nomad cluster
JavaScript
2
star
94

wiki-references-db

Data models and scripts to build a database of references (broadly defined) appearing on Wikipedia and other wikis
Python
2
star
95

maisy

Project Gutenberg collection importation via IAS3 interface
Python
2
star
96

kohacon2011-presentation

Presentation for KohaCon 2011
Shell
2
star
97

rulesengine

model and front-end for rules for managing wayback playback
Python
2
star
98

deploy

GitHub Action to deploy to a nomad cluster
2
star
99

iaux-democracys-library

A web component that highlights Democracy's Library
TypeScript
2
star
100

cgraphbot

Wikibase bot for updating identifiers and citation relationships
Python
2
star