]> Sergey Matveev's repositories - public-inbox.git/commitdiff
various internal documentation updates
authorEric Wong <e@80x24.org>
Fri, 20 Nov 2015 01:02:40 +0000 (01:02 +0000)
committerEric Wong <e@80x24.org>
Fri, 20 Nov 2015 01:02:40 +0000 (01:02 +0000)
Hopefully this gives new hackers a better overview of
how the components relate to each other.

24 files changed:
lib/PublicInbox/Config.pm
lib/PublicInbox/ExtMsg.pm
lib/PublicInbox/Feed.pm
lib/PublicInbox/Filter.pm
lib/PublicInbox/GitCatFile.pm
lib/PublicInbox/Hval.pm
lib/PublicInbox/Listener.pm
lib/PublicInbox/MDA.pm
lib/PublicInbox/MID.pm
lib/PublicInbox/Mbox.pm
lib/PublicInbox/Msgmap.pm
lib/PublicInbox/NNTP.pm
lib/PublicInbox/NewsGroup.pm
lib/PublicInbox/Search.pm
lib/PublicInbox/SearchIdx.pm
lib/PublicInbox/SearchMsg.pm
lib/PublicInbox/SearchView.pm
lib/PublicInbox/View.pm
lib/PublicInbox/WWW.pm
public-inbox-init
public-inbox-learn
public-inbox-mda
public-inbox-nntpd
public-inbox.cgi

index 0d73a867059f468c1e936d79d0a9a2102a5e3d61..8da00b0a818d1e44d0248d00cd39564d4fb1a919 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used throughout the project for reading configuration
 package PublicInbox::Config;
 use strict;
 use warnings;
index 0cba49dd21df33032f72968c693069297a6555ef..506804711fc0756b37da79d61b01f6bd7d9d0ad4 100644 (file)
@@ -1,5 +1,10 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used by the web interface to link to messages outside of the our
+# public-inboxes.  Mail threads may cross projects/threads; so
+# we should ensure users can find more easily find them on other
+# sites.
 package PublicInbox::ExtMsg;
 use strict;
 use warnings;
index e66b678bf062637aae69851c1d03af86ceb8fe74..1201dd1165a03d3e0fc3ca3ed81b3dfe3bbf735f 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used for generating Atom feeds for web-accessible mailing list archives.
 package PublicInbox::Feed;
 use strict;
 use warnings;
index 82baa9b921df42e2581420d80d7807ebbc311a0d..ea6fd33f06d18d1a8278535bd2e3d0c166845da4 100644 (file)
@@ -1,6 +1,7 @@
 # Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 #
+# Used to filter incoming mail for -mda and importers
 # This only exposes one function: run
 # Note: the settings here are highly opinionated.  Obviously, this is
 # Free Software (AGPLv3), so you may change it if you host yourself.
