Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Open
voronond opened this issue Jul 5, 2024 · 0 comments
Open

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

voronond opened this issue Jul 5, 2024 · 0 comments

Comments

@voronond
Copy link

voronond commented Jul 5, 2024

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant