Code Monkey home page Code Monkey logo

rfc's Introduction

rfc

Build Status

rfc is a little tool written in Bash to read RFCs from the command-line. It fetches RFCs and drafts from the Web and caches them locally.

Usage

Just type rfc followed by the RFC number or the draft name:

$ rfc <RFC num>

e.g.:

rfc 42 # Read the RFC 42
rfc 1234 # Read the RFC 1234
rfc draft-ietf-core-coap-18 # Read IETF draft core-coap version 18

Use rfc help to see all available subcommands.

Options

  • --version: same as the version subcommand
  • --help: same as the help subcommand

Exit codes

  • 0: normal execution
  • 1: the requested RFC or archive cannot be found
  • 2: unrecognized option/subcommand
  • 3: unable to connect to the network
  • 4: can't find curl nor wget

Install

Basic install

mkdir -p ~/bin
curl -sL https://raw.githubusercontent.com/bfontaine/rfc/v0.2.6/rfc > ~/bin/rfc
chmod u+x ~/bin/rfc

This creates the ~/bin directory if it doesn’t exist, and download rfc in it. If it’s not in your PATH, you have to add it:

echo 'export PATH="$HOME/bin:$PATH"' >> ~/.bashrc

You may also want to install the manpage, located in man/rfc.1.

Using Homebrew

If you use Homebrew or Linuxbrew you can install rfc with one command:

brew install bfontaine/utils/rfc

Archlinux

For archlinux users, you can use the AUR package rfc-read.

The command for use it is rfc.

Requirements

  • curl or wget. It’ll try $CURL, then curl, then wget.
  • less or another pager. It uses $PAGER if it’s set.

Customization

You can choose which directory rfc uses by setting the RFC_DIR environment variable. The directory is automatically created if it doesn’t exist.

The default directory is ~/.RFCs.

Troubleshooting

rfc version 0.2.5 and above has a special --debug flag that, if passed as the first argument, enables tracing of all the Bash commands in the script.

Credits

Baptiste Fontaine and contributors.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.