From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/17871 Path: news.gmane.org!.POSTED!not-for-mail From: John MacFarlane Newsgroups: gmane.text.pandoc Subject: Re: Filter for creating headers from filenames Date: Mon, 26 Jun 2017 18:44:05 +0200 Message-ID: <20170626164405.GA16562@Johns-MBP.home> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed X-Trace: blaine.gmane.org 1498495462 18356 195.159.176.226 (26 Jun 2017 16:44:22 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Mon, 26 Jun 2017 16:44:22 +0000 (UTC) User-Agent: Mutt/1.6.2 (2016-07-01) To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-X-From: pandoc-discuss+bncBCJZJHG45QDBBZHTYTFAKGQEM3VAEJA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jun 26 18:44:16 2017 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f185.google.com ([209.85.217.185]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dPX7Y-0004SO-9Y for gtp-pandoc-discuss@m.gmane.org; Mon, 26 Jun 2017 18:44:16 +0200 Original-Received: by mail-ua0-f185.google.com with SMTP id n31sf601790uai.1 for ; Mon, 26 Jun 2017 09:44:21 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1498495461; cv=pass; d=google.com; s=arc-20160816; b=bWpYCthfUhxGniq+YA8Bws1hpUql9LD9E6V7lOwFgFDw2sjqWBSx3ITDpsZ9cOA5f2 2DBLjTpdPcA783MZL+BalIFaHHThsagfdOL1Y4FXBii/YjwuTl4nJaDuBpgcNrndyQ3i A7riR8RGnnuPdRESuEURqy0Lax1OrHFgRhxExRi/3u/mnjyyR0zHtHSuGjYEwv2TbUZN 7HFgwSqEnQahEfAfNw/Os4F5Ky4s1dcJFTCDu9VMMONBo3q0Nmhp+nqxbLJ1LDaq4vzh syv4VECQWs7LtJmXvqr7CkSpclZqvcYhTNOBm5DNRttJGFvbnuISTEs6W9ETHnonHTm2 c7eg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:to :date:from:arc-authentication-results:arc-message-signature:sender :dkim-signature:arc-authentication-results; bh=mgmFdJOlPogJh/63PsNIHiXO1jAuGvqGaztwjZ9rPzs=; b=Q9xOrdu2W5Vqi5ITFvi1Ad+Zpz+BpS9PwmG8NWSNPsrMFPCxe2ud9pTAO6fC/oOpSQ LajqpnxHV5ITWgs9xvx8/MhUXobOs9bXWyUqfNAO1XLvAyk6GU2179R3Z4bmOJ514bah ES8PkArFocNuppOyKLOpl67uR+oXXS0gxU9uwFPaoPoXutVR7yEEuq4+jFDxFRPwx+vY qEAz81OSmQ4ce7eclmR9FTDUwovQD5EpiaJDXAqDRAzgpj5GwHytr9bVgzOfQk7mC/Qr Z4t2PK8KEe0ypzlslEmf8rFFBpfJyAjNqb4LFer96izmXQaKU6DOUc3u9F2Mk71VEoYK ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.b=qokb3jj7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::22d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:from:date:to:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent:x-original-sender :x-original-authentication-results:reply-to:precedence:mailing-list :list-id:list-post:list-help:list-archive:list-subscribe :list-unsubscribe; bh=mgmFdJOlPogJh/63PsNIHiXO1jAuGvqGaztwjZ9rPzs=; b=hsnTUcoDI4Tm/IxeBXxgZn4a0q/E+4U7CjL76UuGp2P1eChAsRR2AfWq/mWYChJZCO enxPMsoAtm8FAKNsuL0MpOVjflZZJWv+7J3hqeaHSIiTG3QXsvqd+4JQxI37+i7Zsmmf rRt5c9fETp+uMeLxWD7CB98hK1uLWkuvrhIIA1sTVHt8SFYMXAEses+Swfh4cSQTKf25 z40bPWHMkA2GEobKuC4eMfUWJbFZU+q1F4ovwnlX+5IToAMv82F7CWISQoEvDxowQhnc sLw2Wpb8cn80ZJKuYSRNS8YImr9i9hgH9zknZWe5BLVyzdrP6FK0WVb/32MGNjFmtfEc Co9g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:from:date:to:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent :x-original-sender:x-original-authentication-results:reply-to :precedence:mailing-list:list-id:x-spam-checked-in-group:list-post :list-help:list-archive:list-subscribe:list-unsubscribe; bh=mgmFdJOlPogJh/63PsNIHiXO1jAuGvqGaztwjZ9rPzs=; b=HWVAV8+396kzFyI/Srm9ULA51Awj6DjWm9Njee0V42qCsTGgoX83KhpSI5dySxofOm Z/6WFiJV+h9oYehj8CABuxuaSDl/hT9p5TIdhUsKtYCppTCl48PSoXuOavXvEcalVLSh 8zVYiadDjFbWEep1K7TGtjg6FJpgfgNxzdn1XnqA5aUYp3CsytfUOsODcE21ewPEarxt +pFI0x1xKFV9WV8Ou0O/pt5Eo8pujRwEeqf87EPmKW1pB2BOQOHFsnTf2fHNYmq0wqbn LWS40CKBPa2unvRjKrwLkWHocg12tMmxNJNQM8ufzKxbEpUvAd30uxApRj9GNo6eS0Gr Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AKS2vOztawqSvsvMOTkyQbZQA7VTVbi1kh+86lih9vC7bHsnEnFZvRq2 BXXXsR65AN/p7w== X-Received: by 10.36.26.77 with SMTP id 74mr2412iti.6.1498495461487; Mon, 26 Jun 2017 09:44:21 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.107.6.151 with SMTP id f23ls3145530ioi.27.gmail; Mon, 26 Jun 2017 09:44:20 -0700 (PDT) X-Received: by 10.107.152.75 with SMTP id a72mr585175ioe.20.1498495460384; Mon, 26 Jun 2017 09:44:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1498495460; cv=none; d=google.com; s=arc-20160816; b=Nkb2T1P5TZRM4AXn2QynqHU85yz2/cmaVVdyMLBeAjvI6SklXZSVl/LhdZExsJ08PQ gepGZLpDUBE2oO471pAIaxtnRvLjcXpHdFpO/kZG5G7SyNxYWwv2I4Ly2xYMZu4R6JqG sYtMrR0IuX5aLuLT4fJGV1GffxCjB0IVrxMquJ8EiH2mDQbOL2o4IA/a5tktk5jC75GY 3pli3d3+nmqTmfXbWBBd+B3HKL345SD2gOmTs/ixO5irsJOkfFMESeuMzWanyfzHWkSW 4d62hH+JaCWLQyxTEsOb5YUrUgckV6nYMIf20VtMdOy2P0tjG+6Fctw/BWYuKHwLUAjg FE0Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:to:date:from:dkim-signature :arc-authentication-results; bh=SDCdCZF14fJ6MBPBbamqZFVP3br5n2cDW3RnqJ0lzCw=; b=JG5np95kcxKQ48uXOtihpE2hGETNgnaAEOxakFYG7BdgvWZvyN9D0IQSPob1LX+Gnb Rx/70v3LFrlYVyfcsuc/pQDIFcPTCEyZMb3rCrQwVnf0JnRlqY+NvgsnhAga2JBqiZma 6P21K8JNY0rXPtmtP87LoshbCFaRRBZquB+40DhJJ7aKiRJU44tLRs6ZGQ1AMz9QlIw6 EMfMPEa7DK1X3atuu7AFUdHimxfWy2sGC5tlJlp2xEFSdP2UnfMchdJ+6mlfNt2LbhV/ D0RSSF/ZOaHi+9urEVVFRKUPDbryWrBxTeMn7gpzpgh0ZSU7mCn2G3h46cEfl9NfN+tc AKyA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.b=qokb3jj7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::22d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Original-Received: from mail-pg0-x22d.google.com (mail-pg0-x22d.google.com. [2607:f8b0:400e:c05::22d]) by gmr-mx.google.com with ESMTPS id e70si127994pfb.7.2017.06.26.09.44.20 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 26 Jun 2017 09:44:20 -0700 (PDT) Received-SPF: pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::22d as permitted sender) client-ip=2607:f8b0:400e:c05::22d; Original-Received: by mail-pg0-x22d.google.com with SMTP id u62so2759006pgb.3 for ; Mon, 26 Jun 2017 09:44:20 -0700 (PDT) X-Received: by 10.84.224.77 with SMTP id a13mr1110460plt.64.1498495459925; Mon, 26 Jun 2017 09:44:19 -0700 (PDT) Original-Received: from johnmacfarlane.net (li55-134.members.linode.com. [74.82.3.134]) by smtp.gmail.com with ESMTPSA id 75sm1019731pfk.113.2017.06.26.09.44.19 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 26 Jun 2017 09:44:19 -0700 (PDT) Original-Received: by johnmacfarlane.net (Postfix, from userid 1000) id D5835A1C5; Mon, 26 Jun 2017 12:44:08 -0400 (EDT) Content-Disposition: inline In-Reply-To: X-PGP-Key: http://johnmacfarlane.net/jgm.asc X-Original-Sender: jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@berkeley-edu.20150623.gappssmtp.com header.b=qokb3jj7; spf=pass (google.com: domain of jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org designates 2607:f8b0:400e:c05::22d as permitted sender) smtp.mailfrom=jgm-TVLZxgkOlNX2fBVCVOL8/A@public.gmane.org Precedence: list Mailing-list: list pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org; contact pandoc-discuss+owners-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org List-ID: X-Google-Group-Id: 1007024079513 List-Post: , List-Help: , List-Archive: , List-Unsubscribe: , Xref: news.gmane.org gmane.text.pandoc:17871 Archived-At: You could try something basic like this (without a filter): for x in *.txt; do pandoc -s $x -o $x.html -Mtitle="$x"; done +++ Will [Jun 26 17 08:37 ]: > Any tips for creating a filter that will generate level-one headers > from filenames and place them before the associated content? > Thanks. > > -- > You received this message because you are subscribed to the Google > Groups "pandoc-discuss" group. > To unsubscribe from this group and stop receiving emails from it, send > an email to [1]pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To post to this group, send email to > [2]pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > [3]https://groups.google.com/d/msgid/pandoc-discuss/b03b1b8e-ccc4-43b8- > b2ba-cacfa7bf98c5%40googlegroups.com. > For more options, visit [4]https://groups.google.com/d/optout. > >References > > 1. mailto:pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 2. mailto:pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org > 3. https://groups.google.com/d/msgid/pandoc-discuss/b03b1b8e-ccc4-43b8-b2ba-cacfa7bf98c5-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org?utm_medium=email&utm_source=footer > 4. https://groups.google.com/d/optout