Skip to main content

No project description provided

Project description

Github command-line views

@readwithai - X - blog - machine-aided-reading

Fetch (and maintain) information about the number of views or downloads a github repository has.

Motivation

It can be quite natural to host some material such as documentation, cookbooks and list on github. github provides an API to query the number of views a repository has with some limitations. The main limitation is that data is only detained for two weeks. This script, if run periodically, will collect data about the numbers of downloads and views of a repository and provided aggregates.

It can also output a completely timeline.

Alternatives and prior work

This makes use of the [github REST API](

)

Installation

Make sure you have the github command line-interface, gh, installed and that you have logged in to the command-line.

You can then install gh-views with pipx.

pipx install gh-views

Usage

gh-views talwrii/plugin-repl --fetch

Will fetch the clone and view statistics for the repository talwrii/plugin-repl. After you have run this you can run `gh-views talwrii/plugin-repl

To show all the repositories for which stats are collected you can run:

gh-views

To display all statistics you can run

gh-views --all

To update all stats for tracked repositories you can run

gh-views --fetch

You may wish to run this periodically for example using a systemd timer or cron job to ensure that all data is collected.

You can run:

gh-views talwrii/plugin-repl --timeseries

to output a complete timeseries of statistics for each day.

Support

If you found this tool particularly useful you can give me some money (maybe $3?) on my ko-fi.

This will incentivise me to respond to tickets on this repository and release similar command-line tools.

About me

I am @readwithai I create tools for reading, research and agency sometimes using Obsidian.

If this sounds interesting, of you found this tool useful you might like to:

  1. Follow me on X where I post about these sort of tools.
  2. Look at my collection of productivity tools similar to this
  3. Read about taking better notes with the note taking app, Obsidian

If you rae interested in reading and research you can follow me on my blog.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gh-views-1.0.2.tar.gz (4.2 kB view details)

Uploaded Source

File details

Details for the file gh-views-1.0.2.tar.gz.

File metadata

  • Download URL: gh-views-1.0.2.tar.gz
  • Upload date:
  • Size: 4.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.0.0 CPython/3.12.3

File hashes

Hashes for gh-views-1.0.2.tar.gz
Algorithm Hash digest
SHA256 9f5ff92c755e5dc5ae62b471639a4abea058249e7688b1f85c30a24a4e1ac344
MD5 99f571ec3a8dc08a161567387a4822e2
BLAKE2b-256 438fa39c54636f0052306373ba43cd24de0d70b5432308aaff77f7cc7f4810d7

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page