Gister is a simple tool allowing to list public gists in github by user name
271
Github Url:
It allows to specify user's id by which the public gists should be limited. By default there is a pagination parameters that limit the page size to 20. The application is stateful which means it will recognise the user id and display only the new gists which were added since the last run. It uses sqlite to store the state.
Using go
go install github.com/majest/gister
USAGE:
[global options] command [command options] [arguments...]
COMMANDS:
help, h Shows a list of commands or help for one command
GLOBAL OPTIONS:
--token value Github API Token. Required before running any operations [$TOKEN]
--limit value Gits per page limit (default: "20") [$LIMIT]
--page value Page number (default: "0") [$PAGE]
--reset Reset the last saved date for the specific user [$RESET]
--help, -h show help
./gister -limit 4 -page 2 majest - displays second page, limit 4 per page for user majest
./gister majest - displays second page, limit 4 per page for user majest
./gister -reset majest - reset the last time and display default page limit 20 and page for majest
./gister -reset majest - reset the last time and display default page limit 20 and page for majest
./gister -since 2018-01-12T11:45:26.371Z -page 2 -limit 2 majest - display all gists since 2018-01-12T11:45:26.371Z limit 2, page 2 for user majest
docker run -e LOG_LEVE=debug majest/gister:latest majest
task build-docker - build docker image. When running docker it's a good idea to use volume to /app directory as it will persist the sqlite database
gister:/app
docker volume create gister
docker run -v gister:/app gister -token xxx majest
Gister provides number of tasks related to compilation and SQLC migrations using Task file (similar to makefile but nicer) - https://taskfile.dev/installation/
Install Taskfile
brew install go-task/tap/go-tasksh -c "$(curl --location https://taskfile.dev/install.sh)" -- -dAll available tasks can be displayed running task -l
SQLc is used to manage the migrations and compiles the DAO objects for the application. Follow the instructions available at https://docs.sqlc.dev/en/stable/overview/install.html to install SQLC
run sqlc generate to regenerate sql
To migrate the database to new version add a new file in sqlc/migrations on the format YYYMMDDHHMM.sql
Use LOG_LEVEL environment variable to control the logging level. For example: LOG_LEVEL=debug ./gister majest or docker run -e LOG_LEVEL=debug gister majest
Content type
Image
Digest
sha256:3a6e768c8…
Size
251.3 MB
Last updated
over 3 years ago
docker pull majest/gister