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: 1193
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: 1193
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: 1193
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: 36
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: 1193
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: 320
Joined: Sat Jun 18, 2011 5:53 pm


Return to Plugin Announcements

Who is online

Users browsing this forum: No registered users and 5 guests