branch: externals/tomelr
commit 26f1fc2f3c0245e69c8c72b0cd01024f9d53078b
Author: Kaushal Modi <[email protected]>
Commit: Kaushal Modi <[email protected]>
doc: Update the medley example
[skip ci]
---
README.org | 129 ++++++++++++++++++++++++++++---------------------------------
1 file changed, 60 insertions(+), 69 deletions(-)
diff --git a/README.org b/README.org
index 21f1f0540d..e6a77a1f5a 100644
--- a/README.org
+++ b/README.org
@@ -708,51 +708,53 @@ CLOSED: [2022-04-30 Sat 01:32]
(integers . (123 -5 17 1234))
(floats . (12.3 -5.0 -1.7e-05))
(booleans . (t :false))
- (contributors . ("Foo Bar <[email protected]>"
- ((name . "Baz Qux")
- (email . "[email protected]")
- (url . "https://example.com/bazqux"))))
- (dog . ((legs . 4)
- (eyes . 2)
- (friends . ("poo" "boo"))))
+ (dog . (:legs 4
+ :eyes 2
+ :friends ("poo" "boo")))
(header . ((image . "projects/Readingabook.jpg")
(caption . "stay hungry stay foolish")))
- (collection . ((nothing . :false)
- (nonnil . t)
- (animals . ("dog" "cat" "penguin" "mountain gorilla"))
- (strings-symbols . ("abc" "def" "two words"))
- (integers . (123 -5 17 1234))
- (floats . (12.3 -5.0 -1.7e-05))
- (booleans . (t :false))))
+ (collection . (:nothing :false
+ :nonnil t
+ :animals ("dog" "cat" "penguin" "mountain gorilla")
+ :strings-symbols ("abc" "def" "two words")
+ :integers (123 -5 17 1234)
+ :floats (12.3 -5.0 -1.7e-05)
+ :booleans (t :false)))
(menu . ((foo . ((identifier . "keyword-collection")
(weight . 10)))))
- (resources . (((src . "*.png")
- (name . "my-cool-image-:counter")
- (title . "The Image #:counter")
- (params . ((foo . "bar")
- (floats . (12.3 -5.0 -1.7e-05))
- (strings-symbols . ("abc" "def" "two words"))
- (animals . ("dog" "cat" "penguin" "mountain
gorilla"))
- (integers . (123 -5 17 1234))
- (booleans . (t :false))
- (byline . "bep"))))
- ((src . "image-4.png")
- (title . "The Fourth Image"))
- ((src . "*.jpg")
- (title . "JPEG Image #:counter")))))
+ (resources . [(:src "*.png"
+ :name "my-cool-image-:counter"
+ :title "The Image #:counter"
+ :params (:foo "bar"
+ :floats (12.3 -5.0 -1.7e-05)
+ :strings-symbols ("abc" "def" "two words")
+ :animals ("dog" "cat" "penguin" "mountain gorilla")
+ :integers (123 -5 17 1234)
+ :booleans (t :false)
+ :byline "bep"))
+ (:src "image-4.png"
+ :title "The Fourth Image")
+ (:src "*.jpg"
+ :title "JPEG Image #:counter")]))
#+end_src
*** TOML
+#+begin_src emacs-lisp :noweb yes :exports results :wrap src toml
+(tomelr-encode
+ <<medley>>)
+#+end_src
+
+#+RESULTS:
#+begin_src toml
title = "Keyword Collection"
-author = ["firstname1 lastname1", "firstname2 lastname2", "firstname3
lastname3"]
-aliases = ["/posts/keyword-concatenation", "/posts/keyword-merging"]
-images = ["image 1", "image 2"]
-keywords = ["keyword1", "keyword2", "three word keywords3"]
-outputs = ["html", "json"]
-series = ["series 1", "series 2"]
-tags = ["mega front-matter", "keys", "collection", "concatenation", "merging"]
-categories = ["cat1", "cat2"]
-videos = ["video 1", "video 2"]
+author = [ "firstname1 lastname1", "firstname2 lastname2", "firstname3
lastname3" ]
+aliases = [ "/posts/keyword-concatenation", "/posts/keyword-merging" ]
+images = [ "image 1", "image 2" ]
+keywords = [ "keyword1", "keyword2", "three word keywords3" ]
+outputs = [ "html", "json" ]
+series = [ "series 1", "series 2" ]
+tags = [ "mega front-matter", "keys", "collection", "concatenation", "merging"
]
+categories = [ "cat1", "cat2" ]
+videos = [ "video 1", "video 2" ]
draft = false
categories_weight = 999
tags_weight = 88
@@ -762,44 +764,41 @@ mybaz = "zoo"
alpha = 1
beta = "two words"
gamma = 10
-animals = ["dog", "cat", "penguin", "mountain gorilla"]
-strings-symbols = ["abc", "def", "two words"]
-integers = [123, -5, 17, 1_234]
-floats = [12.3, -5.0, -1.7e-05]
-booleans = [true, false]
-contributors = [
- "Foo Bar <[email protected]>",
- { name = "Baz Qux", email = "[email protected]", url =
"https://example.com/bazqux" }
-]
+animals = [ "dog", "cat", "penguin", "mountain gorilla" ]
+strings-symbols = [ "abc", "def", "two words" ]
+integers = [ 123, -5, 17, 1234 ]
+floats = [ 12.3, -5.0, -1.7e-05 ]
+booleans = [ true, false ]
[dog]
legs = 4
eyes = 2
- friends = ["poo", "boo"]
+ friends = [ "poo", "boo" ]
[header]
image = "projects/Readingabook.jpg"
- caption = "stay hungry, stay foolish"
+ caption = "stay hungry stay foolish"
[collection]
nothing = false
nonnil = true
- animals = ["dog", "cat", "penguin", "mountain gorilla"]
- strings-symbols = ["abc", "def", "two words"]
- integers = [123, -5, 17, 1_234]
- floats = [12.3, -5.0, -1.7e-05]
- booleans = [true, false]
-[menu.foo]
- identifier = "keyword-collection"
- weight = 10
+ animals = [ "dog", "cat", "penguin", "mountain gorilla" ]
+ strings-symbols = [ "abc", "def", "two words" ]
+ integers = [ 123, -5, 17, 1234 ]
+ floats = [ 12.3, -5.0, -1.7e-05 ]
+ booleans = [ true, false ]
+[menu]
+ [menu.foo]
+ identifier = "keyword-collection"
+ weight = 10
[[resources]]
src = "*.png"
name = "my-cool-image-:counter"
title = "The Image #:counter"
[resources.params]
foo = "bar"
- floats = [12.3, -5.0, -1.7e-05]
- strings-symbols = ["abc", "def", "two words"]
- animals = ["dog", "cat", "penguin", "mountain gorilla"]
- integers = [123, -5, 17, 1_234]
- booleans = [true, false]
+ floats = [ 12.3, -5.0, -1.7e-05 ]
+ strings-symbols = [ "abc", "def", "two words" ]
+ animals = [ "dog", "cat", "penguin", "mountain gorilla" ]
+ integers = [ 123, -5, 17, 1234 ]
+ booleans = [ true, false ]
byline = "bep"
[[resources]]
src = "image-4.png"
@@ -894,14 +893,6 @@ contributors = [
true,
false
],
- "contributors": [
- "Foo Bar <[email protected]>",
- {
- "name": "Baz Qux",
- "email": "[email protected]",
- "url": "https://example.com/bazqux"
- }
- ],
"dog": {
"legs": 4,
"eyes": 2,