Sidecar files
Sidecar files, also known as buddy files or connected files, are supplementary files that provide extra information about the main file.
In Libiry, we can have two sidecar files per book file: a cover image file and a markdown file with book data in it.
In Libiry, the relationship between the source file and the sidecar file is based on the file name; sidecar files have the same base name as the source file, but with a different extension.
Link to original
OPF files
What they are
OPF (Open Packaging Format) files are XML files that store metadata alongside an e-book. So, an OPF file is a [sidecar file](Sidecar files).
How Libiry uses OPF files
Libiry sees OPF as old data, inherited from Calibre.
Link to original
- When reading metadata for an e-book, Libiry checks if an OPF file exists
- If the metadata cannot be read from the e-book itself, they are read from the OPF file instead
- When writing metadata, Libiry stores it either in the e-book itself or in a [markdown](markdown files) [sidecar](Sidecar files), depending on your user settings. If an OPF file still exists at that point, it is cleaned up
Markdown files
Markdown files are plain text files with a bit of formatting in them.
For example:
**bold**→ bold*italic*→ italic# Heading→ a heading- item→ a bullet point[link](https://example.com)→ a clickable linkThey can be read by both humans and machines.
Markdown files are commonly used for documents, README files, tools like Obsidian and Logseq and websites. Wikipedia, for example, consists entirely of markdown pages. A markdown file can start with so-called YAML frontmatter, but it doesn’t have to.
Link to original
YAML
YAML frontmatter is used in 8 Glossary/Markdown files to define variables and their values. It is an important element of Obsidian too. It is defined at the top of a note and is contained within
---and---.It looks like this:
Link to original--- cover: booktitle: The Handmaid's Tale author: Margaret Atwood author_sort: Atwood, Margaret isbn: 9781551994963 rating: publisher: McClelland & Stewart publication_date: 1999-05-08 language: en pages: series: series_index: translator: illustrator: tags: - read description: notes: ---