[Remind-Fans] Can remind "count" time?
Tim Chase
remind at tim.thechases.com
Tue Feb 18 21:46:31 EST 2020
On 2020-02-18 16:24, Sector11 wrote:
> OK 'nothing' to do with retirement. You grabbed that idea from my
> lines:
> =====================================
> one I am interested in (Pension Day):
Indeed, I guess I'm having trouble figuring out
1) what you have
2) what you want
3) where the boundaries are between remind(1) issues and conky issues
4) how this ties into the "3y 2m 15d" notation you asked about
5) you mention python scripts that broke, but they don't seem to have
anything to do with remind(1)
> # 3rd last working day of the month
> REM 1 -3 OMIT Sat Sun MSG Payday
> =====================================
> That REM statement works just fine. On the 3rd last working day of
> the month remind tells me it is "Payday" - in other words my
> pension cheque is deposited in the bank. Different "day and
> numbers" because of the "working days" aspect (eliminating Sat and
> Sun)
Okay, so if it's working, I was a little confused why you included it
in your message. If you want to know how many days until payday in
every report, you can use something like
# find when payday is
REM 1 -3 OMIT Sat Sun SATISFY 1
# create the reminder for that day with appropriate advanced notice
REM [$T] ++[$T-$U] MSG %"Payday%" in [$T-$U] day[plural($T-$U)]%
or possibly replace "$U" with "realtoday()" (given the "-s" invocation
you use below, this might be the case).
> I don't think the other stuff will work. I wanted to use it in a
> conky but my conky is limited to MSG's for "today" and a list for
> this and next month.
> ==== eliminating formatting =========
> ${pre_exec remind -q -r ~/.reminders | sed -e "/.*(today):/d" -e
> '/^$/d'}
⋮
> ${pre_exec remind -s2 -r ~/.reminders | cut -c6-10,19-}
> =====================================
I guess you must have a lot fewer reminders than I do...a month (let
alone 2 months) worth of reminders would more than fill my screen. A
quick sampling shows that for any given month I have 75-150 reminders
per month.
However, you might investigate the BANNER directive to remove the
banner rather than using sed to hack off the banner:
BANNER %
and I'm not sure why you're invoking remind twice, once with "-q" and
once with "-s2". Additionally, you might investigate using the
msgprefix() function to tack the date onto your reminders rather than
munging the output of "-s" with cut(1). Something like
FSET zfill2(s) iif(strlen(s) == 1, "0" + s, s)
FSET msgprefix(p) zfill2(monnum($U)) + "-" zfill2(day($U)) + ": "
and then when you run remind (without the "-s"), it will format with
MM-DD prefixes.
-tim
> I have two python scripts that stopped working as there is a missing
> dependency in Debian 10. I've been using it since about 2008 and
> the author is no longer using Linux - work requirements.
> ===== Example =====
> SIL: 10/03/68: ${pre_exec conkyDateDiff 19680704}\
> ${goto 305}${alignr 10}${pre_exec conkyDaysDiff 19780704}
> ===================
> conkydateDiff - outputs: YYy MMm DDs
> conkyDaysDiff - outputs the number of days and takes leap years
> into account
>
> sample here:
> http://conky.pitstop.free.fr/wiki/index.php5?title=ConkyDateDiff_and_conkyDaysDiff_(en)
>
> Oh well, 12 years was a good run.
>
> Sorry for bothering everyone but I though remind might be a good
> replacement. Not even close.
>
> But thank you for your reply gives me food for thought.
> Bruce
>
More information about the Remind-fans
mailing list