npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

bananareporter

v0.4.4

Published

Easily generate a report from multiple sources

Downloads

30

Readme

Features

  • Easy to use: provide a --from and --to date range and a config file, all data will be fetched automatically
  • Multiple output formats: output file can be a JSON, JSONL or CSV (via --format) more coming soon
  • Configurable: data to be imported can be filtered using the configuration file and each option can be overridden per source
  • Sources Supported

Use cases

  • create a PDF work report based on commits and tasks
  • get insights on your activity

Quickstart

  1. Install banana reporter CLI npm i -g bananareporter

  2. Create a config file bananareporter.yaml with the sources that you want to fetch

sources:
  - type: 'gitlab'
    committerUsername: usernameOnGitlab
    token: glpat-personalaccesstoken
    # filters:
    #   - on: '$project.path_with_namespace'
    #     regex: '(namespace|anotherone)'
  - type: 'github'
    committerUsername: usernameOnGithub
    # optional, needed for commits on private repositories
    token: personalaccesstoken
    # filters:
    #   - on: 'repository.full_name'
    #     regex: '(namespace|anotherone)'
  # - type: 'todo.txt'
  #   file: './todo.txt'
  1. Run the reporter with a date range (ISO8601 date)
bananareporter --from 2023-01-01 --to 2023-03-01 -c bananareporter.yaml

In the current directory you will find the output as bananareporter_$FROM__$TO.json (can be changed with --out)

Example of output (json) with gitlab and github sources:

[
  {
    "id": "c12ba180bfecf45fcdcc40d6104d1f1b7ad409dc",
    "date": "2023-01-13T07:51:21.730Z",
    "username": "johndoe",
    "description": "chore: update changelog and swagger branch:work git:aa33b04",
    "projectId": "3318214",
    "projectName": "awesome-frontend",
    "type": "gitlab"
  },
  {
    "id": "6e1b66a1dea89e957d8c44943f942be4874c0641",
    "date": "2023-01-14T10:50:10.230Z",
    "username": "johndoe",
    "description": "refactor: compare date function branch:work git:ia1f241",
    "projectId": "928544",
    "projectName": "awesome-backend",
    "type": "github"
  }
]

Usage

$ npm install -g bananareporter
$ bananareporter COMMAND
running command...
$ bananareporter (--version)
bananareporter/0.4.4 linux-x64 node-v18.16.0
$ bananareporter --help [COMMAND]
USAGE
  $ bananareporter COMMAND
...

Commands

bananareporter help [COMMANDS]

Display help for bananareporter.

USAGE
  $ bananareporter help [COMMANDS] [-n]

ARGUMENTS
  COMMANDS  Command to show help for.

FLAGS
  -n, --nested-commands  Include all nested commands in the output.

DESCRIPTION
  Display help for bananareporter.

See code: @oclif/plugin-help

bananareporter run

Run report

USAGE
  $ bananareporter run -o <value> --format json|jsonl|csv [-c <value>] [--to <value> --from <value>]
    [--delay <value>] [--include-raw-object]

FLAGS
  -c, --config=<value>  config file location, by default ~/.config/bananareporter/config.yaml
  -o, --out=<value>     (required) [default: ./bananareporter_$FROM__$TO.json] file path or directory to save the output
  --delay=<value>       [default: 300] global delay in millisecons between http requests
  --format=<option>     (required) [default: json] output file format
                        <options: json|jsonl|csv>
  --from=2023-06-01     from date (ISO8601)
  --include-raw-object  include raw object in json/jsonl reporter output
  --to=2023-06-30       to date (ISO8601)

DESCRIPTION
  Run report

EXAMPLES
  $ banana-reporter run --from 2023-01-01 --to 2023-01-31
  report with 138 entries saved to ./bananareporter.json

See code: dist/commands/run/index.ts