vecnehladny / ubersicht-ios-clock-upnext-weather

A simple iOS styled widget section for Übersicht
10 stars 4 forks source link

City IDs from API database #1

Open ITRecords38 opened 4 years ago

ITRecords38 commented 4 years ago

Hi,

1/ I created my account and I entered my key without problem but I cannot find my ID concerning my city.

Grenoble, FR

2/ i installed ical buddy but i got this error

null is not an object (evaluating 'calendarName(0)')

Thanks for help

ITRecords38 commented 4 years ago
ITRecords 1
vecnehladny commented 4 years ago

1/ HERE you have list of city IDs

2/ In the callendar you need to have filled Name, Location and Time, otherwise it's not gonna work.

ITRecords38 commented 4 years ago

where exactly ?

1/ HERE you have list of city IDs

2/ In the callendar you need to have filled Name, Location and Time, otherwise it's not gonna work.

ITRecords 2
vecnehladny commented 4 years ago

No, in the native macOS Calendar application.

ITRecords38 commented 4 years ago

In which place ?

No, in the native macOS Calendar application.

for the city I have 3 Ids

city
vecnehladny commented 4 years ago

Screen Shot 2020-04-26 at 13 42 52 You need to have filled Name, Location and Time for every event in your calendar, or like i said, It's not gonna work

ITRecords38 commented 4 years ago

Screen Shot 2020-04-26 at 13 42 52 You need to have filled Name, Location and Time for every event in your calendar, or like i said, It's not gonna work

1/ Ok. I understand. I will test

2/ For the party ID in the files (see my screenshot)

Thanks

coolajami commented 4 years ago

I have the exact same problems:

  1. weather widget does not render correctly and looks like @GrimlocK38 image above. The reason is in line 30, the name of the widget mentioned with ".widget" extension; when you clone the folder does not have the extension, need to add the extension to the folder to work. Even then appears to me as below

    Screenshot 2020-04-26 at 12 52 06
  2. Still problem with calendar, even adding location etc, does not work.

ITRecords38 commented 4 years ago

Hi @coolajami

I see. indeed. it works for me now but same problem that you.

vecnehladny commented 4 years ago

I have the exact same problems.

  1. weather widget does not render correctly and looks like @GrimlocK38 image above. The reason is in line 30, the name of the widget mentioned with ".widget" extension; when you clone the folder does not has the extension, need to add the extension to the folder to work. Even then appears to me as below
Screenshot 2020-04-26 at 12 52 06
  1. Still problem with calendar, even adding location etc, does not work.

it looks like you deleted some of the ending

tag so its messed up.

I downloaded .zip from the ubersicht page and in the line 30 is everything okay, so i dont know what exactly you missing there.

coolajami commented 4 years ago

I download it a few times, and I have installed it both through cloning and from the zip file. Actually, after the line 106 in Weather widget, you need to add the parameter "height: 25px" to fix the widget image rendering.

I'm still struggling with the Ical widget, unfortunately.

ITRecords38 commented 4 years ago

I'm still struggling with the Ical widget, unfortunately.

Thanks for the fix Cool. for the ical me also.

vecnehladny commented 4 years ago

for the calendar it depends which version of macOS you runnig, because i heard that some of the newer version have problem with icalbuddy .

Try to run this command in the terminal. icalbuddy -n eventsToday+1 and it should display upcoming events in the format like this: Screen Shot 2020-04-26 at 14 13 07

For the white bar in the weather widget, you need to select another option, with always you wil get that white bar Screen Shot 2020-04-26 at 14 16 43

coolajami commented 4 years ago

for the calendar it depends which version of macOS you runnig, because i heard that some of the newer version have problem with icalbuddy .

Try to run this command in the terminal. icalbuddy -n eventsToday+1 and it should display upcoming events in the format like this: Screen Shot 2020-04-26 at 14 13 07

Ok, makes sense. I'm using the "unofficial" Icalbuddy 64 as the original icalbuddy version is not 64-bit and it is not supported in Catalina (MacOs 10.15).

ITRecords38 commented 4 years ago

Ok, makes sense. I'm using the "unofficial" Icalbuddy 64 as the original icalbuddy version is not 64-bit and it is not supported in Catalina (MacOs 10.15).

hummmm

ITRecords38 commented 4 years ago
ITRecords 1
coolajami commented 4 years ago

@GrimlocK38 The DavidKaluta version is "unofficial", a build for supporting 64-bit MacOs. I think the brew is installing the 32 Bit.

coolajami commented 4 years ago

OK, made it work. It does not seem to be affected by the icalBuddy version. in the line 17 you need to add the -ic command and the calendar or calendars you want to pull, I dont think it pulls the array directly from the line 3. like the following

command: "/usr/local/bin/icalbuddy -n -ic CalendarName eventsToday+1"

Also after line 71 need to add the height parameter to render the widget image correctly: "height: 20px" @GrimlocK38 @vecnehladny

EDIT:

  1. I notice that if you don't add a location in an event, the widget still pulls the event from the calendar, but it does not pull the corresponding time and appears as a whole day event thought
  2. The location details are merged together if the location includes two or more words (e.g Rio De Janeiro becomes RioDeJaneiro)

Congrats for the css appearance the calendar looks lovely, I was trying to do something similar but my css knowledge didn't help and I couldn't pull the date/time data from the icalbuddy correctly! 👍

ITRecords38 commented 4 years ago

@coolajami

Good news. I will test on my return.

A big thanks

ITRecords38 commented 4 years ago

@coolajami

after test and the modifications here is the message.

