Skip to main content

Tool to archive a git repository form GitHub to the Internet Archive.

Project description

# iagitup - a command line tool to archive a GitHub repository to the Internet Archive

The python script downloads the GitHub repository, creates a [git bundle](https://git-scm.com/docs/git-bundle) and uploads it on an Internet Archive item with metadata from the GitHub API and a description from the repository readme.

## Prerequisites This script strongly recommends Linux or some sort of POSIX system (such as Mac OS X).

## Install iagitup

Prerequisites (with Debian or Ubuntu):

sudo apt update sudo apt install python python-pip python-dev libffi-dev libssl-dev git

### with pip:

pip install iagitup

### from source code:

Clone the repo and install the package…

git clone https://github.com/gdamdam/iagitup.git cd iagitup pip install .

## Usage

To upload a repo:

iagitup <github_repo_url>

You can add also custom metadata:

iagitup –metadata=<key:value,key2:val2> <github_repo_url>

To know the version:

iagitup -v

Example:

iagitup https://github.com/<GITHUBUSER>/<RESPOSITORY>

The script downloads the git repo from github, creates a git bundle and uploads it on the Internet Archive.

The repo will be archived in an item at url containing the repository name and the date of the last push, something like:

https://archive.org/details/github.com-<GITHUBUSER>-<RESPOSITORY>_-_<DATE-LAST-PUSH>

The git repo bundle will be available at url:

https://archive.org/download/github.com-<GITHUBUSER>-<RESPOSITORY>_-_<DATE-LAST-PUSH>/<BUNDLENAME>.bundle

## Restore an archived github repository

Download the bundle file, form the archived item:

https://archive.org/download/…/<ARCHIVED_REPO>.bundle

Just download the _.bundle_ file and run:

git clone file.bundle

## License (GPLv3)

Copyright (C) 2017-2018 Giovanni Damiola

This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

iagitup-1.6.2-py2-none-any.whl (7.4 kB view details)

Uploaded Python 2

File details

Details for the file iagitup-1.6.2-py2-none-any.whl.

File metadata

  • Download URL: iagitup-1.6.2-py2-none-any.whl
  • Upload date:
  • Size: 7.4 kB
  • Tags: Python 2
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.11.0 pkginfo/1.4.2 requests/2.18.4 setuptools/39.0.1 requests-toolbelt/0.8.0 tqdm/4.19.8 CPython/2.7.10

File hashes

Hashes for iagitup-1.6.2-py2-none-any.whl
Algorithm Hash digest
SHA256 63a239d92750c18d5d588a264d5a663012a986b4b8c01d0e00ad18b95b7f6096
MD5 420abc06bbcf539dfdc72232df778387
BLAKE2b-256 9a72d6d962bd58b722bc8b0ef622d4c713ada7d1c58850153eaefb6d8c3d9e97

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page