obsidian-tracker
obsidian-tracker copied to clipboard
Note date format 'DD-dddd' is not always parsable
Expected Behavior
The tracker should generate a chart from the given notes in a folder 'Notes/2024/06' whose name is in the format 'DD-dddd'.
Current Behavior
If I specify the folder '06', which has 26 files, the tracker fails with the error:
with the configuration:
searchType: text
searchTarget: '\*\*Energie\*\*:\s+(?<value>[\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)'
dateFormat: DD-dddd
folder: 'Notes/2024/06'
line:
title: Energie
lineColor: yellow
If I point it to a folder '07', which has less files, everything works as expected:
with the configuration:
searchType: text
searchTarget: '\*\*Energie\*\*:\s+(?<value>[\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)'
dateFormat: DD-dddd
folder: 'Notes/2024/07'
line:
title: Energie
lineColor: yellow
When I did the test and changed the format of the notes title to 'DD', then it worked even for folder '06':
with the configuration:
searchType: text
searchTarget: '\*\*Energie\*\*:\s+(?<value>[\-]?[0-9]+[\.][0-9]+|[\-]?[0-9]+)'
dateFormat: DD
folder: test
line:
title: Energie
lineColor: yellow
So it seems there is a problem with the date format 'DD-dddd', but only when it should parse a lot of files.
Format of an individual note:
Possible Solution
I'm not fluent in JS so I can't help.
Steps to Reproduce (for bugs)
Extract the 'Notes_example', open it in the vault, and then try to create a line chart based on the configuration I gave you. Notes_example.zip
Context
I want to create a simple line chart out of the data in notes. I use the Daily Note plugin to generate them and it automatically creates a folder hierarchy (if does not exist) and creates a new note in place.