Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

KOLANICH-tools/AMO2git.py

Repository files navigation

AMO2Git.py Unlicensed work

wheel (GitLab) wheel (GHA via nightly.link) GitLab Build Status GitLab Coverage GitHub Actions Libraries.io Status Code style: antiflash

We have moved to https://codeberg.org/KOLANICH-tools/AMO2Git.py, grab new versions there.

Under the disguise of "better security" Micro$oft-owned GitHub has discriminated users of 1FA passwords while having commercial interest in success of FIDO 1FA specifications and Windows Hello implementation which it promotes as a replacement for passwords. It will result in dire consequencies and is competely inacceptable, read why.

If you don't want to participate in harming yourself, it is recommended to follow the lead and migrate somewhere away of GitHub and Micro$oft. Here is the list of alternatives and rationales to do it. If they delete the discussion, there are certain well-known places where you can get a copy of it. Read why you should also leave GitHub.


This tool converts a release history on AMO into a git repo history. Useful when the addon developer is uncooperative.

Prerequisites

  1. Install aria2c. Windows version can be downloaded here.
  2. Install git .
  3. Install git-lfs. On Windows git-lfs is shipped with modern versions of Git for Windows.
  4. Install Python 3. For Windows I recommend Anaconda. Python 2 is dead, stop raping its corpse. Use 2to3 with manual postprocessing to migrate incompatible code to 3. It shouldn't take so much time.
  5. Install this tool and its dependencies:
  • plumbum PyPi Status TravisCI Build Status License - for command line interface

  • tqdm PyPi Status TravisCI Build Status License - for progressbars

  • gitpython PyPi Status TravisCI Build Status License - for operations with git

  • requests PyPi Status TravisCI Build Status License - for interacting to AMO RESTful API.

Usage

  1. Obtain an addon id, slug or guid. Or you can just pass an URI, the program will parse the slug from it itself.
  • On Windows:

    1. AMO2git retreive <addon slug or URI> > ./retrieve.bat
    2. type ./retrieve.bat and examine the shell script.
    3. ./retrieve.bat
  • On Linux:

    1. AMO2git retreive <addon slug or URI> > ./retrieve.sh
    2. less ./retrieve.sh and examine the shell script.
    3. chmod +x ./retrieve.sh
    4. ./retrieve.sh
  1. The files will be downloaded to the subdir of the current working directory.
  2. AMO2git convert <addon slug or URI> The tool will create a subdir with the repo. WebExtension, restartless (bootstrap.js) and xul versions of the addon will be in the corresponding branches. Versions will be marked with tags.

Releases

No releases published

Packages

No packages published

Languages