Skip to content
This repository has been archived by the owner on Aug 30, 2023. It is now read-only.
/ marketplace-stats Public archive

A CLI tool to create reports for paid plugins on the JetBrains marketplace.

License

Notifications You must be signed in to change notification settings

jansorg/marketplace-stats

Repository files navigation

Please note, that this project has been replaced by https://github.com/jansorg/marketplace-stats-kotlin.

marketplace-stats

This is a tool to create reports for paid plugins on the JetBrains marketplace.

It creates a report for one plugin at a time.

Pre—built binaries are available on the releases page.

Example

Complete HTML of this random report

PDF of this random report

First part of a random report

Building

First, make sure you have installed a recent version of Golang:

go install github.com/jansorg/marketplace-stats@latest

Command Line Usage

Usage of ./marketplace-stats:
  -anonymized
        If the report should be anonymized and not include critical data like sales.
  -cache-file string
        The file where sales data is cached. Use -fetch to update it.
  -fetch
        The file where sales data is cached. Use -fetch to update it. (default true)
  -grace-days int
        The grace period in days before a subscription is shown as churned. (default 7)
  -out string
        The file where the HTML sales report is saved. (default "report.html")
  -plugin-id string
        The ID of the plugin, e.g. 12345.
  -token string
        The token to access the API of the JetBrains marketplace. -token-file is an alternative.
  -token-file string
        Path to a file, which contains the token to access the API of the JetBrains marketplace.

Generating Reports

Reports are self-contained HTML files. The file uses an optional font from Google Fonts, but everything else is in the HTML file.

To generate a report, you need the following:

The following command generates report.html for plugin 123456. The token is retrieved from the given file.

# marketplace-stats is in $GOPATH/bin, e.g. $HOME/go/bin
marketplace-stats -plugin-id 123456 -token-file token.txt -out report.html 

Generating Reports For Sharing

An anonymized report only contains data which is valuable for other developers without revealing the actual sales and number of active users.

# marketplace-stats is in $GOPATH/bin, e.g. $HOME/go/bin
marketplace-stats -anonymized -plugin-id 123456 -token-file token.txt -out report-anonymized.html 

Tips & Tricks

  • There's a tooltip on the numbers of the Customers column in the table of monthly summaries. The tooltip tells more about the changes in active customers in a month.

Go Client for the JetBrains Marketplace

Package marketplace contains a work-in-progress client for the REST API of the JetBrains marketplace. See main.go how to use it.

Contributing

This tool is made for my own plugins and requirements. I'm not planning to spend time to adjust it to the requirements of others.

I'll gladly accept pull requests, if they don't break existing functionality.

License

This software is licensed under Apache License, version 2.0.