Hi Tamá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::ArbBiLex Note that the Hungarian sort order in the script is not complete, because I'm not sure what 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 assumes 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 (X11) License < http://www.opensource.org/licenses/mit-license.php> -- Better --help|less than helpless Den lör 11 juli 2020 23:41Tamás Ferenci skrev: > Dear All, > > I was thinking of implementing a very-very simple dictionary with pandoc. > The 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 dictionary could be produced; a simple script could > automate this whole process, using the above YAML file as an input and > producing the two HTML files as outputs. > > My first problem is however whether it is possible at all to sort the > entries (alphabetically) with a template? > > If not, are there any good solutions to this problem? Or pandoc is simply > not 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 > email to pandoc-discuss+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org > To view this discussion on the web visit > https://groups.google.com/d/msgid/pandoc-discuss/f8c4c0d5-fb07-4f8a-9c87-8bb654cfd525o%40googlegroups.com > > . > -- 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 view this discussion on the web visit https://groups.google.com/d/msgid/pandoc-discuss/CADAJKhBj-BMcD7S94q1gu3cpxQDv9Dz18cUxrmi0rq2Ft0nQ9A%40mail.gmail.com.