https://github.com/michaeljklein/animate_modules
Animate the module structure of Haskell packages
https://github.com/michaeljklein/animate_modules
cli code-analysis haskell ruby
Last synced: 9 months ago
JSON representation
Animate the module structure of Haskell packages
- Host: GitHub
- URL: https://github.com/michaeljklein/animate_modules
- Owner: michaeljklein
- License: mit
- Created: 2018-01-17T22:41:10.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-01-18T03:45:09.000Z (over 8 years ago)
- Last Synced: 2025-02-06T05:32:41.118Z (over 1 year ago)
- Topics: cli, code-analysis, haskell, ruby
- Language: Ruby
- Size: 1.23 MB
- Stars: 1
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# `animate_modules.rb`
Every commit in a repository, checkout the commit, run graphmod, render the graph (if new), and then make a gif of the rendered graphs.
# Requirements:
## [graphmod](https://hackage.haskell.org/package/graphmod)
```bash
stack install graphmod
```
## [dot](www.graphviz.org)
```bash
brew install graphviz
```
## ImageMagick
```bash
brew install imagemagick
```
```
> convert --version
Version: ImageMagick 6.9.7-3 Q16 x86_64 2017-01-07 http://www.imagemagick.org
Copyright: © 1999-2017 ImageMagick Studio LLC
License: http://www.imagemagick.org/script/license.php
Features: Cipher DPC Modules
Delegates (built-in): bzlib freetype jng jpeg ltdl lzma png tiff xml zlib
```
## Ruby
```
> ruby --version
ruby 2.3.1p112 (2016-04-26 revision 54768) [x86_64-darwin15]
```
# Usage
```bash
# Without logging:
ruby animate_modules.rb "https://github.com/michaeljklein/hackage-stats.git"
# With logging:
ruby animate_modules.rb "https://github.com/michaeljklein/hackage-stats.git" | tee -a animated_modules_https_github_com_michaeljklein_hackage_stats_git.log
```
```ruby
animate_modules.rb [0] [1] [2] [3]
or
ruby animate_modules.rb [0] [1] [2] [3]
[0] to_clone (required)
[1] out_dir (default is '.')
[2] out_filename (default is "animated_modules_\#{to_clone.gsub(/\W+/, '_')}.gif"
[3] temp_dir (default is random-ish)
```
# Examples
- [Equirecursive](https://github.com/michaeljklein/Equirecursive)

[examples/animated_modules_https_github_com_michaeljklein_Equirecursive_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_michaeljklein_Equirecursive_git.log)
- [git-details](https://github.com/michaeljklein/git-details)

[examples/animated_modules_https_github_com_michaeljklein_git_details_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_michaeljklein_git_details_git.log)
- [hackage-stats](https://github.com/michaeljklein/hackage-stats)

[examples/animated_modules_https_github_com_michaeljklein_hackage_stats_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_michaeljklein_hackage_stats_git.log)
- [parser-tutorial](https://github.com/michaeljklein/parser-tutorial)

[examples/animated_modules_https_github_com_michaeljklein_parser_tutorial_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_michaeljklein_parser_tutorial_git.log)
- [prim-spoon](https://github.com/michaeljklein/prim-spoon)

[examples/animated_modules_https_github_com_michaeljklein_prim_spoon_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_michaeljklein_prim_spoon_git.log)
- [stream-timers](https://github.com/michaeljklein/stream-timers)

- [Pandoc](https://github.com/jgm/pandoc) is too big for this script without changes:
[examples/animated_modules_https_github_com_jgm_pandoc_git.log](
[examples/animated_modules_https_github_com_michaeljklein_prim_spoon_git.log](https://github.com/michaeljklein/animate_modules/raw/master/examples/animated_modules_https_github_com_jgm_pandoc_git.log)