about summary refs log tree commit homepage
path: root/lib/PublicInbox/WwwStream.pm
DateCommit message (Collapse)
2019-05-07wwwstream: do not load URI.pm
It's unneeded since commit e358bd7a3833f8c5 (2016-07-02) ("inbox: base_url method takes PSGI env hashref instead") So we only depend on URI::Escape from the "URI" CPAN distribution, at the moment.
2019-05-05Merge remote-tracking branch 'origin/wwwlisting'
* origin/wwwlisting: www: support listing of inboxes start depending on Perl 5.10.1+
2019-05-04wwwstream: drop tor2web URL
It was a MITM hazard and been killed off by the DoS subsystem last July: https://marc.info/?i=87d0vwwkbs.fsf@riseup.net
2019-04-19www: support listing of inboxes
We will still return a 404 by default to '/' for compatibility with users of Plack::App::Cascade or similar. Inboxes are sorted by modification times to help users detect activity (similar to the /$INBOX/ topic view). New configuration options: * publicinbox.wwwlisting - configure the listing type * publicinbox.<name>.hide - hide a particular inbox from the listing See changes to public-inbox-config.pod for full descriptions of the new options. Requested-by: Leah Neukirchen <leah@vuxu.org> https://public-inbox.org/meta/871sdfzy80.fsf@gmail.com/
2019-04-16cleanup: use '$ibx' consistently when referring to Inbox refs
'$inbox' is more human-readable, so that is for the more human-readable name in most cases. Making our variable naming more consistent should make the code easier-to-review and harder to screw up.
2019-01-20$INBOX/_/text/color/ and sample user-side CSS
Since we now support more CSS classes for coloring, give this feature more visibility.
2019-01-20www: admin-configurable CSS via "publicinbox.css"
Maybe we'll default to a dark theme to promote energy savings... See contrib/css/README for details
2019-01-09doc: various overview-level module comments
Hopefully this helps people familiarize themselves with the source code.
2018-12-28wwwstream: always show multi-line cloning instructions
Unfortunately, long inbox names and URLs don't really display well with my gigantic fonts...
2018-03-30wwwstream: flesh out clone instructions for v2
Relying solely on git for v2 repos is probably not so useful, so add pointers to public-inbox-init/index commands.
2018-03-27www: support cloning individual v2 git partitions
This will require multiple client invocations, but should reduce load on the server and make it easier for readers to only clone the latest data. Unfortunately, supporting a cloneurl file for externally-hosted repos will be more difficult as we cannot easily know if the clones use v1 or v2 repositories, or how many git partitions they have.
2018-02-07update copyrights for 2018
Using update-copyrights from gnulib While we're at it, use the SPDX identifier for AGPL-3.0+ to ease mechanical processing.
2016-12-03wwwstream: improve documentation and variable naming
Hopefully this makes the code more readable for newbies.
2016-11-29note the source code is AGPL for cloning
This should be adequate warning for folks who may be uncomfortable or uncertain about even possessing AGPL source code due to employer agreements and such. Disclaimer: I remain completely in favor of AGPL and strong copyleft, and am more than willing to risk my own future on it. However, I refuse to even nudge people into downloading AGPL source code if it presents any legal risk to them.
2016-08-23www: give tor2web some exposure, too
Not everybody can run Tor, hopefully more can use Tor2web even if it compromises their privacy. This should help make system more resilient for users unable to use Tor.
2016-08-18www: implement generic help text
Begin documenting some basic help functionality. I may tweak the anchor names of the various HTML endpoints to be more consistent with each other (old ones will be supported for a short while), so I'm not documenting those, for now. This may become part of a builtin key-value store for basic texts, but this probably shouldn't become a wiki engine, either.
2016-08-12www: allow including links to NNTP sites in HTML footer
Improve the discoverability of NNTP endpoints for users who still know what NNTP is. ==> ~/.public-inbox/config <== ; aliases for the locally-run nntpd can be specified in ; the "publicinbox" section: [publicinbox] nntpserver = nntp://ou63pmih66umazou.onion/ nntpserver = news.public-inbox.org ; NNTPS is not supported natively, yet, ; but one can use haproxy or similar ; nntpserver = nntps://news.public-inbox.invalid/ ; mirrors for specific inboxes may be specified either as full ; NNTP (or NNTPS) URLs, or with the server name only if the ; newsgroup name is specfied for a local NNTP server [publicinbox "git"] ... newsgroup = inbox.a.b.c nntpmirror = nntp://czquwvybam4bgbro.onion/ nntpmirror = hjrcffqmbrq6wope.onion ; there may be a mirror on a different server with a ; different name: nntpmirror = nntp://news.example.com/differently.named.group ; (And I really need to write manpages for all this...)
2016-08-02wwwstream: prioritize search in top title bar
search is probably more useful so users should be able to select it sooner. Put it on its own line so it won't get scrolled off the edge for non-CSS users. Fix a minor spacing bug in the input tag while we're at it, too
2016-07-21www: redefinable project name and URL
This should make it easier for folks to run their own forks.
2016-07-21www: a note .onion URLs require the usage of Tor
Not everybody knows what .onion URLs are, so refer them to Tor.
2016-07-21www: label sections and hopefully improve navigation
Clearly label "Thread overview" and "Reply instructions" so users can quickly skip stuff they're not interested in. Additionally, note the fact the thread view allows quick navigation within the thread to avoid extra network requests and improve the display for single-message threads. Finally, use <hr> to better-delineate sections of each page.
2016-07-06wwwstream: allow undef noop callback
This can be use to specify a small response using -html_tip.
2016-07-02wwwstream: wording/grammar tweaks in trailer
git.git documentation uses "clonable" so that's probably a better term than "clone-able". Also, shorten the section for retrieving our code and remove an obvious typo.
2016-07-02inbox: base_url method takes PSGI env hashref instead
This is lighter and we can work further towards eliminating our Plack::Request dependency entirely.
2016-07-01www_stream: fix stupid typo :x
Note to self: remember to run tests Fixes: 52052329aced ("git: allow cloning from the URL root, too")
2016-07-01git: allow cloning from the URL root, too
This means we can still show non-git users a somewhat browseable URL with a link to the README.html file while allowing git users to type less when cloning. All of the following are supported: git clone https://public-inbox.org/ public-inbox git clone https://public-inbox.org/public-inbox git clone https://public-inbox.org/public-inbox.git torsocks git clone http://ou63pmih66umazou.onion/public-inbox
2016-07-01update git repo location to https:// using GitHTTPBackend.pm
Might as well eat our own dogfood...
2016-07-01www_stream: fix search for new.html endpoint
We want to avoid the bare './' wherever possible, but it doesn't seem possible here.
2016-06-30www_stream: add response wrapper sub
This encapsulates an entire PSGI response array, hopefully making it easier to generate responses and avoid typos when setting the Content-Type.
2016-06-30www: use WwwStream for dumping thread and search views
This allows us the HTTP server to react to backpressure from slow clients when writing. As a side effect, this also makes it easier for us to maintain a consistent header/footer across our HTML.
2016-06-25www_stream: linkify cloneurl entries if they're HTTP/HTTPS
They may be other public-inbox instances which are browseable, so provide a link to them to encourage their use as clones.
2016-06-18view: introduce WwwStream interface
This will allow us to commonalize HTML generation in the future and is the start of moving existing HTML generation to a "pull" streaming model (from the existing "push" one). Using the getline/close pull model is superior to the existing $fh->write streaming as it allows us to throttle response generation based on backpressure from slow clients.