error: No calendars.

ITRecords 3

I did a test like this but still nothing

ITRecords 2
ITRecords38 commented 4 years ago

An last question for the language.

I tested by entering my information but it did not work if you have an idea I take gladly.

Thanks again for your help

ITRecords 4
coolajami commented 4 years ago

@GrimlocK38

  1. for the calendar you need to change the "CalendarName" to the name of the specific calendar you like to pull eg. Personal, Work etc. Forgot to mention that the calendar need to mentioned in the line 3 with the colour. I remove 3 of the calendars and I did the test with only one. So the line 3 should be:

calendars = [ {name:"CalendarName",color:"red"}, ]

and then the SAME calendar must be mentioned in the line 17 after the -ic command. (where "CalendarName", change with your own calendar name), like the image below:

  1. I'm not sure what you're doing in the weather widget, I suspect you're trying to amend the 14-15? I'm not sure you could pull a different language. You just have to copy your API key on line 5 and your city code in line 8. you can find your city code from the open weather website: you search for the city and you select it. then on the page of the weather, you go to the address bar and you copy the number in the end of the web address. For example for Grenoble, the openweather address is: https://openweathermap.org/city/3014728 So Grenbole code is: 3014728

These are quick fixes, but I think they match with what @vecnehladny tried to make. When I got some time I'll run a few more tests but they look great nevertheless!

Screenshot 2020-04-26 at 16 47 36
coolajami commented 4 years ago

@vecnehladny Hi, I was looking into the icalbuddy commands and I have the impression that in the line 3 array you need to enter all the calendars you have in your native MacOs calendar, otherwise will not work!

vecnehladny commented 4 years ago

@vecnehladny Hi, I was looking into the icalbuddy commands and I have the impression that in the line 3 array you need to enter all the calendars you have in your native MacOs calendar, otherwise will not work!

No you dont have to add your calendars there, its only a dictionary for colors for your calendar, it's not necessary

coolajami commented 4 years ago

@vecnehladny Hi, I was looking into the icalbuddy commands and I have the impression that in the line 3 array you need to enter all the calendars you have in your native MacOs calendar, otherwise will not work!

No you dont have to add your calendars there, its only a dictionary for colors for your calendar, it's not necessary

Are you sure? I cannot follow how it works out then because the widget needs to pull the calendar names and correspond it with a specific colour. In the clone I was with the impression that still mentions your own calendars and my thought was that the array in line 3 needs to be updated so to reflect the local MacOs calendars for each user. Could you try to make an extra mock calendar in your native MacOS calendar and put one or two events and see if it still works?

vecnehladny commented 4 years ago

@vecnehladny Hi, I was looking into the icalbuddy commands and I have the impression that in the line 3 array you need to enter all the calendars you have in your native MacOs calendar, otherwise will not work!

No you dont have to add your calendars there, its only a dictionary for colors for your calendar, it's not necessary

Are you sure? I cannot follow how it works out then because the widget needs to pull the calendar names and correspond it with a specific colour. In the clone I was with the impression that still mentions your own calendars and my thought was that the array in line 3 needs to be updated so to reflect the local MacOs calendars for each user. Could you try to make an extra mock calendar in your native MacOS calendar and put one or two events and see if it still works?

icalbuddy pulls only info about events (name, location, time and which calendar it belongs to)

It would be better to communicate somewhere else, because this style of communication is horrible imo. If you want message me on fb or suggest any other platform

ITRecords38 commented 4 years ago

@coolajami,

Ok. Perfect :) icon does not appear.

ITRecords 1
coolajami commented 4 years ago

@GrimlocK38 same problem as before with the Weather widget for the image, in line 160 (or around there) you either need to remove the ".widget" extension from the image address or (Simpler) change the folder name by adding the .widget extension.

Screenshot 2020-04-26 at 17 56 46

Also you may want to install San Francisco Pro fonts in order to fix the fonts issue.

https://developer.apple.com/fonts/

@vecnehladny apologies truly is not a great way to communicate. I'm not particularly good with social media and my programming skills are not good enough to be of particular help in certain issues! About the ical widget, my thought is that the script still needs to correspond a colour to each calendar, so if you have more calendars in your native MacOs calendar than declared in line 3, and icalbuddy try to pull all of them, then it will return an error. My workaround on this is the use of the "-ic" command in the icalbuddy where you can correspond the calendars from the array in line 3 with the calendars pulled by icalbuddy. without the command, icalbuddy will try to pull the events from all the calendars and the script will return error if a calendar does not have a corrsponding colour.

ITRecords38 commented 4 years ago

@coolajami,

I just changed and it's good now. Great :)

by default the font is this one no ?

By cons I have of many events but he does not display them

coolajami commented 4 years ago

@coolajami,

I just changed and it's good now. Great :)

by default the font is this one no?

SF Pro is the set font for the widget, but it is not a native font in the MacOS, I can see from your image that you don't have it installed as the widget roll back to the default Times New Roman.

The widget displays only events up to tomorrow. Need to change the number at the end of the command "eventsToday+1" to reflect how may days in the future you like to see( for example for 5 days calendar you change it to "eventsToday+5"). Said that I cannot make the scroll down to work, but I think it has to do with the Ubersicht programme and not the widget.

ITRecords38 commented 4 years ago

@coolajami,

indeed. works now 👍🏻 by cons I modified the calendar and nothing "eventsToday+5" weird

vecnehladny commented 4 years ago

@coolajami @GrimlocK38 join me on discord https://discord.gg/nN5RKK so we can communicate better