Code Monkey home page Code Monkey logo

Comments (11)

JJTofflemire avatar JJTofflemire commented on July 18, 2024 1

Yes, that was the problem! I switched to a fine-grained access token, and now the plugin works as intended (both writing to a gist and to a .ical file locally). My classic token was only 40 characters long, which was causing all the problems. I'm not sure if I was failing to copy the whole token or if they are not always 255 characters long

from obsidian-to-ical-plugin.

bepolymathe avatar bepolymathe commented on July 18, 2024 1

I confirm it works for me too.

from obsidian-to-ical-plugin.

bepolymathe avatar bepolymathe commented on July 18, 2024

One interesting note is that every time I paste in my github personal access key, the field gets cleared. I'm not sure if this is intentional or part of the problem.

For info. I just made a test yesterday... same behavior.

from obsidian-to-ical-plugin.

JJTofflemire avatar JJTofflemire commented on July 18, 2024

I figured that my problem was that I was manually making tasks instead of using the official Obsidian Tasks plugin with due dates and scheduled dates etc, but still no dice.

from obsidian-to-ical-plugin.

bepolymathe avatar bepolymathe commented on July 18, 2024

I figured that my problem was that I was manually making tasks instead of using the official Obsidian Tasks plugin with due dates and scheduled dates etc, but still no dice.

Did you include emoji before date ? 

from obsidian-to-ical-plugin.

JJTofflemire avatar JJTofflemire commented on July 18, 2024

Yes, I have migrated over to using the standard Tasks format with emojis and dates now. (Don't know how it took me this long to find out about Tasks)

from obsidian-to-ical-plugin.

andrewbrereton avatar andrewbrereton commented on July 18, 2024

Hi @JJTofflemire, thanks for raising this issue.

- [ ] #task 2023-12-04 work on stuff
- [ ] 2023-12-05 tasks

This should absolutely be identified as a Task. The regular expression to find a date in a line is:

/(?<emoji>➕|⏳|🛫|📅|✅)?\s?(?<year>\d{4})-(?<month>\d{2})-(?<day>\d{1,2})\b/gi

The <emoji> group is optional. A long as there is a "0000-00-00" or "0000-00-0" where 0 is any number, then it should be considered a date and therefore a valid task with a date.

In my test case I have:

image

And in the console I can see it was identified correctly:

image

So then I added your test case:

image

And it worked 😳:

image

I'm at a loss trying to understand how this could happen. I've added some additional logging and a new setting called "Debug mode" to print more logs to console. Perhaps that will assist me in working out what is going on here.

from obsidian-to-ical-plugin.

JJTofflemire avatar JJTofflemire commented on July 18, 2024

That's really weird. I configured the plugin on my desktop running Arch Linux, and still no dice. Here's the output from Debug Mode.

image

Which failed to find these tasks:

- [ ] Module 1 and 2 review 📅 2023-12-08 ⏳ 2023-12-07 
- [ ] Section 17.2 # 1, 5, 15 p 979 🔼 ⏳ 2023-12-05
- [ ] Webwork Set 23 (4 problems) ⏫ ⏳ 2023-12-05 📅 2023-12-06
- [ ] Homework 11 📅 2023-12-11 ⏬ 

The link from the iCal settings successfully pulls up my gist, though there is still an error in the console. Also, when I tried to enter my Github token, every time I tried to type in the box it would immediately deselect (and pasting in the token would give me no feedback). Though, regardless, the primary issue appears to be identifying the tasks.

from obsidian-to-ical-plugin.

andrewbrereton avatar andrewbrereton commented on July 18, 2024

I'm wondering about the GitHub token. Can you confirm the details of the token?

I currently enforce the token to be either a classic token or a fine-grained token like this:

^ghp_[a-zA-Z0-9]{255}$

or

^github_pat_[a-zA-Z0-9]{22}_[a-zA-Z0-9]{59}$

Can you check if your token looks like this or if it looks different? If it's different, then the code will throw an error. That would explain the token being cleared, and maybe even the plugin not working correctly from there on.

from obsidian-to-ical-plugin.

andrewbrereton avatar andrewbrereton commented on July 18, 2024

That's great to hear. I will update the code to be a bit better about what should happen when there is a problem parsing the token. eg: Tell the user instead of simply clearing the textbox.

from obsidian-to-ical-plugin.

andrewbrereton avatar andrewbrereton commented on July 18, 2024

This has been fixed in 1.9.1

from obsidian-to-ical-plugin.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.