跳转至内容

Remind

来自 ArchWiki

Remind 是一个复杂的日历和闹钟程序。

安装

安装 remind 包。

配置

安装后,用户可以在 remind 脚本文件(.rem)中定义提醒。这些文件的合适位置可以是 ~/.reminders~/.config/remind

以下是一些可能在 remind 脚本中的示例提醒

~/.config/remind/reminders.rem
REM Jan 1 MSG Remind every year on new years day
REM January 1 2015 MSG Remind only on new years day 2015
REM Sunday 2 MSG Remind every second Sunday
REM March Monday 1 --7 MSG remind on the last Monday of February
REM December 25 +30 MSG Christmas

月份的最后一个特定日期是通过从下个月的第一天减去 7 天来获得的。+ 符号告诉 remind 从多少天前开始提醒。

请参阅 remind(1) man page 以获取有关配置 remind 的详细信息。

包含 (Include)

一个提醒脚本还可以包含任意数量的外部脚本。例如,用户可能希望有一个单独的文件用于生日提醒,另一个文件用于节日提醒。这可以这样做:

include ~/.config/remind/birthdays.rem
include ~/.config/remind/holidays.rem

用法

使用 remind 最简单的方法是检查提醒。通过将提醒文件传递给 remind 来实现此目的。

remind ~/.config/remind/reminders.rem

这将输出一个它计划告知用户的提醒列表。

要输出基于文本的日历,请使用 -c 选项。

remind -c1 ~/.config/remind/reminders.rem

这将输出当前月份的文本日历。要打印未来月份,请将 1 替换为您要打印的月份数。

Postscript/pdf 日历

还可以创建 postscript 格式的日历。

remind -c2 -p ~/.config/remind/reminders.rem | rem2ps > calendar.ps

-p 选项使 remind 打印适合 rem2ps 的输出。rem2ps 默认将输出打印到标准输出,因此必须将其重定向到一个文件,以便像 evince 这样的程序可以打开它。

Postscript 文件可以使用 ps2pdf 进行转换。Ps2pdf 由 ghostscript 提供。

参见