Package: amo2kinto
amo2kintokinto2xml: Export the blocklist in the legacy XML formatblockpages-generator: Generate the blocklist documentation pages.InstallationTo install the release:pip install amo2kintoTo install the development environment:make installSystem dependenciesIn order to buildamo2kintodependencies you may need the following libraries:Buildinglxmlwill require:libxml2-devlibxslt-devpython-devOtherwise you will run into errors like:libxml/xmlversion.h: File not foundGenerate a blocklist.xml file from Kinto collectionsIf you want to export blocklists stored in Kinto in the addons server XML export
format, you can use thekinto2xmlscript:kinto2xml -s http://localhost:8888/v1kinto2xmlgives you the ability to configure what you want to
export and in which bucket and collection are the data stored.usage: kinto2xml [-h] [-s SERVER] [-a AUTH] [-v] [-q] [-D]
                 [--certificates-bucket CERTIFICATES_BUCKET]
                 [--certificates-collection CERTIFICATES_COLLECTION]
                 [--gfx-bucket GFX_BUCKET] [--gfx-collection GFX_COLLECTION]
                 [--addons-bucket ADDONS_BUCKET]
                 [--addons-collection ADDONS_COLLECTION]
                 [--plugins-bucket PLUGINS_BUCKET]
                 [--plugins-collection PLUGINS_COLLECTION]
                 [--api-version API_VERSION] [--app APP]
                 [--app-version APP_VERSION] [-o OUT]

Build a blocklists.xml file from Kinto blocklists.

optional arguments:
  -h, --help            show this help message and exit
  -s SERVER, --server SERVER
                        The location of the remote server (with prefix)
  -a AUTH, --auth AUTH  BasicAuth token:my-secret
  -v, --verbose         Show all messages.
  -q, --quiet           Show only critical errors.
  -D, --debug           Show all messages, including debug messages.
  --certificates-bucket CERTIFICATES_BUCKET
                        Bucket name for certificates
  --certificates-collection CERTIFICATES_COLLECTION
                        Collection name for certificates
  --gfx-bucket GFX_BUCKET
                        Bucket name for gfx
  --gfx-collection GFX_COLLECTION
                        Collection name for gfx
  --addons-bucket ADDONS_BUCKET
                        Bucket name for addons
  --addons-collection ADDONS_COLLECTION
                        Collection name for addon
  --plugins-bucket PLUGINS_BUCKET
                        Bucket name for plugins
  --plugins-collection PLUGINS_COLLECTION
                        Collection name for plugin
  --api-version API_VERSION
                        Targeted blocklists.xml APP id
  --app APP             Targeted blocklists.xml APP id
  --app-version APP_VERSION
                        The targetted app version
  -o OUT, --out OUT     Output XML file.Generate blocked addons and plugins description pagesYou might want to export the human readable list and description of
add-ons and plugins that were blocked.You can do that using theblockpages-generatorcli tool:usage: blockpages-generator [-h] [-s SERVER] [-a AUTH] [-b BUCKET] [-v] [-q]
                            [-D] [--addons-collection ADDONS_COLLECTION]
                            [--plugins-collection PLUGINS_COLLECTION]
                            [-d TARGET_DIR]

Generate blocked item description files.

optional arguments:
  -h, --help            show this help message and exit
  -s SERVER, --server SERVER
                        The location of the remote server (with prefix)
  -a AUTH, --auth AUTH  BasicAuth token:my-secret
  -b BUCKET, --bucket BUCKET
                        Bucket name.
  -v, --verbose         Show all messages.
  -q, --quiet           Show only critical errors.
  -D, --debug           Show all messages, including debug messages.
  --addons-collection ADDONS_COLLECTION
                        Collection name for addon
  --plugins-collection PLUGINS_COLLECTION
                        Collection name for plugin
  -d TARGET_DIR, --target-dir TARGET_DIR
                        Destination directory to write files in.It will generate anindex.htmlfile with the list of records
