From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/25642 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Ferenci Tamas Newsgroups: gmane.text.pandoc Subject: Re: simple dictionary with pandoc Date: Mon, 13 Jul 2020 21:42:11 +0200 Message-ID: <1532431066.20200713214211@medstat.hu> References: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="33944"; mail-complaints-to="usenet@ciao.gmane.io" Cc: Albert Krewinkel To: BPJ , pandoc-discuss Original-X-From: pandoc-discuss+bncBCKJD6EHQQERBFHSWL4AKGQEGTEE3ZA-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Jul 13 21:42:16 2020 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-wr1-f58.google.com ([209.85.221.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1jv4L8-0008i3-MR for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 13 Jul 2020 21:42:14 +0200 Original-Received: by mail-wr1-f58.google.com with SMTP id f5sf18507688wrv.22 for ; Mon, 13 Jul 2020 12:42:14 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1594669334; cv=pass; d=google.com; s=arc-20160816; b=NewzIER4s5g1e1QLx2gS7Gd7HEjYcnuCwVWFhRnU76sW5ipbISnAQ4iAVdTO3ySyI3 QEed/TexQ/5xHGO6tiUlZE+k5VOpz3RmrPZo/v6RFRTiWY57UZDYm643p4mXPt3+UUUJ M0QNUKzvtB0TByo+o37K/R2sroiGRmznRTJlbHYyLFK7/qcdy9RwNvscMtdB+uU7cFHm 7qpeXZipFby5/WfrMCKeoHxcibvDd9cznW2swM28cUgIAUqPRUD3eyWqrSfBrHO5PvN/ 7GvpcYjpgnjSMm3Cmo5W9mJQ53i/4xbdR6yVGgzAJGrMGqZmIF5tYdpQ946s8Adt99JQ RX/A== 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:content-transfer-encoding :mime-version:references:in-reply-to:subject:cc:to:message-id:from :date:sender:dkim-signature; bh=7M/VvWBJoaSOFL5vsHX8P33vKrVP54ee3N+wNW1A7q4=; b=WnvqowzqoX62y3beumPWdk3zVCv9RhQ7+Dmvdp9r7e/PVAu2BNC9ALSRE8qXMdJbiE geJeMhoH85cQxfdDSH3xxTz8x9Aby1Jkhk8l+w6PGpKckq5zLKAD+LJQCroWIspEk5y8 VwmEuwFnaHZ6IZwlUFZcBCirYzYM4/XXiXdI8KfTTesO9HzjSXcdliZ3EkIqOF9ZnPxv objPpqO4WXczr6osR8IRVQJKfVEFJbncHrmnwkanZrsYinGsi2VzEk9nqTjpR88mAFKk xm6ze805zl9iEZCccBIpVifmyIDYg14z9dvA7cCQCPOMiUvX9WWCvMi/163FB4YY5XiF d6MQ== ARC-Authentication-Results: i=2; gmr-mx.google.com; dkim=pass header.i=@medstat.hu header.s=default header.b=h18hjzJx; spf=pass (google.com: domain of tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org designates 79.172.204.140 as permitted sender) smtp.mailfrom=tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=medstat.hu DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20161025; h=sender:date:from:message-id:to:cc:subject:in-reply-to:references :mime-version:content-transfer-encoding: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=7M/VvWBJoaSOFL5vsHX8P33vKrVP54ee3N+wNW1A7q4=; b=kElBBGQektevE0qj4X7VVxsWrwL3hjuEX+LugP40ZkLwnLZa6Xs69cjCDUjuBNv7xJ ilE1NffFM9gqiAVXpXXt8kMQ88KGnaVTMZztIHy7zOIXJZkiYPHmIocBw2XvXTR2c4kh o01hnvPtSppVxvF0BszKAESNIEI0huMY7u06EsPG8l2s+oIHVfy9SjEXqFR1aJ6eXn81 XtdcGCMWL/8e0dKCBRNW2I+QS7wQroS5Z27wgjxUUOU3vLUD36CpwMpoOlfCAIMWLnRX 6tJMpS2ImCOYhlsHOjSNP3vSb5NY0o/R6Am8qZVGXvgs+8EA19PDzeTvZ6cCY020W9ic fVtQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=sender:x-gm-message-state:date:from:message-id:to:cc:subject :in-reply-to:references:mime-version:content-transfer-encoding :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=7M/VvWBJoaSOFL5vsHX8P33vKrVP54ee3N+wNW1A7q4=; b=AaWluri+tUjMuCFy6bknTjoa4ULflyxnZiniwZ/qX7I+NcExI8DHRJroZbZbmJTM7G v9ehZzCt+WrPZyfJxutM4BsqSSRFRDug6XIWQ/ha7SsGUh6t59UGjH3clkJf3+j9EqRt tobv7HZVNOgtiNUN/J+ySTpx+W8LSP/ZxsBvlM6KnVmpnreCywR8MvnVoI8RFgRo/HDF OaSzSwqmTXqVRadCB2eGyukG0fNb/k1tMioYzdQ2e6JDTUMlF4pF05kWP9Kgxh0Cif9e hCMNN1t27FhRRqKW61CvTkNclYVf3a7bC7VXjFfDABeVlXQWkKPH4KblyEWkWDRMDkEV Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOAM5334O/TaspaHonSp18Kaf+z4BQq/rXQkYaCfcwHzF3trE2rmkuuz U3PiLY3q/5vEeDtlhIv+ZgE= X-Google-Smtp-Source: ABdhPJzvhFLdPj7ggiR1p7VnTpmZvPSji1SoLHVwzt46CDID2W7OOrCcUSnQW17XgUL0nZ0YP3wJPw== X-Received: by 2002:a5d:4603:: with SMTP id t3mr1206312wrq.38.1594669334433; Mon, 13 Jul 2020 12:42:14 -0700 (PDT) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a1c:a94e:: with SMTP id s75ls226011wme.3.canary-gmail; Mon, 13 Jul 2020 12:42:12 -0700 (PDT) X-Received: by 2002:a1c:49d7:: with SMTP id w206mr964066wma.181.1594669332174; Mon, 13 Jul 2020 12:42:12 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594669332; cv=none; d=google.com; s=arc-20160816; b=jlvMx846o/3F7qA5XeNYlNz4atgh6KIZEe+yn4Ju9O8xh0b4Ng85wxDHeqq0y3HBa4 3irC2cy2eFyx5bEWrG8Vth+ldRnYj1waJoOe3MWfm2Vllm9s7cX49yjM0AyIEqDelp+b 2RiQN3PHNtyzlsPV0gELl7OyKHfq1MgxAVEhs6PAjzAhPTYyunp2Oj9yFoUfsnGpM4XQ xnKSmmkdgQPvXvWudKxPtuuGTGaA8zsxe7XNN10GBLCAgUJb2+NjnaIk5Gu9G6XnioCF vsb2Yl53177mb5MPNx65yAtEwY7Z3OHOZuRIiMUh1drsE7ZMTRvGfmWjjTKyabX21ZZa kdeg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=content-transfer-encoding:mime-version:references:in-reply-to :subject:cc:to:message-id:from:date:dkim-signature; bh=HibkfQoc+T4fo0NcN1hX5ypT5w5RhvthEXNjglTqgyE=; b=Hz/pE1aZEnOjuVm5KujQgbAVxZX/GluwCGlOfJg1PCgxMH/6yX8dELZWAuM9T6QEDn j/xEkNW22O9de+Nt09u+ry5xLcL/1fTev9ZnAkkSP83CJIj/mEnsLo/y6fejGze4Gso6 N4CN91htX0uvqqcP9jEKoRe0V4TA1Ny9DRHc1B2/bRhZhXLo6UsBWfOhuLLjkuftFBJp oulMhdtFPqEvk9h6cpwnDgjTGPqLG2sjYrvzMZbXrzOpdElXWanoRRJyq65Xf+1hkIY3 /pxInU2TtWFgHFGFKEI9yJsEaDb5nhvrBly513jpaNZ771IGHnzfaZqe9w435tpqySsH ouvA== ARC-Authentication-Results: i=1; gmr-mx.google.com; dkim=pass header.i=@medstat.hu header.s=default header.b=h18hjzJx; spf=pass (google.com: domain of tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org designates 79.172.204.140 as permitted sender) smtp.mailfrom=tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=medstat.hu Original-Received: from s4.tarhelyadmin.com (s4.tarhelyadmin.com. [79.172.204.140]) by gmr-mx.google.com with ESMTPS id q12si41134wmj.0.2020.07.13.12.42.11 for (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Mon, 13 Jul 2020 12:42:11 -0700 (PDT) Received-SPF: pass (google.com: domain of tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org designates 79.172.204.140 as permitted sender) client-ip=79.172.204.140; Original-Received: from 1f2ef211.nat.pool.telekom.hu ([31.46.242.17]:3715 helo=ferencitamas-pc.t.hu) by s4.tarhelyadmin.com with esmtpsa (TLS1.2) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.93) (envelope-from ) id 1jv4L4-001WTk-Pq; Mon, 13 Jul 2020 21:42:10 +0200 In-Reply-To: X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - s4.tarhelyadmin.com X-AntiAbuse: Original Domain - googlegroups.com X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - medstat.hu X-Get-Message-Sender-Via: s4.tarhelyadmin.com: authenticated_id: tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org X-Authenticated-Sender: s4.tarhelyadmin.com: tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org X-Original-Sender: tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org X-Original-Authentication-Results: gmr-mx.google.com; dkim=pass header.i=@medstat.hu header.s=default header.b=h18hjzJx; spf=pass (google.com: domain of tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org designates 79.172.204.140 as permitted sender) smtp.mailfrom=tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=medstat.hu 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.io gmane.text.pandoc:25642 Archived-At: Re: simple dictionary with pandoc Dear Benct Phil= ip and Albert,

Thank you very much for your rapid - and extremely detailed - answers! Thos= e were excellent starting points, I really appreciate your efforts!

Thank you again,
Tamas


2020. július 12., 18:14:05, írtad:


Hi Tam= 5;s,

attached is my Perl script for a similar task, adapted to your data sample.= It includes automatic sorting of entries with the Sort::ArbBiLex module
https://metacpan.org/pod/Sort::ArbBiL= ex

Note that the H= ungarian sort order in the script is not complete, because I'm not sure wha= t it should be like, so please complete it before you use the script. The (= very simple) format is described both at the link above and more briefly in= the script documentation (perl ./build-dictionary= .pl --= man)

The (short) help text is as follows:

#
build-dictionary.pl

The script assu= mes that there is a YAML file
'dictionary.yaml' in the current directory which contains
data in one of the forms described below in the current
directory.

The data will be sorted according to a customizable sort
order defined in the script (see SORTING below!) which must
be edited as desired.

Then the data is printed to a Pandoc Markdown pipe table in
'dictionary.md', one Hungarian—English word pair per row.

Try --man for full documentation!

## LICENSE

This software is Copyright (c) 2020  by Benct Philip Jonsson.

This is free software, licensed under:
                     = ;                  The MIT (X1= 1) License
                     = ;                <
http://www.opensource.org/licenses/mit-l= icense.php&= gt;


--
Better --help|less than helpless

Den lör 11 juli 2020 23:41Tamás Ferenci <
tamas.ferenci-nmadKexVIb0HWmgEVkV9KA@public.gmane.org> skrev:

Dear All,<= br>
I was thinking of implementing a very-very simple dictionary with pandoc. T= he idea is the following: I store the necessary information in a YAML-file,= such as this:

---
dictionary:
- hungarian: asztal
  english: table
  remark: Can be made of wood.
- hungarian: szék
  english: chair
  remark: We sit on it.
...

Then I use a pandoc conversion with a custom template to produce a markdown= file (arranging them in a table or list), to which I again apply pandoc to= convert to HTML. Both a Hungarian-English and an English-Hungarian diction= ary could be produced; a simple script could automate this whole process, u= sing the above YAML file as an input and producing the two HTML files as ou= tputs.

My first problem is however whether it is possible at all to sort the entri= es (alphabetically) with a template?

If not, are there any good solutions to this problem? Or pandoc is simply n= ot suited to solve a task like this...?

Thank you in advance,
Tamas
--
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 e= mail to
pandoc-discuss+uns= ubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pan= doc-discuss/f8c4c0d5-fb07-4f8a-9c87-8bb654cfd525o%40googlegroups.com.

--
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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-disc= uss/1532431066.20200713214211%40medstat.hu.