Skip to content
/ nix-mozid Public
forked from tupakkatapa/mozid

Nix tools for retrieving Mozilla add-on IDs.

License

Notifications You must be signed in to change notification settings

3nol/nix-mozid

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

22 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

nix-mozid

A set of Nix tools exposed via apps for retrieving Mozilla extension IDs from an XPI add-on package. It automates the process of downloading the XPI file from Mozilla's add-ons websites, extracting the manifest.json, and displaying the unique ID.

Important: This is a fork and slight adaptation of the already useful a command-line tool by tupakkatapa.

This tool was inspired by the difficulty of retrieving the extension ID when non-declarative installations are blocked in Firefox, as discussed in this thread.

Package Usage

Run the script by passing it a program-specific base URL and an extension URL as arguments.

nix run github:3nol/nix-mozid#mozid -- <base-url> <extension-url>

For example, use can use "https://addons.mozilla.org/firefox/downloads/file" as base URL and "https://addons.mozilla.org/en-US/firefox/addon/vimium-ff" as extension URL to determine the Mozilla ID of this XPI package.

Without Nix

Clone the repository and make the script executable.

git clone https://github.com/3nol/nix-mozid.git
cd nix-mozid
chmod +x mozid.sh

Run the script analogous to above.

./mozid.sh <base-url> <extension-url>

Apps Usage

The provided apps do not make use of the <base url> argument, they use their own default.

  • mozid-firefox defaults to using the Firefox base URL.
  • mozid-thunderbird defaults to using the Thunderbird base URL.

Analogously, run the script by passing an extension URL as argument.

nix run github:3nol/nix-mozid#mozid-<base> -- <extension url>

Picking up the example from above, now use this instead.

nix run github:3nol/nix-mozid#mozid-firefox -- "https://addons.mozilla.org/en-US/firefox/addon/vimium-ff"

About

Nix tools for retrieving Mozilla add-on IDs.

Resources

License

Stars

Watchers

Forks

Languages

  • Shell 62.4%
  • Nix 37.6%