rfc2html – php script to view rfc with index and links.

If you have to keep viewing RFC’s and you miss index and links in RFC while viewing rfc, then you should check-out rfc2html. It is scrtip that takes plain text rfc and converts it to html.

You can get the original code from sourceforge.

However, I found some small issues with the script and have sent a mail to the authour about the same. In the meantime, you can use the diff below to fix the issue’s or download this diff file rfc2html.diff and apply the diff:

--- rfc2html.php	2014-06-27 18:42:14.027210656 +0530
+++ new/rfc2html.php	2014-07-06 12:06:23.212308365 +0530
@@ -19,7 +19,7 @@
- * @version $Id: rfc2html.php,v 1.9 2006/02/08 21:44:42 chmate Exp $
+ * @version $Id: rfc2html.php 15 2006-02-22 08:52:04Z chmate $
  * @author Chang Hsiou-Ming <chmate@gmail.com>
@@ -35,8 +35,8 @@
 define("PAGE_COLUMNS", 72);
 define("BUF_SIZE", 8192);
 define("CENTRAL_ERROR", 4);
-define("REF_PATTERN", '/\[RFC(\d+)\]/');
-define("REF_REPLACE", '<a class="ref" href="rfc2html.php?in=\1">\0</a>');
+define("REF_PATTERN", '/\[(\w*\d+)\]/');
+define("REF_REPLACE", '<a class="ref" href="#REF\1">\0</a>');
 define("REFED_REPLACE", '<a name="REF\1">\0</a>');
 define("SEC_NUMBER", '/^(\d+(\.(\d|\w)+)*)(\s|\.)/');
 define("SEC_PATTERN", '/((section|sec)\s*(\d+(\.\d+)*))/i');
@@ -235,7 +235,6 @@
 		echo "</div><!-- page -->\n";
-	//echo '<pre>'; var_dump($rfc_toc); echo '</pre>';	
 	$toc = build_toc($toc);
 	echo "</div><!-- pages -->\n";
@@ -639,12 +638,11 @@
 #sidebar {
-	position: fixed;
-	top: 5px;
-	left: 1px; 
+	position: absolute;
+	top: 50px;
+	left: 10px;
 	width: 280px;
 	margin: 0;
-    font-size:10px;
 #navbar {
@@ -727,10 +725,8 @@
 div.toolbar {
-    position: fixed;
 	background: #e0e0e0;
-    width: 100%;
-	margin: 10;
+	margin: 0;
 	padding: 10px 2em 10px 1em;
 	border: 2px dashed #bbbbbb;
@@ -812,7 +808,6 @@
 	<?php @include 'rfc2html_head.php'; ?>	
 <div class="toolbar">
 	<form method="get" action="rfc2html.php">
@@ -821,7 +816,7 @@
 			<input type="submit" value="Go!" />
-</div> -->
 	if($text) {

Setup your own RFC Editor for Linux.

Tux, the Linux penguin
Image via Wikipedia

Well, if you are a professional who has to keep referring to RFC, then you know how good it would be to have the RFC downloaded and kept in your computer. But then unless you can search it and use and editor with it, its of not much use. So, here is something  that you can do :

First get the rfc rpm from the below link:


And then set the correct editor for the RFC files:


And then you would need to set the full path for the RFC repository to a file called “~/.rfcrc”. This file would contain only one line and that would be the path where you have stored all the RFC’s. And BTW, if you do not download the RFC’s then this tool will directly search and download from the default base location so you do not need to do anything.

And then you can also set syntax and filetype in .vimrc to “rfc”. Now you are all set.
Just execute


You will see the list of options. And here is quick options that you may keep handy

rfc  -- show the headline for the rfc
rfc -l  -- open the rfc
rfc -r -- do regex search on rfc-index
rfc -s   -- search for string

Hope this helps

Enhanced by Zemanta

RFC Reader – Elegnant way to read RFC and other text documents.

You can find RFC Reader here.

Description of the tool:

RFC Reader is a professional tool for reading RFC document. It can generate a section directory tree. And it provides lots of features to help you reading RFC documents, such as bookmark, highlight, search, and automatically record where you are reading. Version 3.2 is optimized and it is free now! You can use it without any limitation.

Another interesting tool is here.

It is minimal but quite good.