Skip to content

Commit

Permalink
doc: Update the medley example
Browse files Browse the repository at this point in the history
[skip ci]
  • Loading branch information
kaushalmodi committed Apr 30, 2022
1 parent 3aa4dc1 commit 26f1fc2
Showing 1 changed file with 60 additions and 69 deletions.
129 changes: 60 additions & 69 deletions README.org
Original file line number Diff line number Diff line change
Expand Up @@ -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 <foo@example.com>"
((name . "Baz Qux")
(email . "bazqux@example.com")
(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
Expand All @@ -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 <foo@example.com>",
{ name = "Baz Qux", email = "bazqux@example.com", 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"
Expand Down Expand Up @@ -894,14 +893,6 @@ contributors = [
true,
false
],
"contributors": [
"Foo Bar <foo@example.com>",
{
"name": "Baz Qux",
"email": "bazqux@example.com",
"url": "https://example.com/bazqux"
}
],
"dog": {
"legs": 4,
"eyes": 2,
Expand Down

0 comments on commit 26f1fc2

Please sign in to comment.