Update README.md
Browse files
README.md
CHANGED
|
@@ -1,3 +1,73 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
---
|
| 2 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 3 |
---
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
# Writing.com Archive - TSV Data Format
|
| 2 |
+
|
| 3 |
+
This document provides a reference for the column structure and data formats used in the shared Writing.com Interactive Stories
|
| 4 |
+
|
| 5 |
+
## File Specification
|
| 6 |
+
- **Format:** Tab-Separated Values (TSV)
|
| 7 |
+
- **Encoding:** UTF-8 (with BOM)
|
| 8 |
+
- **Headers:** Included as the first line
|
| 9 |
+
|
| 10 |
---
|
| 11 |
+
|
| 12 |
+
## Column Definitions
|
| 13 |
+
|
| 14 |
+
| Index | Column Name | Description |
|
| 15 |
+
| :--- | :--- | :--- |
|
| 16 |
+
| 1 | `STORY_TITLE` | The overall title of the story/book. |
|
| 17 |
+
| 2 | `CHAPTER_TITLE` | The specific title of the chapter or node. |
|
| 18 |
+
| 3 | `AUTHOR_DISPLAY` | The display name of the author of this entry. |
|
| 19 |
+
| 4 | `AUTHOR_HANDLE` | The raw username/handle of the author. |
|
| 20 |
+
| 5 | `CONTENT` | The body text of the chapter. (See [Content Formatting](#content-formatting)). |
|
| 21 |
+
| 6 | `CHOICES` | Delimited list of branching options. (See [Choices Formatting](#choices-formatting)). |
|
| 22 |
+
| 7 | `DATE_POSTED` | The date the entry was originally posted (usually `MM-DD-YYYY`). |
|
| 23 |
+
| 8 | `MAP_ID` | **Crucial unique identifier.** (See [Understanding MAP_ID](#understanding-map_id)). |
|
| 24 |
+
| 9 | `STORY_URL` | The original Writing.com URL for the story. |
|
| 25 |
+
| 10 | `COVER_IMAGE` | **(See Warning below)** URL to the story's cover image. |
|
| 26 |
+
| 11 | `SYNOPSIS` | **(See Warning below)** The summary/description of the story. |
|
| 27 |
+
| 12 | `RELATED_URL` | Secondary or related external links. |
|
| 28 |
+
|
| 29 |
+
> [!WARNING]
|
| 30 |
+
> **Metadata Consistency:** To maintain data integrity and reduce redundancy, the `SYNOPSIS` and `COVER_IMAGE` columns are generally only populated in rows where the `MAP_ID` indicates an **`-Intro`** chapter. Since these values are the same for every chapter in a story, you should look to the Intro row as the primary source for this information.
|
| 31 |
+
|
| 32 |
+
---
|
| 33 |
+
|
| 34 |
+
## Understanding `MAP_ID`
|
| 35 |
+
|
| 36 |
+
The `MAP_ID` is the most important field for organizing, linking, and deduplicating the data. It follows a specific hierarchical format:
|
| 37 |
+
|
| 38 |
+
**Format:** `[STORY_ID]-[CHAPTER_ID]-[UNIX_TIMESTAMP]`
|
| 39 |
+
|
| 40 |
+
* **`STORY_ID`**: A unique numeric ID for the entire story (e.g., `1234567`).
|
| 41 |
+
* **`CHAPTER_ID`**: The identifier for the specific chapter node.
|
| 42 |
+
* **The Intro**: The starting node of any story is marked with `-Intro` (e.g., `1234567-Intro`).
|
| 43 |
+
* *Note:* You may find multiple Intro entries with different timestamps. This is intentional and allows the archive to preserve different variations of a story's introduction as they evolved over time.
|
| 44 |
+
* **Branches**: Subsequent chapters have numeric or alphanumeric IDs (e.g., `1234567-1411`).
|
| 45 |
+
* **`UNIX_TIMESTAMP`**: A versioning suffix. Because the archive may contain multiple "snapshots" of the same chapter over time, this timestamp tells you which version is the most recent.
|
| 46 |
+
|
| 47 |
+
**Deduplication Strategy:** When processing this file, if you encounter multiple rows with the same `STORY_ID` and `CHAPTER_ID`, you must prioritize the one with the **highest timestamp**.
|
| 48 |
+
|
| 49 |
+
---
|
| 50 |
+
|
| 51 |
+
## Technical Details
|
| 52 |
+
|
| 53 |
+
### Content Formatting
|
| 54 |
+
The `CONTENT` column may contain:
|
| 55 |
+
- Raw plain text.
|
| 56 |
+
- HTML snippets (e.g., `<br>`, `<div>`).
|
| 57 |
+
- JSON-encoded HTML objects, e.g., `{"html": "Body text here..."}`. This format is used to preserve complex formatting or handle special characters.
|
| 58 |
+
|
| 59 |
+
### Choices Formatting
|
| 60 |
+
The `CHOICES` column contains the options available to a reader at the end of a chapter. Multiple choices are separated by a double-pipe delimiter: `||||`.
|
| 61 |
+
*Example:* `Go through the door||||Wait in the hall||||Run away`
|
| 62 |
+
|
| 63 |
---
|
| 64 |
+
|
| 65 |
+
## Processing Recommendations
|
| 66 |
+
1. **Deduplication First**: Filter the dataset by `STORY_ID-CHAPTER_ID` (the first two parts of the MAP_ID) and keep only the entry with the largest timestamp.
|
| 67 |
+
2. **Global Metadata**: Link story-level information (`SYNOPSIS`, `COVER_IMAGE`) from the `-Intro` chapter to all other chapters belonging to that same `STORY_ID`.
|
| 68 |
+
3. **JSON Handling**: Be prepared to parse JSON in the `CONTENT` column to extract the underlying HTML/text.
|
| 69 |
+
4.
|
| 70 |
+
|
| 71 |
+
---
|
| 72 |
+
|
| 73 |
+
license: mit
|