I am considering using YAML for storing chronological data in the following way:
- entrydate: 5:55 AM 1/1/2013
title: blog post 1
tags: [yaml, json]
description: what have i learned today 1
location: scottsdale
- entrydate: 5:55 AM 1/2/2013
title: blog post 2
tags: [general,software-development]
description: what have i learned today 2
location: scottsdale
This YAML document will get updated daily by a C# application which collects the data and at the end of week/month a Python program calculates some metrics about the blogging progress .
This answer to the question Is this valid YAML? suggests that YAML supports the notion of partial documents and if formatted as above each blog entry would considered a separate entity. Now I am concerned about two things.
- Would YAML parsers be able to identify each entity (or blog entry , in this case) by the
entrydate
as it is in the top of each element? I ask this because in both yamllint and online yaml parser, the parsed output was reordered and theentrydate
was lumped in together with other items. - Is YAML a complete overkill for this task? I feel it is apt, because the data stored would be in human readable format and if need be I could edit the document by hand easily.
PS: I considered JSON for this, but I felt YAML is too easy on the eyes.