{"id":23284213,"url":"https://github.com/agilecreativity/source2pdf","last_synced_at":"2025-10-15T11:50:00.072Z","repository":{"id":19212810,"uuid":"22446736","full_name":"agilecreativity/source2pdf","owner":"agilecreativity","description":"Export any git repository (or local project folder) to a single pdf file for quick review on your favourite devices.","archived":false,"fork":false,"pushed_at":"2018-03-15T03:22:59.000Z","size":1358,"stargazers_count":3,"open_issues_count":1,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-09-21T22:45:25.151Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/agilecreativity.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2014-07-30T22:12:15.000Z","updated_at":"2021-05-21T11:08:56.000Z","dependencies_parsed_at":"2022-08-20T17:10:32.021Z","dependency_job_id":null,"html_url":"https://github.com/agilecreativity/source2pdf","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"purl":"pkg:github/agilecreativity/source2pdf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fsource2pdf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fsource2pdf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fsource2pdf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fsource2pdf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/agilecreativity","download_url":"https://codeload.github.com/agilecreativity/source2pdf/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/agilecreativity%2Fsource2pdf/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":279002104,"owners_count":26083307,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-09T02:00:07.460Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-12-20T01:38:43.678Z","updated_at":"2025-10-15T11:50:00.032Z","avatar_url":"https://github.com/agilecreativity.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"## source2pdf\n\n[![Gem Version](https://badge.fury.io/rb/source2pdf.svg)][gem]\n[![Dependency Status](https://gemnasium.com/agilecreativity/source2pdf.png)][gemnasium]\n[![Code Climate](https://codeclimate.com/github/agilecreativity/source2pdf.png)][codeclimate]\n\n[gem]: http://badge.fury.io/rb/source2pdf\n[gemnasium]: https://gemnasium.com/agilecreativity/source2pdf\n[codeclimate]: https://codeclimate.com/github/agilecreativity/source2pdf\n\nExport/print content of a given git repository (or local project directory) to a single pdf for quick review offline.\n\n### Requirements\n\n- Valid installation of [Ghostscript][] required by [pdfs2pdf][] gem\n- Valid installation of [Wkhtmltopdf][] required by [html2pdf][] gem\n- Valid installation of [Vim][] required by [vim_printer][] gem\n\n### Installation\n\n```\ngem install source2pdf\n```\n\n## Synopsis/Usage\n\n### Basic Usage\n\n```shell\nUsage:\n\n  $source2pdf -e, --exts=EXT1 EXT2 EXT3 -u, --url=URL -theme=theme_name --output-name=output_file.pdf\n\nExample:\n\n  # Export the *.rb from the given repository\n\n  $source2pdf -e rb -u https://github.com/agilecreativity/source2pdf.git\n\n  # Export the *.rb and also 'Gemfile' from a 'source2pdf' directory\n  # Note: this directory must be directly below the current directory\n\n  $source2pdf -e rb -f Gemfile -u source2pdf\n\n  # Same as previous command with the 'solarized' instead of 'default' colorscheme\n  $source2pdf -e rb -f Gemfile -u filename_cleaner -t solarized\n\nOptions:\n\n  -u, --url=URL                   # The full url of the github project to be cloned OR local directory name\n\n  -e, --exts=EXT1 EXT2 EXT3 ..    # The list of extension names to be exported\n                                  # e.g. -e md rb java\n\n  -f, [--non-exts=one two three]  # The list of file without extension to be exported\n                                  # e.g. -f Gemfile LICENSE\n\n  -t, [--theme=theme_name]        # The theme/colorscheme to be used with vim_printer see :help :colorscheme from inside Vim\n                                  # default: 'default'\n                                  # e.g. -t solarized\n\n  -o, [--output-name=output.pdf]  # The output pdf filename (will default to 'repository_name'.pdf)\n                                  # e.g. -o repository_name.pdf\n\nExport a given Github project or a local project directory to a single pdf file\n\n```\n\n### Sample Usage:\n\n```shell\nsource2pdf -u https://github.com/agilecreativity/source2pdf.git -e rb\n```\n\nShould result in something similar to this in the console\n\n```\nThe project /Users/agilecreativity/Desktop/source2pdf already exist, no git clone needed!\nFYI: list of extensions: [\"gem\", \"gemspec\", \"lock\", \"md\", \"pdf\", \"png\", \"rb\"]\nFYI: list of all files : [\"./lib/source2pdf.rb\", \"./lib/source2pdf/cli.rb\", \"./lib/source2pdf/source2pdf.rb\", \"./lib/source2pdf/exporter.rb\", \"./lib/source2pdf/logger.rb\", \"./lib/source2pdf/version.rb\", \"./test/lib/github_exporter/test_github_exporter.rb\", \"./test/test_helper.rb\"]\nFYI: input options for VimPrinter : [\"print\", \"--base-dir\", \"/Users/agilecreativity/Desktop/source2pdf\", \"--exts\", [\"rb\"], \"--theme\", \"seoul256\", \"--recursive\"]\nFYI: process file 1 of 8 : ./lib/source2pdf.rb\nFYI: process file 2 of 8 : ./lib/source2pdf/cli.rb\nFYI: process file 3 of 8 : ./lib/source2pdf/source2pdf.rb\nFYI: process file 4 of 8 : ./lib/source2pdf/exporter.rb\nFYI: process file 5 of 8 : ./lib/source2pdf/logger.rb\nFYI: process file 6 of 8 : ./lib/source2pdf/version.rb\nFYI: process file 7 of 8 : ./test/lib/github_exporter/test_github_exporter.rb\nFYI: process file 8 of 8 : ./test/test_helper.rb\nYour output file is '/Users/agilecreativity/Desktop/source2pdf/vim_printer_source2pdf.tar.gz'\nConvert file 1 of 9 : ./index.html\nConvert file 2 of 9 : ./lib/source2pdf.rb.xhtml\nConvert file 3 of 9 : ./lib/source2pdf/cli.rb.xhtml\nConvert file 4 of 9 : ./lib/source2pdf/source2pdf.rb.xhtml\nConvert file 5 of 9 : ./lib/source2pdf/exporter.rb.xhtml\nConvert file 6 of 9 : ./lib/source2pdf/logger.rb.xhtml\nConvert file 7 of 9 : ./lib/source2pdf/version.rb.xhtml\nConvert file 8 of 9 : ./test/lib/github_exporter/test_github_exporter.rb.xhtml\nConvert file 9 of 9 : ./test/test_helper.rb.xhtml\nConvert files to pdfs took 8.01304 ms\nYour final output is '/Users/agilecreativity/Desktop/source2pdf_tmp/source2pdf/html2pdf_source2pdf.tar.gz'\nCreate pdfmarks took 0.026689 ms\nCombine pdf files took 0.463659 ms\nYour combined pdf is available at /Users/agilecreativity/Desktop/source2pdf_tmp/source2pdf/pdfs2pdf_source2pdf.pdf\nYour final output is /Users/agilecreativity/Desktop/source2pdf.pdf\n```\n\n### Sample Output\n\n#### Using the 'default' theme/colorscheme for Vim\n\n```shell\nsource2pdf -u https://github.com/agilecreativity/source2pdf.git --exts rb\n```\n\nWhich generated the following [pdf output file](https://github.com/agilecreativity/source2pdf/raw/master/samples/source2pdf_default_colorscheme.pdf)\n\nThe example screenshot:\n\n![](https://github.com/agilecreativity/source2pdf/raw/master/samples/source2pdf_default_colorscheme.png)\n\n#### Use non-default colorscheme/theme for Vim\n\nUse my favourite [seoul256][] colorscheme\n\n```shell\nsource2pdf -u https://github.com/agilecreativity/source2pdf.git --exts rb --theme seoul256\n```\n\nWhich generated the following [pdf output file](https://github.com/agilecreativity/source2pdf/raw/master/samples/source2pdf_seoul256_colorscheme.pdf)\n\nThe example screenshot:\n\n![](https://github.com/agilecreativity/source2pdf/raw/master/samples/source2pdf_seoul256_colorscheme.png)\n\n### Contributing\n\n1. Fork it\n2. Create your feature branch (`git checkout -b my-new-feature`)\n3. Commit your changes (`git commit -am 'Add some feature'`)\n4. Push to the branch (`git push origin my-new-feature`)\n5. Create new Pull Request\n\n[thor]: https://github.com/erikhuda/thor\n[minitest]: https://github.com/seattlerb/minitest\n[yard]: https://github.com/lsegal/yard\n[pry]: https://github.com/pry/pry\n[rubocop]: https://github.com/bbatsov/rubocop\n[grit]: https://github.com/mojombo/grit\n[Ghostscript]: http://ghostscript.com/doc/current/Install.htm\n[Wkhtmltopdf]: https://github.com/pdfkit/pdfkit/wiki/Installing-WKHTMLTOPDF\n[Vim]: http://www.vim.org\n[vim_printer]: https://github.com/agilecreativity/vim_printer\n[pdfs2pdf]: https://github.com/agilecreativity/pdfs2pdf\n[html2pdf]: https://github.com/agilecreativity/html2pdf\n[monokai]: https://github.com/lsdr/monokai\n[seoul256]: https://github.com/junegunn/seoul256.vim\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fsource2pdf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fagilecreativity%2Fsource2pdf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fagilecreativity%2Fsource2pdf/lists"}