The goal of this projects is to collect and reformat official RFC documents and popular drafts.
RFCs, as published officially, are in unsightly and impractical paged format. What's worse, the official format of most RFCs is plain text, even though they are authored in richer formats such as XML.
- Ruby 1.9
By default, the app will try to connect to the database named "rfc" on localhost
without a username or password. This can be affected with the
environment variable. If the database doesn't exist, the boostrap
script will try to create it.
# initialize dependencies and database $ script/bootstrap # start the server $ bundle exec rackup # now visit http://localhost:9292/
Then the metadata for each RFC entry is imported to the database. This is done by the "import_index" rake task as part of the bootstrap process.
When an RFC is first requested and it has never been processed, the app tries to look up its source XML document and render it to HTML. The XML lookup goes as follows:
The fetcher tries to find the XML in http://xml.resource.org/public/rfc/xml/ where some RFCs in the 2000–53xx range can be found.
Failing that, it fetches the metadata for the RFC from http://datatracker.ietf.org/doc/
If there is a link to the XML from the datatracker, use that. There probably won't be a link, though.
When there is no XML link, the fetcher looks up the draft name for the RFC and checks if it can at least find the XML for its draft at http://www.ietf.org/id/
Note: This process only discovers XML sources for a small subset of RFCs. This is the biggest problem I have right now. The XML and nroff files in which RFCs were authored are usually not published, but are archived by rfc-editor.org and available by request by email.
I'm investigating is there a way for bulk retrieval of these source files.
If unable to obtain them, I will have to reformat RFCs by parsing the current publications instead of the source XML. This might be a lot of work.