Search my Obsidian vault ( `/Users/eleanor/Documents/slipbox/` )for files containing various bad patterns.
Create script in the root folder to automatically convert them to my desired format for Obsidian properties links and YAML, as outlined below. Save it to the `'/Users/eleanor/Documents/slipbox/ancillary/programming'` folder as `YAML cleanup {TIMESTAMP}` (update the timestamp variable to the actual timestamp, including h:m:s not just the date)
Essentially, I want to use local filesystem MCP tools to look at the roughly 148 files in `/information/annotated` folder and change the into proper Obsidian properties style YAML metadata.
Please actually use the filesystem MCP to iterate through my files, see what they look like, match the patterns, and fix the files.
## NEW YAML
## Nonfiction Folder
[[01T Nonfiction Properties]]
```
---
alias:
post_id:
title:
subtitle:
source:
type:
purpose:
last_updated:
post_date:
live_url:
featured_img:
related:
---
```
Note: Not every file will have something for every YAML property. Leave blank any that are not obvious from context.
These should be the ONLY possible `type` options for these annotated files:
`family`: Documents covering topics related to parenting, healthy family dynamics, child health and nutrition, learning methods specific to children, behavioral development, educational technology and pedagogy, teaching strategies, and homeschooling.
`academic`: Documents covering historical events, figures, archaeology, anthropology and cultural heritage, providing insights into the past and its impact on the present and future. Especially such as scholarly articles, academic research, and scientific studies about animals, or those providing in-depth analysis and insights into specialized topics that might be useful for science fiction and fantasy worldbuilding purposes.
`professional`: Documents covering entrepreneurship, startup culture, innovation, and business strategies involving content creation, quality assurance, & software testing. Documents covering the latest trends and innovations in artificial intelligence and machine learning, e-reader hardware devices, and software development best practices.
`productivity`: Documents covering time management, getting things done, life-hacking, organization, note-taking, and efficiency strategies, offering tips and tools for improving personal and professional productivity.
`fiction`: ebooks that seem like science fiction, fantasy, historical fiction, children's books, classic fiction, or otherwise narrative instead of nonfiction. Anything authored by L. E. Modesitt or Brandon Sanderson especially.
`miscellany`: Anything else, particularly clickbaity journalism.
Here is a sample of what correct YAML would look like:
```
---
post_id: 12265140
title: "2,700-Year-Old Leather Armor Proves Technology Transfer Happened in Antiquity"
source: "[[ScienceDaily]]"
type: academic
last_updated: 2025-05-27
post_date: 2021-12-08
live_url: https://www.sciencedaily.com/releases/2021/12/211208090026.htm
related:
- "[[scale armor was a valuable heirloom]]"
- "[[scale armor was efficient and popular]]"
- "[[2022-03-07 Armor]]"
---
```
Note that all related and featured image `[[links]]` must be in quotation marks, for Obsidian property links to work _as_ links in the vault. If there are multiple links for the property, they must be formatted with `-` bullets. So please format them like so:
```
featured_img: "[[Substack/Attachments/pexels-lukas-952357.jpg]]"
related:
- "[[Verraine]]"
- "[[Padima]]"
```
---
## OLD METADATA
### Type 1
```
## Metadata
- Author: [[Elizabeth Nix]]
- Full Title: 5 Maritime Disasters You Might Not Know About
- Link: https://history.com/news/5-maritime-disasters-you-might-not-know-about
- Related: [[2021-10-25 Maritime Disasters]]
- [i] Outline
- [[many soldiers died in a steamboat boiler explosion]]
- [[selfish sailors abandoned passengers to die and were not punished]]
```
* The author is now a `source` in the new YAML.
* The link is now `live_url` in the new YAML
* Outline and Related should get merged into `related` in the new YAML
* Full Title should become `title` in the new YAML.
So I'd expect this entry to be changed to:
```
---
aliases:
post_id:
title: "5 Maritime Disasters You Might Not Know About"
subtitle:
source:
type: academic
purpose:
last_updated:
post_date:
live_url: https://history.com/news/5-maritime-disasters-you-might-not-know-about
featured_img:
related:
- "[[2021-10-25 Maritime Disasters]]"
- "[[many soldiers died in a steamboat boiler explosion]]"
- "[[selfish sailors abandoned passengers to die and were not punished]]"
---
```
### Type 2
```
---
alias: matthewmeltzerAnimalsThatTake2020
---
## Metadata
- title:: 8 animals that take hallucinogenic drugs and enjoy it
- author:: Matthew Meltzer
- URL: [https://matadornetwork.com/read/animals-hallucinogenic-drugs/](https://matadornetwork.com/read/animals-hallucinogenic-drugs/)
- [Local library](zotero://select/items/1_WN4ALIUK)
- [i] Used for [[2021-06-21 Fungus]] & [[2022-02-21 Toxins]]
- [l] broader:: [[animals]] > [[animals use mind-altering substances]]
```
* `Used for` and `broader` should get added to `related`
* `Author` should get added to the Sources
So I'd expect this to get changed to
```
---
aliases: matthewmeltzerAnimalsThatTake2020
post_id:
title: "8 animals that take hallucinogenic drugs and enjoy it"
subtitle:
source: "[[Matthew Meltzer]]"
type: academic
purpose:
last_updated:
post_date:
live_url: https://matadornetwork.com/read/animals-hallucinogenic-drugs/
featured_img:
related:
- "[[2021-06-21 Fungus]]"
- "[[2022-02-21 Toxins]]"
- "[[animals]]"
- "[[animals use mind-altering substances]]"
---
```
### Type 3
```
---
title: Banana
author: Dan Koeppel
category: Business & Economics
publisher: Penguin
publish_date: 2007
total_page: 281
cover_url: https://books.google.com/books/content?id=cSoVd-o8PmoC&printsec=frontcover&img=1&zoom=1&edge=curl&source=gbs_api
status:
start_read_date: 2022-04-13
finish_read_date:
my_rate:
book_note:
isbn10: 1594630380
isbn13: 9781594630385
---
- [i] Metadata
- title:: Banana: The Fate of the Fruit That Changed the World
```
Any page that has an isbn number should only make the following changes:
* `publish_date` becomes `post_date`
* `cover_url` becomes `featured_img`
* both `publisher` and `author` should get moved to `source`
- title:: Banana: The Fate of the Fruit That Changed the World
should become:
```
title: Banan
subtitle: The Fate of the Fruit That Changed the World
```
### Type 4
```
---
## Metadata
- Author:: [[Brian Fagan]]
- ReadwiseID:: 8135621
- reimported on 2022-02-08 from kindle
- Last Highlighted:: 2021-03-14
- Real Title:: Beyond the Blue Horizon
- Link::
* [Amazon link](https://www.amazon.com/dp/B007N6JDM0)
* [Kindle link](kindle://book?action=open&asin=B007N6JDM0)
- [i] Outline
- [[Predictable bi-directional winds facilitate trade]]
- [[The ancients traded via boat]]
- [[Sailing requires patience]]
- [[how sounding works]]
---
```
`- Last Highlighted:: 2021-03-14` should become `last_updated: 2021-03-14`
- `reimported on 2022-02-08 from kindle` & `- Author:: [[Brian Fagan]]`. should become
```
source:
- kindle
- "[[Brian Fagan]]"
```
### Type 5
If you see long notes like this, change them into a callout, like so:
```
- [!] These are probably bullshit legends because I can't find other sources and John Zimmer is basically a motivational speaker / executive corporate consultant. Still want to keep this as a reference because it's useful for the piece I'm doing as a follow-up to [[2021.10.20a Did conquerors ever burn their ships]]
```
```
- [!] Note: I hated this article so much that I wrote [[Chariot Racing Story]] basically as a seething retort.
```
becomes:
> [!alert]
> These are probably bullshit legends because I can't find other sources and John Zimmer is basically a motivational speaker / executive corporate consultant. Still want to keep this as a reference because it's useful for the piece I'm doing as a follow-up to [[2021.10.20a Did conquerors ever burn their ships]]
### Type 5
```
###### Links
- URL: [https://www.journals.uchicago.edu/doi/10.1086/669705](https://www.journals.uchicago.edu/doi/10.1086/669705)
- DOI: [10.1086/669705](https://doi.org/10.1086/669705)
- [Local library](zotero://select/items/1_UGJXR5FI)
- PDF Attachments
- [Yerkes and Barkai - 2013 - Tree-Felling, Woodworking, and Changing Perception.pdf](zotero://open-pdf/library/items/RZJLVZ9E)
```
Some PDFs will have multiple links. Because this is Obsidian YAML, we'll need to put them onto different lines. But I only care about DOI and URL, you can ignore attachments and zotero.
So the above would become:
```
live_url:
- "[10.1086/669705](https://doi.org/10.1086/669705)"
- https://www.journals.uchicago.edu/doi/10.1086/669705
```