[Remind-Fans] Changes coming to Remind...
Dianne Skoll
dianne at skoll.ca
Tue Jan 14 18:22:00 EST 2020
On 2020-01-14 17:22, Jochen Sprickerhof wrote:
>>> - Add an element with the complete body, i.e. %\"bar%\" Foo today,
>>> or maybe two elements one with the calendar mode entry (bar) and one
>>> with the rest (Foo today)
>> Hmm, that's tricky. I have to think about that.
> Which part would be tricky? The complete body or splitting it into
> two elements?
Either, really... it's not insurmountable, but just tedious. :)
[... snip ...]
> I'm not sure if this is really useful, at least not for
> python-remind. As far as I understand we can always have a context
> that limits the repetition (like have a global OMIT and add a SKIP).
That is true. However, any reminder that doesn't have a SKIP/BEFORE/AFTER
is unaffected by the global OMIT context. The intent here was to allow
back-ends to deduce recurrences where possible, and avoid that deduction
where there is danger of being wrong. (Or possibly run in a "dangerous"
mode where they deduce recurrences anyway.)
[snip]
>> $ echo "REM 12 AT 20:00 DURATION 24:00 MSG test" | ./src/remind -pp -b2 -
>> {"date":"2020-01-12", "duration":1440, "time":1200, "eventduration":1440,
>> "d":12, "eventstart":"2020-01-12T20:00", "priority":5000, "body":"test"}
>> {"date":"2020-01-13", "duration":1200, "time":0, "eventduration":1440, "d":12,
>> "eventstart":"2020-01-12T20:00", "priority":5000, "body":"test"}
> Good point, so for python-remind I would condense this again to one icalendar
> entry using the eventstart as the key (is the assumption that I can merge it
> always true)?
Yes, but to do it safely you should invoke remind with the "-l" option.
Then you can merge events that are covered by the eventstart/eventduration
and that have the same filename and line number.
> Would it be possible to have a mode to only output this event once?
Well, anything's possible. :) But I probably won't implement that because
overlapping multi-day events get tricky.
[snip]
> I see where you are coming from, but up to now I didn't hit any
> memory barrier with my reminders. Also, as detailed above, I would
> probably read in all elements anyhow to do repetition calculation
> and so on (python-remind currently has a logic to cache all
> reminders and to rerun Remind only on file or day change). So for me
> the question is more if I can dump the Remind output directly into a
> json parser or have to filter it first.
I think it makes sense to wrap everything in a JSON array or object so
the whole thing can be read directly into a JSON parser. I will think
about modifying the format to support that. (I might provide
guarantees about where linebreaks happen so simple-minded parsers can
still work line-by-line if they don't want to slurp in the entire
thing.)
Regards,
Dianne.
More information about the Remind-fans
mailing list