#!/usr/bin/env perl # Copyright (C) 2014-2016 all contributors # License: AGPL-3.0+ # # Stupid script to make HTML from preformatted, utf-8 text versions, # only generating links for http(s). Markdown does too much # and requires indentation to output preformatted text. use strict; use warnings; use PublicInbox::Linkify; use PublicInbox::Hval qw(ascii_html); my $str = eval { local $/; <> }; my $title = $ENV{TITLE}; ($title) = ($str =~ /\A([^\n]+)/) unless $title; $title = ascii_html($title); my $l = PublicInbox::Linkify->new; $str = $l->linkify_1($str); $str = ascii_html($str); $str = $l->linkify_2($str); print '', qq(), "$title", "
",  $str , '
';