obsidian-widgets
obsidian-widgets copied to clipboard
New Widget: File navigator
I'm requesting help for a new widget in Obsidian Widgets: The file navigator
This widget is intended for daily note navigation. Here is an example of the widget:
This component currently does the following:
- Grabs the current open file that the widget was instantiated
- Parses the date using moment.js
- Subtracts and adds a day to get the filenames for previous and next notes
- Uses Obsidian URI to open the previous and next files on click
Currently I need to support:
- Multiple date formats, even in multiple languages (2023-01-09, 2023/01/09, 01/09/2023, January 9th 2023)
- Check if the file clicked exists, if not create it, if it does, open it
My proposal for the implementation of both items listed above would be:
- Accept a format paramenter following the Display API of moment.js in the widget settings, which would be used in moment.js formatting and in parsing the next and previous files
- Dig through Obsidian's internal API to check if a file exists, and create it/open it
This widget is current being developed in the branch for the issue #11