0.0
No commit activity in last 3 years
No release in over 3 years
Export any project from git repository or local directory to a single epub file. Combine useful features of the following ruby gems (vim_printer, eeepub and others) to produce a single epub file that can be view by any device where epub is supported.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.10
~> 2.13
~> 5.8
~> 0.10
~> 10.4
~> 0.53
~> 0.9

Runtime

~> 0.8.3
~> 1.2
~> 0.19
 Project Readme

source2epub

Gem Version Dependency Status Code Climate

  • Export/print content of any git repositores (or local project directory) to single epub file for quick review offline.

  • Work with Github or BitBucket project or your own git servers

  • Thanks to the power of [eeepub gem][] and :TOhtml feature of Vim.

  • Support by your favourite reading devices that support 'epub' format (computer, phone, tablet, etc) that

  • Support unlimited color scheme as it is based on output from Vim editor

  • Here is the sample epub file of source2epub produced by source2epub

Related projects

  • source2pdf generate the output of the git or local project to a pdf file
  • code_rippa gererate pdf file with the help of LaTeX

Requirements

Installation

gem install source2epub

Synopsis/Usage


Usage:

  $source2epub -e, --exts=EXT1 EXT2 EXT3 -u, --url=URL -theme=theme_name

Example:

  # Export the *.rb from the given repository

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

  # Export the *.rb and also 'Gemfile' from a local directory 'source2epub'
  # Note: must be one directory directly above the current directory

  $source2epub -u source2epub -e rb -f Gemfile

  # Export the *.rb and also 'Gemfile' from a given directory 'source2epub'
  # using 'solarized' theme
  # Note: 'source2epub' must be exactly one level above current directory

  $source2epub -u source2epub -e rb -f Gemfile -t solarized

Options:

  -u, --url=URL                   # The full url of the github project to be cloned or local directory name (mandatory)
                                  # e.g. -u https://github.com/agilecreativity/source2epub
                                  # Or if used with the project already exist locally
                                  #      -u source2epub

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

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

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

  -p, [--epub-title=title]        # The title of the epub output, if not specified the project_name will be used
                                  # e.g. -p 'My Cool Project'
                                  #
  -s, [--command]                 # Use the input file list from the result of the given shell command
                                  # Note: the command must return the list of file to be valid
                                  # e.g. --command 'find . -type f -iname "*.rb" | grep -v test | grep -v _spec'

Export a given github URL or local project directory to an epub file"

Sample Usage:

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

Should result in something similar to this in the console

FYI: list of extensions: ["gem", "gemspec", "lock", "md", "rb"]
FYI: list of all files : ["./config/initializers/source2epub.rb", "./lib/source2epub.rb", "./lib/source2epub/cli.rb", "./lib/source2epub/configuration.rb", "./lib/source2epub/exporter.rb", "./lib/source2epub/logger.rb", "./lib/source2epub/source2epub.rb", "./lib/source2epub/version.rb", "./test/lib/source2epub/test_source2epub.rb", "./test/test_helper.rb"]
FYI: process file 1 of 10 : ./config/initializers/source2epub.rb
FYI: process file 2 of 10 : ./lib/source2epub.rb
FYI: process file 3 of 10 : ./lib/source2epub/cli.rb
FYI: process file 4 of 10 : ./lib/source2epub/configuration.rb
FYI: process file 5 of 10 : ./lib/source2epub/exporter.rb
FYI: process file 6 of 10 : ./lib/source2epub/logger.rb
FYI: process file 7 of 10 : ./lib/source2epub/source2epub.rb
FYI: process file 8 of 10 : ./lib/source2epub/version.rb
FYI: process file 9 of 10 : ./test/lib/source2epub/test_source2epub.rb
FYI: process file 10 of 10 : ./test/test_helper.rb
Your output file is './source2epub/vim_printer_source2epub.tar.gz'
Your final output is ./source2epub.epub

Sample Output

Using the 'default' theme/colorscheme for Vim

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

Which generated the following epub output file

The example screenshot:

Use non-default colorscheme/theme for Vim

Use my personal favourite seoul256 colorscheme

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

Which generated the following epub 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