Create one file from all the Daily Notes in one year

First, search the help docs and this forum. Maybe your question has been answered! The debugging steps can help, too. Still stuck? Delete this line and proceed.

What I’m trying to do

Create one file from all the Daily Notes in one year so that I have one journal file for all of 2023. . My note file format for example is 2023-01-01 Sun.md for the first Daily Note of 2023 and the last is 2023-12-31 Sun.md. Daily Notes for each year are all saved in one Folder called Daily Notes. This would make it very easy to read through the year’s events without having to open each individual file to read through it.

Things I have tried

I looked to see if there is any plug in that might do this and didn’t see any. Also did a search in the forum for this and didn’t find anything. I am not a programmer so the ability to do this is above my pay grade. It is probably something very simple for a programmer. Thanks for any help you are able to give.

You should use bash and pandoc for combining md files. You can get bash for windows using wsl: https://www.howtogeek.com/devops/what-is-windows-subsystem-for-linux-wsl-and-how-do-you-use-it/

#!/bin/bash 
pandoc *.md > final.md

I guess pandoc ignores YAML fields by default and you can use --standalone to include YAML.

One solution, if you only want to be able to read them in a page, not necessarily edit them, might be to use the Run plugin, making a request like this so that all the notes for the year are displayed:

%% run start
```ts fold
const result = await dv.query(`
LIST WITHOUT ID "!" + file.link
FROM "Journal"
WHERE contains(file.name, "2023")
`)
return dv.markdownList(result.value.values.join("\n"))
``` 
%%

You could embed them all in a file, manually or with the help of the Waypoint plugin (and a search-replace to turn the links into embeds, and/or the Easy Bake plugin).

Or you could try one of these plugins:

  • Daily Notes Editor
  • Daily Notes Viewer
  • Longform

Some related forum threads that may contain more info:

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.