Cynical Calendars

Posted on
Sun Jul 26, 2015 8:03 am
FlyingDiver offline
User avatar
Posts: 7260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Cynical Calendars

Swancoat wrote:
So, like others the plugin is not working for me (created event on my phone to test), but while I'm here I'd like to ask if there's any kind of wild card characters I can put into the 'Regular Expression' fields. I'd like to execute an action when an event occurs that just contains a phrase, but won't ever match it exactly. (Specifically, I subscribe to a baseball team's schedule calendar, and I'd like to execute an event whenever the games start, but they all have different titles depending on who they're playing. i.e. Houston Astros vs. Kansas City Royals).


The docs for Cynical Calendar are here: http://www.cynic.org/indigo/plugins/onl ... endarevent

They link to regular expression docs here: https://docs.python.org/2/library/re.html

Regular expressions are wildcards on steroids. If you post the phrase you want to search for, we can help you determine the regular expression to use.

joe

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Sun Jul 26, 2015 8:04 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Cynical Calendars

Sweet! So if all of my events read like, "Houston Astros vs. Kansas City Royals" or "Texas Rangers vs. Houston Astros", I can put in something like:
Code: Select all
.Houston Astros.


(Not sure if that covers it or not, I just skimmed that link and have to run out of the house, but that seems like the right idea).

http://nerdhome.jimdo.com

Posted on
Sun Jul 26, 2015 9:01 pm
FlyingDiver offline
User avatar
Posts: 7260
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Cynical Calendars

If you're sure of the capitalization, it should be:

Code: Select all
.*Houston Astros.*


As that accounts for multiple letters before and after.

Or you could do this, just in case:

Code: Select all
.*[hH]ouston [aA]stros.*


There's also ways to account for the white space between the words, but I'm not really a regex expert.

joe

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jul 27, 2015 7:08 am
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Cynical Calendars

Ahh, yeah I saw those stars and didn't read carefully enough. Perfect. The calendar feed is straight from the team, so capitalization, spelling, etc is nice and consistent.

http://nerdhome.jimdo.com

Posted on
Sat Aug 01, 2015 12:28 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Cynical Calendars

Just some followup and to add some anecdotes to the sample... I cannot seem to get this plugin to detect any calendar events, so whatever issue everyone is having... I'm having it too.

http://nerdhome.jimdo.com

Posted on
Tue Aug 04, 2015 6:08 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Cynical Calendars

Aaaaaaaand it totally worked today. And it was Glorious. Amen.

http://nerdhome.jimdo.com

Posted on
Wed Aug 05, 2015 1:37 am
MarcoGT offline
Posts: 1105
Joined: Sep 11, 2014
Location: Germany

Re: Cynical Calendars

And how did you get it working? :)

Posted on
Thu Aug 06, 2015 9:48 pm
Swancoat offline
Posts: 503
Joined: Nov 20, 2009
Location: Houston

Re: Cynical Calendars

No idea. Today it didn't work. I'm not really actively testing it right now though either. Basically, I set up a trigger to turn on the TV and set channel to the Astros whenever they play (using their schedule in iCal as the trigger). The other day the TV turned itself on, today it did not.

http://nerdhome.jimdo.com

Who is online

Users browsing this forum: No registered users and 2 guests