Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

synful

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

synful

  • 1.1.5
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

synful

Ruby utility that shows syntax highlighted code in your browser

Goals

  1. Provide an easy way to view and print syntax highlighted source code
  2. Enable file selection or rejection in an intuitive way

Overview

Synful is a command line utility that will render syntax highlighted source code in your browser. Simply indicate the file or directory path names with optional file extensions to include or exclude. Synful will generate a nice index and an entry for each file and it will serve up the content and launch you web browser to view it. Once the request has been served, the server will close down and exit. If you'd like to keep the server running so that you can make changes and hit refresh, there is an option to do that also. All syntax highlighting is made possible by the amazing Rouge library.

Examples

$ synful winr/bin/winr censive/lib/censive.rb

A more complicated example is:

synful -f -x spec,ru lib test /tmp/example.rb -- -test/boring-results.txt

This will keep synful in the foreground (the -f option) and will exclude all files with the .spec or .ru extensions. It will also include files from the lib/ and test/ directories as well as the /tmp/example.rb file. Even though the test/boring-results.txt file should be rendered, we have disabled it via the - (minus sign or dash) in front of its filename. Note that to use this type of negation, we need to precede it with a "double-dash" -- to tell synful that we are done with the normal command options.

Install

Install via rubygems with:

gem install synful

Options

$ synful -h

usage: synful [options] <paths ...> [--] <-paths_to_skip ...>
    -b, --bypass                     Bypass (skip over) top comments (begin with "#") in files
    -f, --foreground                 Stay in the foreground, allows more requests
    -h, --help                       Show help and command usage
    -i, --include <exts>             Comma list of extensions to include (incompatible with -x)
    -x, --exclude <exts>             Comma list of extensions to exclude (incompatible with -i)

License

This software is licensed under terms of the MIT License.

FAQs

Package last updated on 05 Sep 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc