Giter VIP home page Giter VIP logo

atuin-graph's Introduction

atuin-graph

activity graph for atuin self hosted sync server

It connects to the PostgreSQL atuin database, using by default the db_uri setting from atuin server.toml config file

Two ways to run it are available, whether in command line or as a flask web application

Required Python version: >= 3.11 (uses the tomllib parser)

installation

pip install atuin-graph

cli / standalone

- atuin-graph: takes a username as input and outputs a atuin-{user}.png file

The -until and --from parameters allow to query from / up to a specified date, this is useful to create one png per day and create a gif with imagemagick for example (convert -delay 10 -loop 1 *.png atuin.gif)

atuin-graph -h
usage: atuin-graph [-h] --user USER [--from FROM] [--until UNTIL] [--atuin_server_config ATUIN_SERVER_CONFIG]

options:
  -h, --help            show this help message and exit
  --user USER           user to draw the graph for
  --from FROM           day (yyyy-mm-dd) to query from
  --until UNTIL         day (yyyy-mm-dd) to query until
  --atuin_server_config ATUIN_SERVER_CONFIG
                        atuin server config path

web app

This package also ships a Flask app which dynamically serves a png for a given user and optional dates

๐Ÿ“…๏ธ
from a date https://my-atuin-server/graph/username/from/yyyy-mm-dd
until a date https://my-atuin-server/graph/username/until/yyyy-mm-dd
https://my-atuin-server/graph/username/yyyy-mm-dd
between dates https://my-atuin-server/graph/username/yyyy-mm-dd/yyyy-mm-dd

one way to run it:

GUNICORN_CMD_ARGS="--bind=127.0.0.1:8889" SCRIPT_NAME=/graph gunicorn atuin_graph.web:app

and on nginx side

location /graph {

            proxy_bind              $server_addr;
            proxy_pass              http://127.0.0.1:8889;
    }

atuin-graph's People

Contributors

tieum avatar

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.