将git存储库从github存档到internet存档的工具。
iagitup的Python项目详细描述
#iagitup-将github存储库存档到Internet存档的命令行工具
python脚本下载github存储库,创建一个[git bundle](https://git-scm.com/docs/git-bundle),并使用github api中的元数据和存储库自述文件中的描述将其上载到internet存档项上。
##先决条件 这个脚本强烈推荐Linux或某种POSIX系统(比如MacOSX)。
- internet存档帐户-如果您在archive.org上还没有帐户,[注册](https://archive.org/account/login.createaccount.php)。
- python 2.7-此脚本需要python 2.7。
- libffi dev和libssl dev
- git
##安装iagitup
先决条件(使用debian或ubuntu):
sudo apt update sudo apt install python python-pip python-dev libffi-dev libssl-dev git
###使用pip:
pip install iagitup
###源代码:
克隆repo并安装包…
git clone https://github.com/gdamdam/iagitup.git cd iagitup pip install .
##用法
上传回购协议:
iagitup <github_repo_url>
您还可以添加自定义元数据:
iagitup –metadata=<key:value,key2:val2> <github_repo_url>
了解版本:
iagitup -v
示例:
iagitup https://github.com/<GITHUBUSER>/<RESPOSITORY>
该脚本从github下载git repo,创建git包并将其上传到internet存档。
回购协议将存档在url处的一个项目中,该项目包含存储库名称和最后一次推送的日期,例如:
https://archive.org/details/github.com-<GITHUBUSER>-<RESPOSITORY>_-_<DATE-LAST-PUSH>
Git回购捆绑包的网址为:
https://archive.org/download/github.com-<GITHUBUSER>-<RESPOSITORY>_-_<DATE-LAST-PUSH>/<BUNDLENAME>.bundle
##还原存档的github存储库
下载捆绑包文件,形成存档项:
https://archive.org/download/…/<ARCHIVED_REPO>.bundle
只需下载bundle文件并运行:
git clone file.bundle
##许可证(GPLv3)
版权所有(c)2017-2018 Giovanni Damiola
此程序是免费软件:您可以重新分发和/或修改 根据由 自由软件基金会,或者许可证的第3版,或者 (由您选择)任何更高版本。
这个程序的发布是希望它能有用, 但没有任何保证;甚至没有 适销性或适合某一特定目的的适销性。见 GNU通用公共许可证了解更多详细信息。
你应该收到GNU通用公共许可证的副本 还有这个节目。如果没有,请参见<;http://www.gnu.org/licenses/>;。