0.0
No commit activity in last 3 years
No release in over 3 years
Export any project from Github (or a local directory) to a single pdf file. Combine useful features of the following ruby gems (vim_printer, html2pdf, pdfs2pdf and others) to produce a single pdf file for quick review.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.5
~> 1.0
~> 2.6
~> 5.3
~> 0.9
~> 10.1
~> 0.23
~> 0.8

Runtime

~> 0.1.4
~> 0.1.7
~> 1.2
~> 0.1.7
~> 0.1.6
~> 0.19
~> 0.1.12
 Project Readme

github_exporter

DEPRECATED: please use source2pdf or source2epub for maximum awesome!!!

Export/print content of a given github repository (or local project directory) to single pdf for quick review offline.

Requirements

Installation

gem install github_exporter

Synopsis/Usage

Usage:

  $github_exporter -e, --exts=EXT1 EXT2 EXT3 -u, --url=URL -theme=theme_name --output-name=output_file.pdf

Example:

  # Export the *.rb from the given repository

  $github_exporter -e rb -u https://github.com/agilecreativity/github_exporter.git

  # Export the *.rb and also 'Gemfile' from a 'github_exporter' directory
  # Note: this directory must be directly below the current directory

  $github_exporter -e rb -f Gemfile -u github_exporter

  # Same as previous command with the 'solarized' instead of 'default' colorscheme
  $github_exporter -e rb -f Gemfile -u filename_cleaner -t solarized

Options:

  -u, --url=URL                   # The full url of the github project to be cloned OR local directory name

  -e, --exts=EXT1 EXT2 EXT3 ..    # The list of extension names to be exported
                                  # e.g. -e md rb java

  -f, [--non-exts=one two three]  # The list of file without extension to be exported
                                  # e.g. -f Gemfile LICENSE

  -t, [--theme=theme_name]        # The theme/colorscheme to be used with vim_printer see :help :colorscheme from inside Vim
                                  # default: 'default'
                                  # e.g. -t solarized

  -o, [--output-name=output.pdf]  # The output pdf filename (will default to 'repository_name'.pdf)
                                  # e.g. -o repository_name.pdf

Export a given Github project or a local project directory to a single pdf file

Sample Usage:

github_exporter -u https://github.com/agilecreativity/github_exporter.git -e rb

Should result in something similar to this in the console

git clone https://github.com/agilecreativity/github_exporter.git ./github_exporter
FYI: list of extensions: ["gemspec", "md", "pdf", "png", "rb"]
FYI: list of all files : ["./lib/github_exporter.rb", "./lib/github_exporter/cli.rb", "./lib/github_exporter/exporter.rb", "./lib/github_exporter/github_exporter.rb", "./lib/github_exporter/logger.rb", "./lib/github_exporter/version.rb", "./test/lib/github_exporter/test_github_exporter.rb", "./test/test_helper.rb"]
Your input options for VimPrinter : ["print", "--base-dir", "./github_exporter", "--exts", ["rb"], "--theme", "default", "--recursive"]
FYI: process file 1 of 8 : ./lib/github_exporter.rb
FYI: process file 2 of 8 : ./lib/github_exporter/cli.rb
FYI: process file 3 of 8 : ./lib/github_exporter/exporter.rb
FYI: process file 4 of 8 : ./lib/github_exporter/github_exporter.rb
FYI: process file 5 of 8 : ./lib/github_exporter/logger.rb
FYI: process file 6 of 8 : ./lib/github_exporter/version.rb
FYI: process file 7 of 8 : ./test/lib/github_exporter/test_github_exporter.rb
FYI: process file 8 of 8 : ./test/test_helper.rb
Your output file is './github_exporter/vim_printer_github_exporter.tar.gz'
Convert file 1 of 9 : ./index.html
Convert file 2 of 9 : ./lib/github_exporter.rb.xhtml
Convert file 3 of 9 : ./lib/github_exporter/cli.rb.xhtml
Convert file 4 of 9 : ./lib/github_exporter/exporter.rb.xhtml
Convert file 5 of 9 : ./lib/github_exporter/github_exporter.rb.xhtml
Convert file 6 of 9 : ./lib/github_exporter/logger.rb.xhtml
Convert file 7 of 9 : ./lib/github_exporter/version.rb.xhtml
Convert file 8 of 9 : ./test/lib/github_exporter/test_github_exporter.rb.xhtml
Convert file 9 of 9 : ./test/test_helper.rb.xhtml
Convert files to pdfs took 2.324978936 ms
Your final output is './github_exporter_tmp/github_exporter/html2pdf_github_exporter.tar.gz'
Create pdfmarks took 0.027517634 ms
Combine pdf files took 0.763918867 ms
Your combined pdf is available at ./github_exporter_tmp/github_exporter/pdfs2pdf_github_exporter.pdf
Your final output is ./github_exporter.pdf

Sample Output

Using the 'default' theme/colorscheme for Vim

github_exporter -u https://github.com/agilecreativity/github_exporter.git --exts rb

Which generated the following pdf output file

The example screenshot:

Use non-default colorscheme/theme for Vim

Use seoul256 colorscheme

github_exporter -u https://github.com/agilecreativity/github_exporter.git --exts rb --theme seoul256

Which generated the following pdf output file

The example screenshot:

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request