Skip to content

๐Ÿ” Client for analyzing git repos to be printed on codeprints.dev

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT
Notifications You must be signed in to change notification settings

codeprintsdev/analyzer

Folders and files

NameName
Last commit message
Last commit date

Latest commit

ย 

History

61 Commits
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 
ย 

Repository files navigation

codeprints analyzer

rust

Table of contents

A command-line tool which analyzes local/private git repositories
and generates a data file for codeprints.dev.

Why?

A lot of code is not public on Github; especially commercial projects. Nevertheless there is demand for creating prints from a repository (e.g. to give them as a present to each team member after reaching a major milestone).

This is why we offer a standalone tool that can be used locally without having to make any code public or install any dependencies.

Usage

  1. Navigate to any local git repository.
  2. Run the following command to generate a codeprints.json for the repo:
docker run -v `pwd`:/repo codeprints/analyzer

(This will not parse any sensitive data. It is merely a wrapper around git log --date=short-local --pretty=format:%ad.)

Alternatively you can also run the Rust binary without Docker:

# Install the tool
cargo install --git https://github.com/codeprintsdev/analyzer

# Use it inside any git repository
codeprints-analyzer
  1. Upload the JSON file to codeprints.dev to render a print.

Limiting the time range

You can set the start- and end-date of the output.

docker run -v `pwd`:/repo codeprints/analyzer --after "2020-12-24" --before "2021-02-10"

The syntax is exactly the same that git also uses. In fact we just pass the parameters to git log.

Limiting authors/committers

If you work in a bigger team, you might want to filter the contributions by author. Here is how:

docker run -v `pwd`:/repo codeprints/analyzer --author "Matthias" --author "Octocat"

To get a list of all author names, run git shortlog --summary --numbered --email.

(You can also filter by committers. The difference is subtle, but in contrast to authors, these are the contributors who pushed/committed a patch to the repository.)

More options

To get an exhaustive list of options, run

docker run codeprints/analyzer --help

Background: How the Github Contribution Timeline works

The code is based on a great post about the Github contributions calendar.
The logic around it is surprisingly sophisticated.

Support

In case you run into problems, don't hestitate to open an issue.
We're always happy about code contributions as well of course.
For business inquiries, please reach out to us at [email protected].

License

lychee is licensed under either of

at your option.

About

๐Ÿ” Client for analyzing git repos to be printed on codeprints.dev

Topics

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Stars

Watchers

Forks