From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16396 Path: news.gmane.org!.POSTED!not-for-mail From: Scott Koga-Browes Newsgroups: gmane.text.pandoc Subject: 'pandoc-abbreviations' python filter: request for advice/guidance Date: Tue, 13 Dec 2016 00:41:33 -0800 (PST) Message-ID: <58db4764-ca7b-4f84-893a-6d6f3260fe47@googlegroups.com> Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_4594_36454760.1481618493628" X-Trace: blaine.gmane.org 1481618498 10050 195.159.176.226 (13 Dec 2016 08:41:38 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 08:41:38 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBDNPRGUAYELBBPXIX3BAKGQEFBM5YCQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 13 09:41:34 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-ua0-f189.google.com ([209.85.217.189]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGieQ-0001Lt-Hk for gtp-pandoc-discuss@m.gmane.org; Tue, 13 Dec 2016 09:41:30 +0100 Original-Received: by mail-ua0-f189.google.com with SMTP id 51sf984476uai.0 for ; Tue, 13 Dec 2016 00:41:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:date:from:to:message-id:subject:mime-version :x-original-sender:reply-to:precedence:mailing-list:list-id :x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=zybb9M4Dtaaet0xG5tA60PpJzg8j+kZSMQ+8OyNMCoo=; b=IVclHgeD2LsXupJnnZcVWRv4QF6LEVauLmx+VLqkdtNMHgV02Y2hgMqj5r9xtznosE 5UEFSg3pXnGBFpdXDJAeluJ/+93RpnJWYNyfjNMAxZ2E5aBY4vPGy/0n4zhCvmZlXM/s 2Vlftfh/GOMztypWcQaxlNkR3OHKUI10OZ9KRDm4z6DbL6Ufd61YJClRn/BV905MHckZ b0FpdIL6VRrjrGKh67vvUa2M858uhcfXXZ6KWUIm0sE7wBZEz230hK4k8yMjjM8ss9y6 KH2Kk8UZMIsKH8hBU66a9lKq9o8Lv/d+awlbK1+VsVyTm9bG7n9ipu2cewlCvu+jxTZj XnrQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:subject:mime-version:x-original-sender :reply-to:precedence:mailing-list:list-id:x-spam-checked-in-group :list-post:list-help:list-archive:list-subscribe:list-unsubscribe; bh=zybb9M4Dtaaet0xG5tA60PpJzg8j+kZSMQ+8OyNMCoo=; b=Ryao07nG/Y6stahAboi3t0L4cgSzXD7ov4La0epnQpRPZ+uEbozZj00phiMmykhwWJ CM/Gm+/NGyN4Qr2LoqkErFSBknuDVr8tffmb/Q9e7ZHUWTB/LWNI4fezB28FGbbQ/IBJ 9HWZHIdwW1YNwtqoh9XSclfOfb00ZBkVs4pdHXGc+ILyn2PZmD7kwQaMpKAH3p1pH3Wb 3iSvuBHCquJUHsVYsVZNPoxhlf70PdW1wRG7G5tY7d8HhyZMZt6kyvQZtSwPR1Fcch01 73bkPCRVKHQe6AMPrQSa1hysVdGEFKxs1jldrel9FQfFrtOYKxqZVslDRUKXhRzmZC8j gtKQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=sender:x-gm-message-state:date:from:to:message-id:subject :mime-version:x-original-sender:reply-to:precedence:mailing-list :list-id:x-spam-checked-in-group:list-post:list-help:list-archive :list-subscribe:list-unsubscribe; bh=zybb9M4Dtaaet0xG5tA60PpJzg8j+kZSMQ+8OyNMCoo=; b=UOqIkcuKSetTnXDpKq3qTyvalVdpNRgI1ARgJzMZ3xpnP356oGHf06JQJ1SkSruc7y rKzLRDY6E6eVO7bYwtQ0c+GiWCELK0YULu4+ZPaZJu7ts8ZzUHdf1tzn2lleJI08gqgs U7XtC3Hqg6KpqUkpWwJ5w8PNy9NxgByO3v1Qhl90WXMCmx2jNT5y6fkUYQ9qlnCmqqiH sstdVPUW80Yp5hu09ta9+SpZRwaAV1XPCU1ww15GUffOUGKTOMavlO9pypHKF611DwqQ AlNW4Swk+qZyklGcPCJPGDlUyFm9W2PfrVhkyd1dHmkFV8T+SYXV9ctNiTHDNJ5Gw2ra VK0g== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AKaTC03AMUpbRRg5GUWaHu61Nwzd1tdNlZo7EAJNvyG14BBy6aDDVmFb9mGlpVYNUc2qlQ== X-Received: by 10.157.15.143 with SMTP id d15mr6186156otd.2.1481618494760; Tue, 13 Dec 2016 00:41:34 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.14.179 with SMTP id 48ls388212otj.31.gmail; Tue, 13 Dec 2016 00:41:34 -0800 (PST) X-Received: by 10.157.37.247 with SMTP id q110mr6186380ota.5.1481618494256; Tue, 13 Dec 2016 00:41:34 -0800 (PST) X-Original-Sender: kogabrowes-Re5JQEeQqe8AvxtiuMwx3w@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:16396 Archived-At: ------=_Part_4594_36454760.1481618493628 Content-Type: multipart/alternative; boundary="----=_Part_4595_1928935317.1481618493629" ------=_Part_4595_1928935317.1481618493629 Content-Type: text/plain; charset=UTF-8 I have created a python filter which replaces user-definable abbreviations (stored in a dictionary file and/or in a pandoc markdown source document's metadata) with their expansions. This is my attempt to replicate the kind of possibilities offered by LaTeX macros like \newcommand{\osh}{oshigami}, i.e. write '\osh', get 'oshigami' when the document is processed. In the past I've found this very useful for maintaining consistency throughout a document, and I missed this when I moved to writing in markdown. I'm not really a programmer but - based on what I could understand from looking at other python filters out there - I managed to slap together something which seems to do what I want it to. However, I'm not really competent to judge whether it's fit for 'general consumption' and I am hoping there might be people out there willing to spend a few minutes to take a look at it and advise me on what needs to be done to make it 'roadworthy'. This is the repository: https://github.com/scokobro/pandoc-abbreviations Thanks in advance! -- 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 pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org To view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/58db4764-ca7b-4f84-893a-6d6f3260fe47%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_4595_1928935317.1481618493629 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
I have created a python filter which replaces user-de= finable abbreviations (stored in a dictionary file and/or in a pandoc markd= own source document's metadata) with their expansions. This is my attem= pt to replicate the kind of possibilities offered by LaTeX macros like=C2= =A0{\osh}{oshigami}, i.e. write '\osh= ', get 'oshigami' when the document is processed. In the past I= 've found this very useful for maintaining consistency throughout a doc= ument, and I missed this when I moved to writing in markdown.=

I'm not really a programmer but - based on what I c= ould understand from looking at other python filters out there - I managed = to slap together something which seems to do what I want it to. However, I&= #39;m not really competent to judge whether it's fit for 'general c= onsumption' and=C2=A0I am hoping there might be people ou= t there willing to spend a few minutes to take a look at it and advise me o= n what needs to be done to make it 'roadworthy'.=C2=A0

Thanks in advance!

--
You received this message because you are subscribed to the Google Groups &= quot;pandoc-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an e= mail to pand= oc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To post to this group, send email to pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit https://groups.google.com/d/= msgid/pandoc-discuss/58db4764-ca7b-4f84-893a-6d6f3260fe47%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_4595_1928935317.1481618493629-- ------=_Part_4594_36454760.1481618493628--