You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This directory contains the stories content for Fezcodex, structured to be easily consumed by the application.
3
+
This directory contains the **stories** content for Fezcodex, structured to be easily consumed by the application.
4
4
5
5
## Directory Structure
6
6
7
7
The content is organized as follows:
8
8
9
9
```
10
10
public/stories/
11
-
├── books.json
11
+
├── books.piml
12
12
└── [book-directory-name]/
13
13
├── episode1.txt
14
14
└── episode2.txt
15
15
└── ...
16
16
```
17
17
18
-
*`books.json`: This JSON file serves as the main index for all D&D books and their respective episodes.
18
+
*`books.piml`: This PIML file serves as the main index for all story books, authors, and their respective episodes.
19
19
*`[book-directory-name]/`: Each book's individual episode content files are stored in their own dedicated subdirectories. For example, `book-one/` would contain episodes for "Book One".
20
20
*`episodeX.txt`: These are plain text files containing the actual narrative content for each episode.
21
21
22
-
## Book Structure (books.json)
23
-
24
-
The `books.json` file is an array of book objects. Each book object defines a collection of episodes and their metadata.
25
-
26
-
```json
27
-
[
28
-
{
29
-
"bookId": 1,
30
-
"bookTitle": "Book One: The Shadowed Path",
31
-
"episodes": [
32
-
{
33
-
"id": 1,
34
-
"filename": "book-one/episode1.txt",
35
-
"title": "Episode 1: The Whispering Woods",
36
-
"author": "fezcode"
37
-
},
38
-
{
39
-
"id": 2,
40
-
"filename": "book-one/episode2.txt",
41
-
"title": "Episode 2: The Goblin Ambush",
42
-
"author": "fezcode"
43
-
}
44
-
],
45
-
"overlay": "red"
46
-
},
47
-
// ... more book objects
48
-
]
22
+
## Book and Author Structure (books.piml)
23
+
24
+
The `books.piml` file is a PIML document that, when parsed, results in an object containing `authors` and `books` arrays.
25
+
26
+
```piml
27
+
(authors)
28
+
> (author)
29
+
(name) fezcode
30
+
(website) https://fezcode.com
31
+
32
+
(books)
33
+
> (book)
34
+
(bookId) 1
35
+
(bookTitle) Book One: The Shadowed Path
36
+
(episodes)
37
+
> (item)
38
+
(id) 1
39
+
(filename) book-one/episode1.txt
40
+
(title) Episode 1: The Whispering Woods
41
+
(author) fezcode
42
+
> (item)
43
+
(id) 2
44
+
(filename) book-one/episode2.txt
45
+
(title) Episode 2: The Goblin Ambush
46
+
(author) fezcode
47
+
(overlay) red
48
+
49
+
> (book)
50
+
(bookId) 2
51
+
(bookTitle) Book Two: Separated Riches
52
+
(episodes)
53
+
> (item)
54
+
(id) 1
55
+
(filename) book-one/episode1.txt
56
+
(title) Episode 1: The Whispering Woods
57
+
(author) fezcode
58
+
> (item)
59
+
(id) 2
60
+
(filename) book-one/episode2.txt
61
+
(title) Episode 2: The Goblin Ambush
62
+
(author) fezcode
63
+
(overlay) blue
64
+
# ... more book objects
49
65
```
50
66
67
+
### Root Object Properties:
68
+
69
+
*`authors` (Array): An array of author objects.
70
+
*`books` (Array): An array of book objects.
71
+
72
+
### Author Object Properties:
73
+
74
+
*`name` (String): The name of the author.
75
+
*`website` (String, Optional): The website or URL associated with the author.
76
+
51
77
### Book Object Properties:
52
78
53
79
*`bookId` (Number): A unique identifier for the book.
@@ -62,4 +88,4 @@ The `books.json` file is an array of book objects. Each book object defines a co
62
88
*`title` (String): The title of the episode.
63
89
*`author` (String): The author of the episode.
64
90
65
-
This structure allows the application to dynamically load and display D&D campaign content, organizing it into books and episodes with associated metadata.
91
+
This structure allows the application to dynamically load and display story content, organizing it into books and episodes with associated metadata, and also provides a central place for author information.
0 commit comments