https://github.com/benbjohnson/opus
Command line utility for printing columnized code.
https://github.com/benbjohnson/opus
Last synced: 7 months ago
JSON representation
Command line utility for printing columnized code.
- Host: GitHub
- URL: https://github.com/benbjohnson/opus
- Owner: benbjohnson
- License: mit
- Created: 2013-12-20T15:34:21.000Z (about 12 years ago)
- Default Branch: master
- Last Pushed: 2013-12-20T17:16:24.000Z (about 12 years ago)
- Last Synced: 2025-06-13T10:55:05.310Z (7 months ago)
- Size: 113 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this 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:
```sh
$ gem install opus
```
Then you can run Opus across your source files:
```sh
$ 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.
```