Coder Social home page Coder Social logo

diffshot-rb's Introduction

Diffshot

Description

This script takes screenshots of every file diff through a Git repo's commit history, and outputs a markdown file containing the commit history with its images, annotations, and table of contents.

See this example, created with this repo.

Note: The links in the table of contents don't take into account the possibility of multiple commits having the same commit message. So be a good developer and make each commit message unique!

Installation

1. Install ImageMagick

$ brew install imagemagick

2. Install system fonts in ImageMagick

$ cd $(dirname $(which convert))
$ cd $(dirname $(readlink $(which convert)))
$ cd ../etc/ImageMagick-6/
$ curl http://www.imagemagick.org/Usage/scripts/imagick_type_gen > find_fonts.sh
$ perl find_fonts.sh > type.xml

This downloads a script that scans your system for fonts and compiles them into type.xml, which ImageMagick can parse. The end result should be type.xml exists on a path like /usr/local/Cellar/imagemagick/6.9.3-0_2/etc/ImageMagick-6

3. Install Diffshot

$ gem install diffshot

4. Try it out

Go to some Github repo, type diffshot, and you should see it print out the commits and files as it goes through them.

At the end, you'll have a _DIFFSHOTS folder with a bunch of images inside it, and a _DIFFSHOTS.md! Each image is named with this convention:

commit-message.file-name.png

(Non-alphanumeric characters are removed or replaced with -.)

Options

$ diffshot hash..hash

As with git diff and git log, you can pass a range of hashes to diffshot and it will iterate only over that range.

Contributing

Yes, please!

diffshot-rb's People

Contributors

robertakarobin avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  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.