obsidian-tracker icon indicating copy to clipboard operation
obsidian-tracker copied to clipboard

Note date format 'DD-dddd' is not always parsable

Open voronond opened this issue 7 months ago • 0 comments

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:

image

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: image

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': image

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: image

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.

voronond avatar Jul 05 '24 08:07 voronond