0.4.4 • Published 11 months ago

bananareporter v0.4.4

Weekly downloads
-
License
MIT
Repository
github
Last release
11 months ago

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

0.4.4

11 months ago

0.4.3

11 months ago

0.4.2

11 months ago

0.3.3

1 year ago

0.3.2

1 year ago

0.3.1

1 year ago

0.3.0

1 year ago

0.2.1

1 year ago

0.2.0

1 year ago

0.1.2

1 year ago

0.1.1

1 year ago

0.1.0

1 year ago