From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.text.pandoc/33499 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: ss2 Newsgroups: gmane.text.pandoc Subject: Reading yaml metadata Date: Sun, 10 Dec 2023 21:03:41 -0800 (PST) Message-ID: Reply-To: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="----=_Part_10809_295523553.1702271021377" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="36609"; mail-complaints-to="usenet@ciao.gmane.io" To: pandoc-discuss Original-X-From: pandoc-discuss+bncBCTYVA5G7YERBLVQ3KVQMGQEUC3U2KQ-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Mon Dec 11 06:03:46 2023 Return-path: Envelope-to: gtp-pandoc-discuss@m.gmane-mx.org Original-Received: from mail-oo1-f58.google.com ([209.85.161.58]) by ciao.gmane.io with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1rCYSI-0009H0-Ey for gtp-pandoc-discuss@m.gmane-mx.org; Mon, 11 Dec 2023 06:03:46 +0100 Original-Received: by mail-oo1-f58.google.com with SMTP id 006d021491bc7-59070f0f0b5sf4665215eaf.2 for ; Sun, 10 Dec 2023 21:03:46 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlegroups.com; s=20230601; t=1702271025; x=1702875825; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:sender:from:to:cc :subject:date:message-id:reply-to; bh=c4iJQHOpomZA51CGLHsvpsRC0pmezGw6g+NUmRvVYjw=; b=oVIKVHtPuPj5aCySJEM6ZIYpdKmg821K2mi59rCX+Z4T16GxFIpC1NXboDnC3S3Ys2 0iWxcL4LSRmA+Ojm1O24YGrqwrV1isDclJy+vuViUHWTVI0rOEqjHyQRmz1wkgZmwoAz kgk1bGJn/axcGaLas9f9MG/FOCm+jDMjpXwASiIV4ctGCECv+dVtqGTR1Upo5OX3/M1x +Of9rv7zyW7BD70K9AgjreSiJHqZ5JAt5eHXVe7Bz0zbJMFxXjtSwezbuhG4oHiKAspQ OMLMhm8TNmVTSJcTu5DattVUWHI3+grOZXDjhy42WVUTX2lLosS0Hqft9S0btPioTZCJ 0duQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1702271025; x=1702875825; darn=m.gmane-mx.org; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :list-id:mailing-list:precedence:reply-to:x-original-sender :mime-version:subject:message-id:to:from:date:from:to:cc:subject :date:message-id:reply-to; bh=c4iJQHOpomZA51CGLHsvpsRC0pmezGw6g+NUmRvVYjw=; b=AHYPsOJpODVD7wQKoQBDWsxUxdWq5jBkLIzc6Mi30+cB0n6iB2rzHHYlsDBNyH7n9F w1vQKKlECOhtUUvy17BmQ3MymcQZPeKY/znCOyBcaHeEgyZIbXTSYU58nKXvwiZnahTO TY/2ohx+6KmHlZHKiMdzT1e4RdQBq5gYAWrsMCuGqDkByDs50WUU2qb1uHNWJDpOoeqs NEvosq5cMAMVFEKMqm92tHVZ+lpJDZTrTpRq/SoAGtBGjQoFUqE55a3p0Th8A30BaMGl VFeurTwFCoBykDU7Td6wT4oa94LaH63JegqUxsIn58lOIxq4lREOvpS+FQC5dW1Pv3qc ZVdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1702271025; x=1702875825; h=list-unsubscribe:list-subscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence:reply-to :x-original-sender:mime-version:subject:message-id:to:from:date :x-beenthere:x-gm-message-state:sender:from:to:cc:subject:date :message-id:reply-to; bh=c4iJQHOpomZA51CGLHsvpsRC0pmezGw6g+NUmRvVYjw=; b=NC7UX6bxIZMt7F5/RsZIlHyl0u9cUIs3zbxoTfoAd7Q5t4COKvKTAGRbCSrPjMCXYe sA+mgAFd4/cK7BaeBqPYb1y2LCbeDLq6/XyLk0lH3WWF7WkxnP/UhbbEi1za8Cdqcp2M WuYWXD4jl42atoDIaIpAfMOZrXvpkJv1qleAEiotn3xuehaEx+OIIyKIu7MUCwB1mjVK lNOjn7OxuLFdV8c5odQX/FQ+K6jmk+NW0tApAuPI5dq7HVp5fUqr3RFfgsg5lBGgNtGC djJq4Ih310d1YgvtCzoDq2unY3gOXE5IGciYZW+THze+dP3Zj8nMPjH/08+YTLwueeMt Original-Sender: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org X-Gm-Message-State: AOJu0YwiIKunFX2U1F+/PIE2T0SxTQN5M4l4TtMxv8jdZeUJfsle1LR2 Ozcr15LdHMPyhs8HoeXCB2s= X-Google-Smtp-Source: AGHT+IEKpukW8xX0YWtcJXR31HJViMxjjtlU6HW1VkyNjeQ9W86hmRpEv69YZ9p22B04A/d7deZdoQ== X-Received: by 2002:a4a:92dd:0:b0:58e:1c47:6325 with SMTP id j29-20020a4a92dd000000b0058e1c476325mr1452628ooh.19.1702271025232; Sun, 10 Dec 2023 21:03:45 -0800 (PST) X-BeenThere: pandoc-discuss-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org Original-Received: by 2002:a05:6820:605:b0:58d:6d88:2214 with SMTP id e5-20020a056820060500b0058d6d882214ls225300oow.2.-pod-prod-05-us; Sun, 10 Dec 2023 21:03:42 -0800 (PST) X-Received: by 2002:a05:6830:906:b0:6d9:d98a:1720 with SMTP id v6-20020a056830090600b006d9d98a1720mr3636982ott.2.1702271021996; Sun, 10 Dec 2023 21:03:41 -0800 (PST) X-Original-Sender: Okubo.peyton-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.io gmane.text.pandoc:33499 Archived-At: ------=_Part_10809_295523553.1702271021377 Content-Type: multipart/alternative; boundary="----=_Part_10810_1578161240.1702271021377" ------=_Part_10810_1578161240.1702271021377 Content-Type: text/plain; charset="UTF-8" Hello Everyone, I'm simply trying to read a markup file (org in this case). I'm able to read its contents but not the metadata. I've tried reading the documentation and looking at a few examples and I'm not sure what I'm doing wrong. The code snippet and file I'm reading are attached below. Here is the output when calling the function: Right (Pandoc (Meta {unMeta = fromList []}) [Para [Str "\8212",SoftBreak,Str "title:",Space,Str "The",Space,Str "document",Space,Str "title",SoftBreak,Str "author:"],BulletList [[Plain [Str "name:",Space,Str "Author",Space,Str "One",SoftBreak,Str "affiliation:",Space,Str "University",Space,Str "of",Space,Str "Somewhere"]],[Plain [Str "name:",Space,Str "Author",Space,Str "Two",SoftBreak,Str "affiliation:",Space,Str "University",Space,Str "of",Space,Str "Nowhere"]]],Para [Str "\8230"],Header 1 ("",[],[]) [Str "Root"],Header 1 ("",[],[]) [Str "Nav"],BulletList [[Plain [Link ("",[],[]) [Str "posts"] ("posts/hello-world.org","")]],[Plain [Link ("",[],[]) [Str "stream"] ("stream.org","")]]],Para [Str "About",Space,Str "me."]]) As you can see the metadata is empty even though there is a yaml metadata block in the source file. My build depends on pandoc >= 3.1 && < 3.2 and pandoc-types >= 1.23. Any help would be greatly appreciated!! Best, P -- 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/dac9ab6e-b3ad-4645-912e-a7f72f5c7429n%40googlegroups.com. ------=_Part_10810_1578161240.1702271021377 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
Hello Everyone,

