Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/felipec/ripary
Codeswarm rewrite in ruby
https://github.com/felipec/ripary
Last synced: 4 days ago
JSON representation
Codeswarm rewrite in ruby
- Host: GitHub
- URL: https://github.com/felipec/ripary
- Owner: felipec
- Created: 2008-11-16T19:51:57.000Z (almost 16 years ago)
- Default Branch: master
- Last Pushed: 2009-10-04T19:51:14.000Z (about 15 years ago)
- Last Synced: 2024-08-02T12:49:00.801Z (3 months ago)
- Language: Ruby
- Homepage:
- Size: 96.7 KB
- Stars: 8
- Watchers: 4
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README
Awesome Lists containing this project
- awesome-starred - felipec/ripary - Codeswarm rewrite in ruby (others)
README
ripary is a rewrite of Michael Ogawa's code_swarm in ruby using cairo.
Why? code_swarm is 5k lines of code it depends on java 'Processing', and it's
slow generating videos. Ripary is 500 lines of code, uses cairo, and it outputs
raw video.For the original code:
http://code.google.com/p/codeswarmThe format of the events xml file is compatible with code_swarm's one.
You'll need libxml-ruby and cairo ruby files. You can use gem to install the dependencies:
sudo gem install libxml-ruby
sudo gem install cairo== get the events file ==
There's a tool that generates the events file from a git repository:
./util/convert-git ~/src/my-project > events.xml
Most probably you would have to edit the file to remove mistakes.
== howto generate a video ==
This describes how to generate an MPEG-4 video clip using FFmpeg, but it's also
possible to export singe png images.First create a fifo file:
mkfifo /tmp/ripary_rgb.binThen on a console launch ffmpeg:
ffmpeg -f rawvideo -pix_fmt bgr32 -s 640x480 -r 60 -qscale 11 -i /tmp/ripary_rgb.bin /tmp/movie.aviIt will wait until there's data on the fifo file.
Then launch ripary:
ruby app.rbThat's it!
== to do ==
* improve physics algorithms to be faster
* don't depend on libxml (is there something fast enough)