适用于 Linux 的简单轻量级 GoogleCalendar 通知程序
项目描述
SimpleGCalendarNotifier
适用于 Linux 的简单轻量级 GoogleCalendar 通知程序
这个应用程序专注于提供多功能性和简单性,并提供一个非常轻量级的命令行应用程序,可以提醒您在 Google 日历中的活动。
该项目受到gcalcli的启发,并寻找更多基本功能并且可以处理多个 Google 帐户和日历。
安装
目前,这个包只能通过PyPi
从 PyPi 安装
pip install gcal_notifier
特征
- 从所有帐户中获取 Google 事件
- 通知事件
- 使用 Cron 作业来尽可能减少一切
用法
gcal_notifier --help
usage: gcal_notifier [-h] {get,notify,print} ...
A simple and lightweight GoogleCalendar notifier for Linux.
positional arguments:
{get,notify,print} Invoking a subcommand with --help prints subcommand usage.
get fetch events from Google Calendar and save them in cache.
notify run reminders with cached events.
print print events to the console.
options:
-h, --help show this help message and exit
证书
要使所有这些工作,您必须为要使用的每个帐户创建凭据。注意:这部分是从gcsa README 复制和粘贴的。
-
创建 OAuth 客户端 ID 凭据 并下载
credentials.json文件 -
将下载
credentials.json的文件放入~/.config/gcal_notifier/default
在Authentication中查看更多选项。
笔记:
在第一次运行时,您的应用程序将提示您进入默认浏览器以获取您使用日历的权限。这将在同一文件夹中创建 token.pickle 文件。
配置
获得文件后credentials.json,您可以运行gcal_notifier get
以查看是否一切正常。
如果是这样,是时候设置你的 cron 作业了。
-
运行
crontab -e以编辑您的 cron 作业。 -
选择您要运行的间隔
get和remind。这意味着您可以在检查提醒的不同时间间隔内获取事件。例如,我个人的偏好是:
*/10 * * * * gcal_notifier get
* * * * * gcal_notifier remind
因此,它每 10 分钟运行一次以获取事件,但每分钟查找一次提醒。
而已!你都准备好了!
配置
您现在可以配置一些东西(希望以后更多),所有配置都在一个文件中完成~/.config/gcal_notifier/config.ini
支持的每个配置的示例是:
[GENERAL]
# Returns only one event for recurrent events. Default is true
single_events = true
# How to order the events. Default (and recommended) is startTime
order_by = startTime
# Custom notification sound, if you would like to choose (it has to be a wav file).
notification_sound = ~/Music/my_notification.wav
[CALENDAR1]
# Name given to the calendar. Default is 'Calendar'
name = NAME1
# Name or ID of the calendar. Required.
calendar = example@gmail.com
# Reminders to your events, up to 5 integers separated by commas. Default is None
default_reminders = 10,0
# Path to the credentials file. Default is ~/.config/gcal_notifier/credentials.json
# credentials = ~/.config/gcal_notifier/credentials_file.json
[CALENDAR2]
name = NAME2
calendar = xxxxxxxxxxxxxxxxxxxxxxxx@group.calendar.google.com
default_reminders = 10,0
credentials = ~/.config/gcal_notifier/credentials_other_account.json
[CALENDAR3]
name = NAME3
calendar = other@gmail.com
.
.
.
把招工广告!
如果您发现此项目有用,请随时贡献或报告问题。你可以随时给我发电子邮件thalesaknunes22@gmail.com
快乐编码!
项目详情
下载文件
下载适用于您平台的文件。如果您不确定要选择哪个,请了解有关安装包的更多信息。
源分布
内置分布
gcal_notifier -1.1.3.tar.gz 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | a1fc8da092e08668baa7437285e4da07664f39de743e79cf47691cfe497627f3 |
|
| MD5 | 24d13376194178f6908e53a43ab8b206 |
|
| 布莱克2-256 | e8fa9e05c7fab4842dcfaaf7e352f94c96c1435dfbaa6c5d0163a63e2c58c246 |
gcal_notifier -1.1.3-py3-none-any.whl 的哈希值
| 算法 | 哈希摘要 | |
|---|---|---|
| SHA256 | 0ca62ada8ed762f2a85da371e42239aaea57b69c8ffb8d9378ea1e4a21f98b73 |
|
| MD5 | 84fed4e3e48744b0d7e0e76c74ce0183 |
|
| 布莱克2-256 | 9d09ac173110af6923cf0e0192ad5fd2f5917a64d5286b51425cf47ebdaa9bbb |