public inbox archive for pandoc-discuss@googlegroups.com
 help / color / mirror / Atom feed
From: Brendan Pearl <talikarng-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: pandoc-discuss <pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
Subject: Iterate over YAML tree and extract elements when converting to another format (e.g. DOCX or PDF)
Date: Thu, 15 Feb 2018 02:33:58 -0800 (PST)	[thread overview]
Message-ID: <a3611b42-8260-42ab-95e7-b6baba1c747b@googlegroups.com> (raw)


[-- Attachment #1.1: Type: text/plain, Size: 1882 bytes --]

Is it possible to iterate over a YAML file containing the elements I want 
converted into another format?

Here is a snippet of my current YAML structure (it is in YAML so that I can 
use it in other ways later - such as with R)

---
Items:
  "@Kamieniecki_Prevalencepsychologicaldistress_2001":
    Focus:  "Prevalence of psychological distress or disorders in young 
people who are homeless in Australia"
    Number of studies:  14
    Reported findings:  "Young people who are homeless have high rates of 
psychological disorders and score higher on tests of psychological distress"
    Reference: "@Kamieniecki_Prevalencepsychologicaldistress_2001"
    Tags:
      - negative_outcomes
      - mental_health

  "@EmbletonMwangiEtAl_epidemiologysubstanceuse_2013":
    Focus: "Prevalence of lifetime substance use in children living on the 
street in 'resource constrained settings'"
    Number of studies: 50
    Reported findings: "Pooled prevalence estimate of 60% [95% CI: 51-69%]"
    Reference: "@EmbletonMwangiEtAl_epidemiologysubstanceuse_2013"
    Tags:
      - negative_outcomes
      - substance_use
...

Is it possible to get pandoc (or a pandoc filter) to iterate over each of 
the items and extract specific elements (perhaps even conditionally - e.g. 
only those with certain tags)?

Brendan.

-- 
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/a3611b42-8260-42ab-95e7-b6baba1c747b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

[-- Attachment #1.2: Type: text/html, Size: 2515 bytes --]

             reply	other threads:[~2018-02-15 10:33 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-15 10:33 Brendan Pearl [this message]
     [not found] ` <a3611b42-8260-42ab-95e7-b6baba1c747b-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org>
2018-02-15 18:01   ` John MacFarlane

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=a3611b42-8260-42ab-95e7-b6baba1c747b@googlegroups.com \
    --to=talikarng-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).