Help implementing calendar displaying script #17
-
|
Hello, I am trying to display my google calendar events dynamically using googleCalendar API. I have managed to fetch events from the platform, and they way i display them by writing to my dashboard.md. However, due to the calendar I implemented needing inline javscript, the buttons do not work. Another way I thought of is to implement a ready solution (see Event Calendar Widget, and just write on the data json each time the app runs. Thanks for your time! |
Beta Was this translation helpful? Give feedback.
Replies: 9 comments 1 reply
-
|
Show how exactly you are trying to make it working and what is not working. Attaching a sample vault and a video would help |
Beta Was this translation helpful? Give feedback.
-
|
You are not using it correctly. See docs for Startup script. So you have to name your function You should also consider if you need to call this function not only on startup, and call it explicitly somehow. You can call it programmatically or manually. |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
It will be easier if you prepare a test vault wherr you can reproduce the issue and attach it to the discussion |
Beta Was this translation helpful? Give feedback.
-
|
Here is a simplified version of my vault with the issue. Inside the .obsidian/js/CalendarIntergration/src, you will find the startup. For debugging purposes i have commented out the FetchFromApi call in the first line of the function. If you uncomment it you will see the failed to retrieve packages errors. Thanks again for your time!! |
Beta Was this translation helpful? Give feedback.
-
|
Ok, I found the problem. Looking at entire logs was important.
Line 162-164 try {
convert = require('encoding').convert;
} catch (e) {}but the plugin doesn't understand that |
Beta Was this translation helpful? Give feedback.
-
|
As a workaround you can use |
Beta Was this translation helpful? Give feedback.
-
|
Later on, you will get another error
But this is because you are incorrectly using in Line 9: const CREDENTIALS_PATH = path.join(process.cwd(), 'credentials.json');
|
Beta Was this translation helpful? Give feedback.
-
|
Thank you so much for your help!! Even though there are a lot more errors I am sure you have better things to do. I will try to untangle this mess from now on. I appreciate your time!! |
Beta Was this translation helpful? Give feedback.








As a workaround you can use