Giter VIP home page Giter VIP logo

cli-stackexchange-analyzer's Introduction

CLI StackExchange Analyser

CLI tool to get metrics from a stackexchange site built with Rust ๐Ÿฆ€.

Build:

cargo build

Install the tool locally:

cargo install --path .

How to use:

Usage: cli-stackexchange-analyzer [OPTIONS] <SITE> <DATE_START> <DATE_END>

Arguments:
  <SITE>        Site to fetch the data from
  <DATE_START>  Date to start - dd/mm/YYYY format
  <DATE_END>    Date to end - dd/mm/YYYY format

Options:
  -m, --members <MEMBERS>...  List of members of your team
  -t, --tags                  Collect tags info
  -i, --individual            Collect individual team members info
  -b, --by_tag <BY_TAG>       Get the metrics on a specific a tag
  -e, --export                Export the data in a csv file
  -h, --help                  Print help
  -V, --version               Print version

Collect basic data about questions:

cargo run -- site date_start date_end

The format of the date is dd/mm/YYYY

Example:

cargo run -- substrate 01/02/2023 23/02/2023

Example with all flags:

cargo run -- substrate 27/02/2023 28/02/2023 --members 2762 29 --tags --individual

Team Metrics

You can specify a list of user_ids from your site to collect metrics of your team. Example:

cargo run -- substrate 02/03/2023 06/03/2023 --members 2762 29 

Team Individual Metrics

Use the optional flag --individual if want to retrieve the individual information of the team members:

cargo run -- substrate 02/03/2023 06/03/2023  --members 2762 29 --individual

Top Tags Metrics

Also get the hot tags with the optional flag --tags:

cargo run -- substrate 02/03/2023 06/03/2023 --tags

Specific Tag Metrics

Get the metrics on a specific a tag with the flag --by_tag TAG:

cargo run -- substrate 02/03/2023 06/03/2023 --by_tag ink

Export metrics in a CSV

And finally you can export the data in a CSV file instead of printing it in the console with the optional flag --export:

cargo run -- substrate 02/03/2023 06/03/2023 --export

API KEY

If you have an API KEY to do queries to the StackExchange API: https://api.stackexchange.com/docs

Create a .env file and add the variable API_KEY with your key like in the .env.example file This allows you to do more queries

cli-stackexchange-analyzer's People

Contributors

alexd10s avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

cli-stackexchange-analyzer's Issues

Improve Error Handling

Improve the error handling in general, better errors messages about wrong CLI command (clap library), API errors...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.