Home Download Buy Blog Forum Support

ST3: QuickCal

ST3: QuickCal

Postby facelessuser on Mon Mar 18, 2013 9:51 pm

Image

For ST3 only. A simple calendar viewing plugin.

Example keymap:
    //////////////////////////////////////////////////////////////
// Calendar Shortcuts
//////////////////////////////////////////////////////////////
{
"keys": ["ctrl+super+alt+c"],
"command": "calendar"
},
{
"keys": ["ctrl+super+alt+shift+c"],
"command": "calendar_lookup"
},
{
"keys": ["alt+right"],
"command": "calendar_month_nav",
"context":
[
{
"key": "calendar_view"
}
],
"args": {"reverse": false}
},
{
"keys": ["alt+left"],
"command": "calendar_month_nav",
"context":
[
{
"key": "calendar_view"
}
],
"args": {"reverse": true}
},


I add this to my color scheme file to highlight holidays and the current selected day.

        <dict>
<key>name</key>
<string>Calendar Selected Day</string>
<key>scope</key>
<string>selected_day</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#2D2D2D</string>
<key>background</key>
<string>#F2777A</string>
</dict>
</dict>
<dict>
<key>name</key>
<string>Calendar Holiday</string>
<key>scope</key>
<string>holiday</string>
<key>settings</key>
<dict>
<key>foreground</key>
<string>#2D2D2D</string>
<key>background</key>
<string>#66CCCC</string>
</dict>
</dict>


Holidays currently provided by holidata.net...so if its missing a holiday for your local, don't gripe to me. In the future, I may add support for importing stuff like ical, but not right now.

Repo: https://github.com/facelessuser/QuickCal

Edit: repo link fixed
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3: QuickCal

Postby facelessuser on Tue Mar 19, 2013 3:14 am

Small workaround for OSX due to a missing urllib. If urllib fails, the plugin will try and use "curl" via subprocess to try and download the holiday list from holidata.net.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3: QuickCal

Postby facelessuser on Tue Mar 19, 2013 4:12 pm

Documentation is now available via the repo.

local settings was changed to be properly called locale; so just revisit your User settings file and update if your locale is suddenly wrong. All issues should be resolved. This is kind of a low priority repo for me in regards to updates (it works well enough for me as is), so if you really want feature X etc., please consider doing a pull request...and please make features optional.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3: QuickCal

Postby KonTrax on Wed Mar 20, 2013 6:59 am

Quick tip:
Since holidata.net provide their data in utf-8 and it's the only available source at this point you should make sure the data is read as utf-8. Language can be such a bit*h.

in "quickcal.py" @ line 99

From:
Code: Select all
            with open(holiday_list, 'r') as f:


To
Code: Select all
            with open(holiday_list, 'r', encoding='utf-8') as f:



KonTrax
KonTrax
 
Posts: 46
Joined: Sun Mar 17, 2013 10:24 am

Re: ST3: QuickCal

Postby facelessuser on Wed Mar 20, 2013 1:30 pm

You got a point there @KonTrax :). UTF8 fix is in.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3: QuickCal

Postby quodlibet on Fri Mar 22, 2013 10:03 pm

Thanks @facelessuser, this is great! Sorry I didn't post sooner, I've been using this all week.

Thanks again,
Alex
quodlibet
 
Posts: 517
Joined: Sat Jun 18, 2011 5:53 pm

Re: ST3: QuickCal

Postby layne on Sat Jun 22, 2013 11:38 pm

I'll give it a try at next monday.

But the first feature request in mind: Can you add the calendar weeks?

And, I think that's a bit bigger, calendars by using ical format? Like google, facebook, ... You can configure the urls and the plugin will download and cache them in a file?
// my Blog //
layne
 
Posts: 39
Joined: Tue Jan 04, 2011 3:00 pm
Location: NRW // GER

Re: ST3: QuickCal

Postby facelessuser on Sun Jun 23, 2013 5:37 am

layne wrote:But the first feature request in mind: Can you add the calendar weeks?

What do you mean...like just a single week view?

layne wrote:calendars by using ical format?

It has been on my list, but FWIW the current calendar is more than sufficient. I really just wanted a way to look at a month from my editor (where I am most of the day at work). This is why ical hasn't really been a priority for me. I added the holidata mainly because it was quick and easy. This kind of goes hand in hand possibly with your previous request of the calendar week...until I really support ical, it isn't really like you can view your agenda on it, but that wasn't initially the point of it of QuickCal. But like I said, it is on my list to implement, but I cannot promise when I will actually get around to it.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Re: ST3: QuickCal

Postby layne on Sun Jun 23, 2013 6:48 pm

By calendar week I mean the number of each calendar week.
Not another view for just one week. E.g. the current calendar week is 25 in germany. I've to look up the calendar week very often at my daily work and I don't like to leave the ditor for that. I think that should not be that hard to add.

By iCal I meant http://en.wikipedia.org/wiki/ICalendar the format. So not just apple fans can use there data, but everyone who has a url.
You can share a Google Calendar, facebook events, etc. via a simple URL in this format. So by adding the URL to the config you can parse the data and show it inside the calendar. I don't know how complicated that will be.
// my Blog //
layne
 
Posts: 39
Joined: Tue Jan 04, 2011 3:00 pm
Location: NRW // GER

Re: ST3: QuickCal

Postby facelessuser on Sun Jun 23, 2013 9:32 pm

layne wrote:Not another view for just one week. E.g. the current calendar week is 25 in germany

Ahh, I see what you mean, that shouldn't be hard. I'll make a note of this and implement it when I get a chance.

layne wrote:By iCal I meant http://en.wikipedia.org/wiki/ICalendar the format.

I knew what you meant :). I have already looked into the format earlier, but I haven't gotten around to writing a parser (or finding a parser) and adding in the logic.
facelessuser
 
Posts: 1571
Joined: Tue Apr 05, 2011 7:38 pm

Next

Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 6 guests