Coder Social home page Coder Social logo

agilecreativity / code_rippa Goto Github PK

View Code? Open in Web Editor NEW

This project forked from benjamintanweihao/code_rippa

0.0 2.0 0.0 2.23 MB

Take your source code and convert them into a beautifully formatted PDF. Features include PDF bookmarks and a bunch of textmate themes to choose from.

Home Page: http://code-rippa.heroku.com

License: MIT License

code_rippa's Introduction

CodeRippa!

Code Rippa!

Build Status

endorse

CodeRippa takes your source code and turns it into a beautiful PDF file. Currently, it supports 150 languages and 84 themes, all of which are available in TextMate.

Prerequisites

You will definitely need a TeX distribution installed. To check, simply type pdflatex. In case your system doesn't have pdflatex, you should install a LaTeX distribution.

Installation

$ gem install code_rippa

Usage

Command line options

Usage: code_rippa [options] file_or_directory
	-l, --list-themes                List all available themes
	-t, --theme THEME                Selected theme
	-n, --list-syntax                List all available syntax
	-h, --help                       Display this screen

List all available themes (84 and counting!)

Many of the themes found in CodeRippa can be found here

$ code_rippa -l

active4d
all_hallows_eve
amy
made_of_code
twilight
zenburnesque
... more themes omitted

Producing PDF from a single file

Example:

Without theme specified (defaults to: made_of_code):

$ code_rippa path_to_single_file.rb

With theme specified:

$ code_rippa -t zenburnesque path_to_single_file.rb

Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.

Producing PDF from a directory

Example:

Without theme specified (defaults to: made_of_code):

$ code_rippa path_to_directory

With theme specified:

$ code_rippa -t rubyblue path_to_directory

Note that the output file is saved as out.pdf in the current directory where code_rippa was called from.

Credits

None of this would be possible without the awesome ultraviolet spox-ultraviolet and language_sniffer gems. Props to lwheng for providing most of the LaTeX help.

Contributing

Currently this gem is in its infancy. Any bug reports and feature requests are very welcomed.

Changelog

1.0.0

  • Compile pdf by default.
  • Choose a more sane theme (Code) by default.
  • Include LICENCE.

0.0.8 - 0.0.9

  • Syntax files are finally compatible for psych
  • Abandoned syck completely for psych
  • Ruby 2.x compatibility! \o/
  • Thanks @jasonyeo for the initial push towards Ruby 2.x compatibility.

0.0.7

  • Using language_sniffer in place of Linguist for automated source code language detection
  • Themes! Glorious themes! 84 themes to choose from! Props to filmgirl, and the rest of the wonderful TM users who submitted their themes.
  • Wrap lines of troublesome files such as minified javascript and parser generator outputs.
  • Sensible defaults, removed the need for specifying the syntax
  • Detects if pdflatex is installed, and automatically runs pdflatex if so
  • Proper cleanup after LaTeX successfully completes

0.0.6

  • Include MiniTest specs

0.0.5

  • Better performance when parsing.
  • Code documentation.

0.0.4

  • Removed dependency on Linguist.
  • Tidier code.

0.0.1 - 0.0.3

  • Initial gem push
  • Fixed many stupid bugs along the way

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.