From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/16403 Path: news.gmane.org!.POSTED!not-for-mail From: Sergio Correia Newsgroups: gmane.text.pandoc Subject: Re: 'pandoc-abbreviations' python filter: request for advice/guidance Date: Tue, 13 Dec 2016 13:21:11 -0800 (PST) Message-ID: <5c74ed41-79f3-4566-9616-10b2e1224102@googlegroups.com> References: <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_1948_1123854931.1481664071881" X-Trace: blaine.gmane.org 1481664073 21063 195.159.176.226 (13 Dec 2016 21:21:13 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 13 Dec 2016 21:21:13 +0000 (UTC) To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCOYT6WP5QGRBSGMYHBAKGQEV73AGNQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Tue Dec 13 22:21:09 2016 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane.org Original-Received: from mail-qt0-f191.google.com ([209.85.216.191]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cGuVY-0004u3-Nm for gtp-pandoc-discuss@m.gmane.org; Tue, 13 Dec 2016 22:21:08 +0100 Original-Received: by mail-qt0-f191.google.com with SMTP id l20sf28780738qta.1 for ; Tue, 13 Dec 2016 13:21:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20120806; h=sender:date:from:to:message-id:in-reply-to:references: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=eL20kLfcLx0+KJQXiPnoJqT8VQnPfyTvzAazyzqT3nA=; b=YSZ1I2BPUWfzh0XuADlQRdDTUhf1wDvZ9lP6BWJO5yxExsdstSAkKXsGK3l9SZQPo7 glAoaMKOjSSElz878QSKVFLGWe2ave/dpkai8b6TUQdAdWwpt7aEQ4kf8dP55KvLnkSz /ZEBAFI1LhOOEKk05Z3z7AA995ht/Q7inPsyKy1hwAwv0eO/Ebm09As980Z/w7Q0FER2 nm7u/MXTQhb+ynhICciZxHsCsnN+4LxXXRgDXyyDRYnX6Fk0KLODdmMmrd+ZWgkgOrHb JqKNYC98JSOQARs0Fzrz8eo84If98YAdkGiblnjPM8mK5vYPEEEYBut4/lXdrVTveSEn hUYQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=date:from:to:message-id:in-reply-to:references: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=eL20kLfcLx0+KJQXiPnoJqT8VQnPfyTvzAazyzqT3nA=; b=qaoRJSq5GcCoz9egr0iUKLypnyBvaqlRlBxCPsE7/K4Uc8mIR3lJU24h7ItI0xm8pn zI6cLW2EgvTZCYgdYHNe0Hq0sxChlXBZdloHS8Eu9ZWvlx5MuLws+11Hs8hOR5Nr38cR 5WPJK72OQ4UDED8aTMP/XCOJsr1wYKvxEwDt3cU0nzVLrvH8sZOR3B+KMNX4+rlk5ggU uQgiMGALbBA51Vj+4Ac93Y/s6/qnUJPs7RkRZUfVkjv+TG87mX7vZTU5XgXQw9GI8hlu 2jNqRS9KDsNMSeYRgt8p24yP+nd8Zsn7Wq8Fi0Umd7MfBm0HdW0E0P1u1X6TbAzaxEHJ gk7Q== 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:in-reply-to :references: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=eL20kLfcLx0+KJQXiPnoJqT8VQnPfyTvzAazyzqT3nA=; b=CChM4xFSNCsGkusnnv/kbG3YUCu+Dck9zs6ug76kpGpB6mM89MECh6fF357oWCW7Sp Li2Z5Pha/ui6lQ4otZWkT7tFt2hdNrWWTuqEXSzVqwbprMiu+QremyyQ12bjtMPfmdAw kDofUoMpHQxuTubUaJ20A1ENBt6y58bprdl0mCFSF9HiuBXOQ3y7wN2Dif/MGymb1xWV s9JI2CbDxoggoTPnR+AEOZirnILSY2ilUreB/1KAN3T8d6BqxDEd8r1Gg947v/WNtjku eaniOftq3yDuE3EsSZvZgtzgFX5PRo/w+tZtldI8jqaBjjid0Ha5GkBOUDYL8kSzrkm8 snEw== Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AKaTC02KaAoaZgb18LZYDmRUjtFkrcN5odK7od1XgAw3xnEkpz9RedX/EOBA6KUs+6t85Q== X-Received: by 10.157.37.59 with SMTP id k56mr6492379otb.3.1481664072943; Tue, 13 Dec 2016 13:21:12 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 10.157.31.122 with SMTP id x55ls2161188otx.36.gmail; Tue, 13 Dec 2016 13:21:12 -0800 (PST) X-Received: by 10.157.11.248 with SMTP id 111mr6497149oth.4.1481664072445; Tue, 13 Dec 2016 13:21:12 -0800 (PST) In-Reply-To: <58db4764-ca7b-4f84-893a-6d6f3260fe47-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org> X-Original-Sender: sergio.correia-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:16403 Archived-At: ------=_Part_1948_1123854931.1481664071881 Content-Type: multipart/alternative; boundary="----=_Part_1949_2010920776.1481664071881" ------=_Part_1949_2010920776.1481664071881 Content-Type: text/plain; charset=UTF-8 The checks for spaces and all that part can be replaced with a call to the stringify() function, but besides that it looks good to me. On Tuesday, December 13, 2016 at 3:41:33 AM UTC-5, Scott Koga-Browes wrote: > > 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/5c74ed41-79f3-4566-9616-10b2e1224102%40googlegroups.com. For more options, visit https://groups.google.com/d/optout. ------=_Part_1949_2010920776.1481664071881 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
The checks for spaces and all that part can be replac= ed with a call to the stringify() function, but besides that it looks good = to me.

On Tuesday, December 13, 2016 at 3:41:33 AM UTC-5, Scott Koga= -Browes wrote:
I have created a python filter which replaces user-definable abbrevia= tions (stored in a dictionary file and/or in a pandoc markdown source docum= ent's metadata) with their expansions. This is my attempt to replicate = the kind of possibilities offered by LaTeX macros like=C2=A0\newcommand{\osh}{oshigami}, i.e. w= rite '\osh', get 'oshigami' when the document is processed.= In the past I've found this very useful for maintaining consistency th= roughout 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 u= nderstand from looking at other python filters out there - I managed to sla= p 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 consump= tion' and=C2=A0I am hoping there might be people out ther= e 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'.=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/5c74ed41-79f3-4566-9616-10b2e1224102%40googlegroups.co= m.
For more options, visit http= s://groups.google.com/d/optout.
------=_Part_1949_2010920776.1481664071881-- ------=_Part_1948_1123854931.1481664071881--