user/dev discussion of public-inbox itself
 help / color / mirror / code / Atom feed
From: Eric Wong <e@80x24.org>
To: meta@public-inbox.org
Subject: [PATCH] doc: add standards reference
Date: Tue, 23 Apr 2019 03:28:48 +0000	[thread overview]
Message-ID: <20190423032848.31002-1-e@80x24.org> (raw)

Incomplete at the moment, but this ought to be a handy reference
for both implementers and users alike.
---
 Documentation/.gitignore     |  1 +
 Documentation/include.mk     |  6 ++-
 Documentation/standards.perl | 74 ++++++++++++++++++++++++++++++++++++
 MANIFEST                     |  1 +
 4 files changed, 81 insertions(+), 1 deletion(-)
 create mode 100755 Documentation/standards.perl

diff --git a/Documentation/.gitignore b/Documentation/.gitignore
index 107ad36..e78a0d3 100644
--- a/Documentation/.gitignore
+++ b/Documentation/.gitignore
@@ -1 +1,2 @@
 /public-inbox-*.txt
+/standards.txt
diff --git a/Documentation/include.mk b/Documentation/include.mk
index 28fa757..02cbef3 100644
--- a/Documentation/include.mk
+++ b/Documentation/include.mk
@@ -81,8 +81,12 @@ txt2pre = $(PERL) -I lib ./Documentation/txt2pre <$< >$@+ && \
 	touch -r $< $@+ && mv $@+ $@
 txt := INSTALL README COPYING TODO
 dtxt := design_notes.txt design_www.txt dc-dlvr-spam-flow.txt hosted.txt
+dtxt += standards.txt
 dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt)
 
+Documentation/standards.txt : Documentation/standards.perl
+	$(PERL) $< >$@+ && mv $@+ $@
+
 %.html: %.txt
 	TITLE="$(basename $(<F))" $(txt2pre)
 %.html: %
@@ -91,7 +95,7 @@ dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt)
 docs_html := $(addsuffix .html, $(subst .txt,,$(dtxt)) $(txt))
 html: $(docs_html)
 gz_docs := $(addsuffix .gz, $(docs) $(docs_html))
-rsync_docs := $(gz_docs) $(docs) $(txt) $(docs_html)
+rsync_docs := $(gz_docs) $(docs) $(txt) $(docs_html) $(dtxt)
 %.gz: %
 	gzip -9 --rsyncable <$< >$@+
 	touch -r $< $@+
diff --git a/Documentation/standards.perl b/Documentation/standards.perl
new file mode 100755
index 0000000..baaaaf0
--- /dev/null
+++ b/Documentation/standards.perl
@@ -0,0 +1,74 @@
+#!/usr/bin/perl -w
+use strict;
+# Copyright 2019 all contributors <meta@public-inbox.org>
+# License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+
+print <<EOF;
+Relevant standards for public-inbox users and hackers
+-----------------------------------------------------
+
+Non-exhaustive list of standards public-inbox software attempts or
+intends to implement.  This list is intended to be a quick reference
+for hackers and users.
+
+Given the goals of interoperability and accessibility; strict
+conformance to standards is not always possible, but rather
+best-effort taking into account real-world cases.  In particular,
+"obsolete" standards remain relevant as long as clients and
+data exists.
+
+IETF RFCs
+---------
+
+EOF
+
+my $rfcs = [
+	3977 => 'NNTP',
+	977 => 'NNTP (old)',
+	6048 => 'NNTP additions to LIST command (TODO)',
+	8054 => 'NNTP compression (TODO)',
+	4642 => 'NNTP TLS (TODO)',
+	8143 => 'NNTP TLS (TODO)',
+	2980 => 'NNTP extensions (obsolete, but NOT irrelevant)',
+	4287 => 'Atom syndication',
+	4685 => 'Atom threading extensions',
+	2919 => 'List-Id mail header',
+	5064 => 'Archived-At mail header',
+	3986 => 'URI escaping',
+	1521 => 'MIME extensions',
+	2616 => 'HTTP/1.1 (newer updates should apply, too)',
+	7230 => 'HTTP/1.1 message syntax and routing',
+	7231 => 'HTTP/1.1 semantics and content',
+	2822 => 'Internet message format',
+	# TODO: flesh this out
+
+];
+
+my @rfc_urls = qw(tools.ietf.org/html/rfc%d
+		  www.rfc-editor.org/errata_search.php?rfc=%d);
+
+for (my $i = 0; $i < $#$rfcs;) {
+	my $num = $rfcs->[$i++];
+	my $txt = $rfcs->[$i++];
+	print "rfc$num\t- $txt\n";
+
+	printf "\thttps://$_\n", $num foreach @rfc_urls;
+	print "\n";
+}
+
+print <<'EOF'
+Other relevant documentation
+----------------------------
+
+* Documentation/technical/http-protocol.txt in git source code:
+  https://public-inbox.org/git/9c5b6f0fac/s
+
+* Various mbox formats (we currently emit and parse mboxrd)
+  https://en.wikipedia.org/wiki/Mbox
+
+Copyright
+---------
+
+Copyright 2019 all contributors <meta@public-inbox.org>
+License: AGPL-3.0+ <https://www.gnu.org/licenses/agpl-3.0.txt>
+EOF
diff --git a/MANIFEST b/MANIFEST
index 150e337..9858b9e 100644
--- a/MANIFEST
+++ b/MANIFEST
@@ -19,6 +19,7 @@ Documentation/public-inbox-overview.pod
 Documentation/public-inbox-v1-format.pod
 Documentation/public-inbox-v2-format.pod
 Documentation/public-inbox-watch.pod
+Documentation/standards.perl
 Documentation/txt2pre
 HACKING
 INSTALL
-- 
EW


                 reply	other threads:[~2019-04-23  3:28 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: http://public-inbox.org/README

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20190423032848.31002-1-e@80x24.org \
    --to=e@80x24.org \
    --cc=meta@public-inbox.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/public-inbox.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).