43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
|
# File 'lib/source2epub/cli.rb', line 43
def usage
puts <<-EOS
Usage:
$source2epub -u, --url=URL -e, --exts=EXT1 EXT2 EXT3 -t, -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 git URL or local project directory to an epub file"
EOS
end
|