index 629d23ed214b5273f4aeacffa42945085c415199..dd95d5f3a0f94f5cd259cdffea4b98a6052d73e7 100644 (file)
@@ -1,5 +1,8 @@
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: GPLv2 or later (https://www.gnu.org/licenses/gpl-2.0.txt)
+#
+# Used to read files from a git repository without excessive forking.
+# Used in our web interfaces as well as our -nntpd server.
 # This is based on code in Git.pm which is GPLv2, but modified to avoid
 # dependence on environment variables for compatibility with mod_perl.
 # There are also API changes to simplify our usage and data set.
index 9fbe616f302e3d1580d5ccb83cfc7e8b59406847..ab6e044bbf9716f9a1c23ab00cfa70339a781c70 100644 (file)
@@ -1,7 +1,8 @@
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 #
-# represents a header value in various forms
+# represents a header value in various forms.  Used for HTML generation
+# in our web interface(s)
 package PublicInbox::Hval;
 use strict;
 use warnings;
index 7f9658b89b231f73b2a07a8744954bf4537a1c8c..67817d9f8ef356560703a2a5b8477b0d2cb45d76 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used by -nntpd for listen sockets
 package PublicInbox::Listener;
 use strict;
 use warnings;
index 7025fb3c8e054a3a306750cd284655237d9185ed..ba5f36b09ee8b9c25f931874cc739b7bad8d4dbc 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# For the -mda script (mail delivery agent)
 package PublicInbox::MDA;
 use strict;
 use warnings;
index 3d404ef821187652f31a267da48e25597b928ed9..169ffa76505f0e788868059d0c5491289060cd45 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Various Message-ID-related functions.
 package PublicInbox::MID;
 use strict;
 use warnings;
index 80e8efc978199cd9178e7fc441a286be020d29ff..c180a0dc84a2b915dadc8661276e78e023d221ab 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
-# Streaming interface for formatting messages as an mboxrd
+
+# Streaming interface for formatting messages as an mboxrd.
+# Used by the web interface
 package PublicInbox::Mbox;
 use strict;
 use warnings;
index 6e9f27433c2eacf495a17b9150099800a40f3914..8fe17a9505f0db151fe8c7f8f67ff9170b54e0b9 100644 (file)
@@ -1,6 +1,12 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
-# bidirectional Message-ID <-> Article Number mapping
+
+# bidirectional Message-ID <-> Article Number mapping for the NNTP
+# and web interfaces.  This is required for implementing stable article
+# numbers for NNTP and allows prefix lookups for partial Message-IDs
+# in case URLs get truncated from copy-n-paste errors by users.
+#
+# This is maintained by ::SearchIdx
 package PublicInbox::Msgmap;
 use strict;
 use warnings;
index 0bfafa880cba62aa9a10e70634757abb957abfc4..295aee0e1725d093f57df8b649782b47f1816a02 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Each instance of this represents a NNTP client socket
 package PublicInbox::NNTP;
 use strict;
 use warnings;
@@ -897,7 +899,7 @@ sub do_more ($$) {
        $self->do_write($data);
 }
 
-# callbacks for by Danga::Socket
+# callbacks for Danga::Socket
 
 sub event_hup { $_[0]->close }
 sub event_err { $_[0]->close }
index 02e90111ddcf2cf5af385cb98eb0c8a9acf853fc..3a3189584af438f8036f6e1f9353a90898f4c685 100644 (file)
@@ -1,5 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used only by the NNTP server to represent a public-inbox git repository
+# as a newsgroup
 package PublicInbox::NewsGroup;
 use strict;
 use warnings;
index fbc6882c79adfd4af03bc13b2b5414ffd404d1bf..0f7815fb610124ece7bbbc8867e93199e085490e 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 # based on notmuch, but with no concept of folders, files or flags
+#
+# Read-only search interface for use by the web and NNTP interfaces
 package PublicInbox::Search;
 use strict;
 use warnings;
index 0646cfb38c0f60e90b29e5f0b9b44c3ab04d95bd..e9af547f3fbd7cbfa8ac29a638e9f71ad83773d7 100644 (file)
@@ -1,6 +1,11 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 # based on notmuch, but with no concept of folders, files or flags
+#
+# Indexes mail with Xapian and our (SQLite-based) ::Msgmap for use
+# with the web and NNTP interfaces.  This index maintains thread
+# relationships for use by Mail::Thread.  This writes to the search
+# index.
 package PublicInbox::SearchIdx;
 use strict;
 use warnings;
index 8d49ee207ab0b6e2ba2e5c03d13f39e2153278ec..93be747507bc7c7589afcad39758a3d10dfa7d33 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: GPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 # based on notmuch, but with no concept of folders, files or flags
+#
+# Wraps a document inside our Xapian search index.
 package PublicInbox::SearchMsg;
 use strict;
 use warnings;
index a51acbb4eaaa8933a8211216bbd8ee18827f21c4..a15af55ec17777d8f1951eb187ac66c1cc1068ea 100644 (file)
@@ -1,5 +1,7 @@
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Displays search results for the web interface
 package PublicInbox::SearchView;
 use strict;
 use warnings;
index 92fedd19cf715042b37bbb0f56b1a0d39274639a..15d846a635425dc66c7b2ffe37cd11a1e24e7453 100644 (file)
@@ -1,5 +1,8 @@
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used for displaying the HTML web interface.
+# See Documentation/design_www.txt for this.
 package PublicInbox::View;
 use strict;
 use warnings;
index fb57163ef44499abfe03b487617ff87f69dbe661..d00dfe7cccee56ac296560d162fc196ca8f8e0ae 100644 (file)
@@ -1,6 +1,8 @@
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
 #
+# Main web interface for mailing list archives
+#
 # We focus on the lowest common denominators here:
 # - targeted at text-only console browsers (w3m, links, etc..)
 # - Only basic HTML, CSS only for line-wrapping <pre> text content for GUIs
index d6a63822a3980ffcfad5519fd7ce62a9ca88e491..d66361dfed4877801033595430aff9b2dfa04291 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Initializes a public-inbox, basically a wrapper for git-init(1)
 use strict;
 use warnings;
 my $usage = "public-inbox-init NAME GIT_DIR HTTP_URL ADDRESS [ADDRESS..]";
index 3b0dae8e9c04217334ff8f7173a6ecae245d0f5e..0c7b4199abeea2def7b452101ce83e4e24b9b7a1 100755 (executable)
@@ -1,6 +1,9 @@
 #!/usr/bin/perl -w
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Used for training spam (via SpamAssassin) and removing messages from a
+# public-inbox
 my $usage = "$0 (spam|ham) < /path/to/message";
 use strict;
 use warnings;
index df8ca38c13ff3d93d59765e0dd5751dc45d599ee..73c4ae1ceaa862bb01f888c50f7faaaacfa79ba6 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 # Copyright (C) 2013-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Mail delivery agent for public-inbox, run from your MTA upon mail delivery
 use strict;
 use warnings;
 my $usage = 'public-inbox-mda < rfc2822_message';
index 0035637d7aa874f8da400a4128991b2fbdcc0e5e..1f0cd377f9f098a67b4a2ec5a3a534907826c4ed 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 # Copyright (C) 2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Standalone NNTP server for public-inbox.
 use strict;
 use warnings;
 require PublicInbox::Daemon;
index 157cf6a200e8b060d36f4477b14a3728be29d20a..4b74a62ae04f59710e32774e611d6e9d3b04cb71 100755 (executable)
@@ -1,6 +1,8 @@
 #!/usr/bin/perl -w
 # Copyright (C) 2014-2015 all contributors <meta@public-inbox.org>
 # License: AGPLv3 or later (https://www.gnu.org/licenses/agpl-3.0.txt)
+#
+# Enables using PublicInbox::WWW as a CGI script
 use strict;
 use warnings;
 use IO::Handle;