I'm simply trying to read a= markup file (org in this case). I'm able to read its contents but not the = metadata. I've tried reading the documentation and looking at a few example= s and I'm not sure what I'm doing wrong. The code snippet and file I'm read= ing are attached below. Here is the output when calling the function:
=

Right (Pandoc (Meta {unMeta =3D fromList []}) [Para [= Str "\8212",SoftBreak,Str "title:",Space,Str "The",Space,Str "document",Spa= ce,Str "title",SoftBreak,Str "author:"],BulletList [[Plain [Str "name:",Spa= ce,Str "Author",Space,Str "One",SoftBreak,Str "affiliation:",Space,Str "Uni= versity",Space,Str "of",Space,Str "Somewhere"]],[Plain [Str "name:",Space,S= tr "Author",Space,Str "Two",SoftBreak,Str "affiliation:",Space,Str "Univers= ity",Space,Str "of",Space,Str "Nowhere"]]],Para [Str "\8230"],Header 1 ("",= [],[]) [Str "Root"],Header 1 ("",[],[]) [Str "Nav"],BulletList [[Plain [Lin= k ("",[],[]) [Str "posts"] ("posts/hello-world.org","")]],[Plain [Link ("",= [],[]) [Str "stream"] ("stream.org","")]]],Para [Str "About",Space,Str "me.= "]])

As you can see the metadata is empty even t= hough there is a yaml metadata block in the source file.

My build depends on pandoc >=3D 3.1 =C2=A0&& < 3.2 a= nd pandoc-types >=3D 1.23.

Any help would be = greatly appreciated!!

Best,
P

--
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-discuss/dac9ab6e-b3ad-4645-912e-a7f72f5c7429n%40googlegroups.= com.
------=_Part_10810_1578161240.1702271021377-- ------=_Part_10809_295523553.1702271021377 Content-Type: application/octet-stream; name=root.org Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=root.org X-Attachment-Id: 3f14b463-25df-4218-a1ee-28149c785380 Content-ID: <3f14b463-25df-4218-a1ee-28149c785380> --- title: The document title author: - name: Author One affiliation: University of Somewhere - name: Author Two affiliation: University of Nowhere ... * Root * Nav - [[file:posts/hello-world.org][posts]] - [[file:stream.org][stream]] About me. ------=_Part_10809_295523553.1702271021377 Content-Type: text/x-haskell; charset=US-ASCII; name=Example.hs Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename=Example.hs X-Attachment-Id: 95d97588-39a2-4d8b-a71e-0471ceb8837a Content-ID: <95d97588-39a2-4d8b-a71e-0471ceb8837a> import qualified Data.Text as T import Text.Pandoc -- Read an org document with a yaml metadata block and print it printDocWithMetaData :: IO () printDocWithMetaData = do input <- readFile "root.org" let readerOpts = def { readerStandalone = True, readerExtensions = extensionsFromList [Ext_yaml_metadata_block] } doc <- runIO $ readOrg readerOpts (T.pack input) print doc ------=_Part_10809_295523553.1702271021377--