From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on dcvr.yhbt.net X-Spam-Level: X-Spam-ASN: X-Spam-Status: No, score=-4.0 required=3.0 tests=ALL_TRUSTED,BAYES_00 shortcircuit=no autolearn=ham autolearn_force=no version=3.4.0 Received: from localhost (dcvr.yhbt.net [127.0.0.1]) by dcvr.yhbt.net (Postfix) with ESMTP id D56D72035F for ; Thu, 1 Sep 2016 18:20:30 +0000 (UTC) From: Eric Wong To: meta@public-inbox.org Subject: [PATCH 2/3] txt2pre: allow overriding title via env Date: Thu, 1 Sep 2016 18:20:26 +0000 Message-Id: <20160901182027.8285-3-e@80x24.org> In-Reply-To: <20160901182027.8285-1-e@80x24.org> References: <20160901182027.8285-1-e@80x24.org> List-Id: This will allow reasonable titles to be generated for manpages. --- Documentation/include.mk | 2 +- Documentation/txt2pre | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Documentation/include.mk b/Documentation/include.mk index 51a914b..4583f95 100644 --- a/Documentation/include.mk +++ b/Documentation/include.mk @@ -59,7 +59,7 @@ dtxt := design_notes.txt design_www.txt dc-dlvr-spam-flow.txt dtxt := $(addprefix Documentation/, $(dtxt)) $(mantxt) %.html: %.txt - $(txt2pre) + TITLE="$(basename $( }; -my ($title) = ($str =~ /\A([^\n]+)/); +my $title = $ENV{TITLE}; +($title) = ($str =~ /\A([^\n]+)/) unless $title; $title = ascii_html($title); my $l = PublicInbox::Linkify->new; $str = $l->linkify_1($str); -- EW