It is currently March 28th, 2024, 12:38 pm

Remember the Milk - RTM

General topics related to Rainmeter.
Minjin
Posts: 7
Joined: November 5th, 2009, 4:26 am

Re: Remember the Milk - RTM

Post by Minjin »

Any reason for the 4 task limit? Any issues with expanding the code to have more?

I changed the code to add a "Due:" before the due date but by doing that, it shows that prefix even if there is no task. Any easy way to keep that from showing up unless there is content in the field itself?
User avatar
Kaelri
Developer
Posts: 1721
Joined: July 25th, 2009, 4:47 am
Contact:

Re: Remember the Milk - RTM

Post by Kaelri »

Minjin wrote:Any reason for the 4 task limit? Any issues with expanding the code to have more?

I changed the code to add a "Due:" before the due date but by doing that, it shows that prefix even if there is no task. Any easy way to keep that from showing up unless there is content in the field itself?
It defaults to 4 tasks so that the skin is the same height as all the other Reader skins in Enigma (RSS, Gmail, Gcal, etc). But it would be extremely easy to expand. First, you just have to add to the RegExp string to account for the new items. Just tack this onto the end:

Code: Select all

(?(?=.*<entry).*<link.*href=\"(.*)\".*<title.*>(.*)</title>.*<span class=\"rtm_due_value\">(.*)</span>)
Add one of those for however many items you want to add. Then just make new measures and meters following the pattern of the first ones.

As for the "Due:" issue, I think I have a way. Once you have the number of items that you want in the RegExp, change this part of it:

Code: Select all

<span class=\"rtm_due_value\">(.*)</span>
to this:

Code: Select all

<span class=\"rtm_due_value\"(.*)</span>
All I did was remove the last ">" on the end of the tag. This means that the bracket is now 'captured' along with the complete due date. Do that for each item. Then, down in the [MeasureWhen#] sections, add this:

Code: Select all

Substitute=">","Due: "
Lemme know how it works out.
Post Reply