Giter VIP home page Giter VIP logo

rfc's Introduction

Pretty RFC

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.

Running the app

Dependencies:

  • git
  • Ruby 1.9
  • rake
  • Bundler
  • libxml2
  • PostgreSQL

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 DATABASE_URL 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/

The RFC index

The index of all RFCs is pulled from FTP: ftp://ftp.rfc-editor.org/in-notes/rfc-index.xml

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.

The search index

Searching is done with PostgreSQL full text searching. The necessary indexes, stored procedures and triggers for this are in Searchable module.

The search results ordering is not perfect, but it is improved by bringing in a popularity score from faqs.org. This is done by the "import_popular" rake task as part of the bootstrap process.

Fetching and rendering RFCs

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:

  1. 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.

  2. Failing that, it fetches the metadata for the RFC from http://datatracker.ietf.org/doc/

  3. If there is a link to the XML from the datatracker, use that. There probably won't be a link, though.

  4. 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.

When obtained, the XML is parsed and rendered to HTML by the RFC module. The templates used for generating HTML are in templates/.

rfc's People

Contributors

fastred avatar mislav avatar sanpii avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rfc's Issues

Errata

@mislav This is great. Well done for putting this up.

Many RFCs have important errata. The official source never folds the errata back into the canonical text so most people miss it. You have an opportunity to do the internet a big favour by putting the errata into the published text!

Here's an example: http://www.rfc-editor.org/errata_search.php?rfc=3696

Request: increase readability

This is awesome!

I have a few requests that I think would increase readability:

  1. bigger font-size
  2. increase line-height
  3. make lines 50-80 chars long. 72 seems to be the RFC-standard.

Bookmarklet link gives "Not found"

I tried clicking the "Bookmarklet: Prettify RFC" link on the front page, but it gives a

Not found

Resource is not present in the app.
← Home

response.

rfc2109 : no such file

BOOM! Something exploded.
The error message was:
Errno::ENOENT: No such file or directory - /app/tmp/xml/rfc2109.xml

Please report bugs here.

← Home

Mobile UI legibility improvements

On mobile size, you can increase body left-right paddings, font size and line heights just a little bit to improve legibility. It is not even possible to keep reading on mobile/tablet this way. (probably this is not something designed for that purpose, but here are my 2¢).

Comments

Not 100% sure about this myself, but perhaps it would be good to allow comments and conversation about the RFCs?

In theory there's nothing stopping interested parties getting involved with the IETF directly, but in practice it's a pretty forbidding clique.

Allowing comments might actually tempt people with an opinion but little spare time to have their say about these important documents.

Command-Line

It'd be great to be able to feed a command the XML and get the pretty HTML on STDOUT; I have a feeling it'd be incorporated into a lot of toolchains if you did.

TOC section numbers

Currently sections in the TOC aren't numbered, although RFC sections are often referenced by their numbers. Listing section numbers in the TOC will thus improve navigation.

Copyright statements

Nice project.

However, AFAICT you're re-publishing without the copyright statements.

Ignoring the legal consequences (if you can), doing so is pretty anti-social.

See section 3(c) of http://trustee.ietf.org/docs/IETF-Trust-License-Policy.pdf. Note that that doesn't explicitly cover older documents, but they generally contain language that allows you to re-present the document -- provided that you include the copyright statement.

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.