present in theaddonsandpluginscollections in thetarget-dirdirectory.It will also generate a file peradd-onandpluginusing theblockIDor theid. e.gi487.htmlor08db5018-2c80-4c4d-aa98-dafe6aacc28c.htmlCHANGELOGThis document describes changes between each past release.4.0.2 (2020-05-18)Bug fixFix crash whenprefsfield is missing from addons entry4.0.1 (2018-07-04)Bug fixFix the XML item ID when squashing entries by addon ID4.0.0 (2018-07-04)Bug fixFix the affected users section (#87), thanks @rctgamer3!Breaking changesRemoved code in charge of updating the collection schema (#85)3.2.1 (2018-02-28)Fix bug with Python 3 and writing files (#80).3.2.0 (2018-02-06)Filter add-ons and plugins in v3 based on the requesting application and version. (#74)Stop exporting cert items to Firefox 58 and above, where they aren’t used. (#75)3.1.0 (2017-10-03)Add support for cert items subject and pubKeyHash attributes. (#70)3.0.0 (2017-09-14)Remove json2kinto importerRemove xml verifier2.0.1 (2017-06-02)Bug fixFix synchronize kinto-http parameters. (#67)2.0.0 (2017-06-02)Breaking changesUpgrade to kinto-http.py 8.0 and drop support for Python < 3.51.7.2 (2017-02-20)Fix XML exporter on missing blockID. (#63)1.7.1 (2016-11-24)Bug fixAllow the importer to work even without the permission to create collections. (#56)UsePUTinstead ofPATCHto fully overwrite the destination with the source (#58)1.7.0 (2016-11-21)New featuresRetry downloading the XML in case it fails the first time. (#50)Bug fixRemove redundant footer when generating pages. (#51)Allow the importer to work even without the permission to create buckets. (#53)Internal changesImprove the way the Makefile works (#52)1.6.0 (2016-10-04)New featuresAdd a configurable signoff workflow to-review → to-sign (#48)1.5.1 (2016-09-08)Bug fixsession_kwargs is not accessible anymore with last kinto-http client release. (#45)1.5.0 (2016-08-25)Add theblockpages-generatorCLI tool (#43)1.4.1 (2016-08-02)Fix blockID ordering to make it the same as the addons-server.1.4.0 (2016-07-18)New featuresAdd version ranges for GFX items (#39) âBug 12836011.3.1 (2016-07-06)Bug fixFix patch_records properties.1.3.0 (2016-07-06)Update records that were changed (#37)1.2.1 (2016-05-26)Bug fixkinto_client.delete_records API changed. (#35)1.2.0 (2016-05-26)New featuresLet people specify--app-versionand--api-versionwhile using kinto2xml (#33)Add functional tests for both version of the XML file format. (#33)Configure the kinto-admin as well as the JSONSchema (#32)Bug fixGroup addons by the biggest guid (#33)1.1.0 (2016-05-18)Bug fixIn case there is a diff using xml-verifier, the command now returns an error code (#28)Internal changesjson2kintodoes not set destination collections as publicly readable (#27)1.0.0 (2016-05-12)Breaking changeskinto2xml was renamed amo2kinto (#21)New JSON Schema file format with a “collection” prefix (#22)New featuresUse the schema to validate AMO records in the importer script. (#5)Warn if the server does not have the schema capability (#24)Internal changesDocument amo2kinto commands: json2kinto, kinto2xml and verifier. (#23)0.1.0 (2016-04-27)Initial versionCreate collection with the definition of the JSON schema.Fetch AMO blocklists information from the /blocked/blocklists.json AMO endpoint.Handle import configuration on the CLI.
- Bucket / Collection names
- Remote AMO endpoint configuration
- Schema file path configuration
- Schema or not schema
- Verbosity level
- Server selection
- Auth credentials
- Importation type selectionSupport for kinto-signer triggeringFull SSL support for Python 2.7Full Python 2.7 and Python 3.4/3.5 supportHandle the enabled flag to activate recordsMakefile rule to update the schema definitionExport kinto blocklists in XML blocklist file version 2Export kinto blocklists in XML blocklist file version 3XML verifier that create a diff of two XML files