Closed konobi closed 12 years ago
So..... you want me to write a machine program to parse the existing metadata into something machine-parseable....? ;)
The current metadata format is machine parseable as is (otherwise it wouldn't be of very much use to me...). I have no use for JSON at this time.
No, just a way to use the script to get just the metadata out of the markdown file rather than process the entire thing just to pull one small block out.
The metadata, if present, is everything up until the first "\n\n". Whatever tool you are using to do something with the metadata should be able to manage that for you.
If you're looking to write your own tool to manage metadata separately, there are a few edge cases (e.g. URLs) that are managed separately to minimize inappropriately treating something as metadata that probably wasn't intended to be. If you look at markdown_parser.leg
you see the actual definition of metadata if you want to process it on your own and match the default behavior exactly.
Currently there doesn't seem to be a way to extract all metadata from a document in something machine parseable like JSON.
Having this functionality would be very useful for automated tooling.