Project

opus

0.0
No commit activity in last 3 years
No release in over 3 years
Command line utility for printing columnized code.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
 Dependencies

Development

~> 5.2.0
~> 0.14.0
~> 10.0.3

Runtime

~> 4.1.5
~> 0.13.0
 Project Readme

Opus

Opus is a tool for printing off source code. I know, that's a weird concept. But sometimes if I am porting a library to a different language it helps me to have a physical copy. That's where opus comes in.

Since code is typically taller (1000s of lines) than it is wide (~80 chars), Opus columnizes the code so it fits on a page better. There are two reasons for this:

  1. It's not cool to print out a shit ton of paper.

  2. Spacial locality can be more important than readability.

When I think of source code, I relate different parts based on where it's physically located in a source file. If I can get more lines on a page then I can relate source lines within a page instead of across pages.

Usage

Installing Opus is pretty easy once you have Ruby 1.9+ installed:

$ gem install opus

Then you can run Opus across your source files:

$ opus -o out.pdf src/*.c

Options

The options for Opus are fairly limited but feel free to send pull requests with new features:

-c NUM, --columns NUM 
    The number of columns per page.
        
-o FILE, --output FILE 
    The name of the output file.