从你的终端阅读谷歌日历事件。

gcalendar的Python项目详细描述


卡伦达

PyPI versionDonate

一个命令行工具,可以读取JSON格式的Google日历事件。在

安装

Ubuntu、Linux Mint和其他Ubuntu衍生物

sudo add-apt-repository ppa:slgobinath/gcalendar
sudo apt update
sudo apt install gcalendar

拱门

^{pr2}$

或者

packer -S gcalendar

其他分布

安装这些依赖项:

python3-pip python3-setuptools python3-dateutil python3-oauth2client python3-googleapi

安装gcalendar

pip3 install gcalendar

从源安装

sudo apt install python3-pip python3-setuptools python3-dateutil python3-oauth2client python3-googleapi git
git clone https://github.com/slgobinath/gcalendar.git
cd gcalendar
pip3 install -e .

从源运行

sudo apt install python3-pip python3-setuptools python3-dateutil python3-oauth2client python3-googleapi git
git clone https://github.com/slgobinath/gcalendar.git
cd gcalendar
python3 -m gcalendar

帮助

usage: gcalendar [-h] [--list-calendars | --list-accounts | --status | --reset] [--calendar [CALENDAR [CALENDAR ...]]] [--no-of-days NO_OF_DAYS] [--account ACCOUNT]
                 [--output {txt,json}] [--client-id CLIENT_ID] [--client-secret CLIENT_SECRET] [--version] [--debug]

Read your Google Calendar events from terminal.

optional arguments:
  -h, --help            show this help message and exit
  --list-calendars      list all calendars from the Google account
  --list-accounts       list the id of gcalendar accounts
  --status              print the status of the gcalendar account
  --reset               reset the the account
  --calendar [CALENDAR [CALENDAR ...]]
                        calendars to list events from
  --no-of-days NO_OF_DAYS
                        number of days to include
  --account ACCOUNT     an alphanumeric name to uniquely identify the account
  --output {txt,json}   output format
  --client-id CLIENT_ID
                        the Google client id
  --client-secret CLIENT_SECRET
                        the Google client secret
  --version             show program's version number and exit
  --debug               run gcalendar in debug mode

授权

从终端运行gcalendar。它将在默认浏览器中打开Google日历OAthu屏幕。 允许gcalendar查看您的日历,如视频所示:gcalendar Authorization。在

成功授权后,gcalendar应该在终端上打印日历事件。在

使用

列出日历

gcalendar --list-calendar

列出事件

# list next 7 days events
gcalendar

# list next 30 days events
gcalendar --no-of-days 30# list events from selected calendar
gcalendar --calendar "Holidays in Canada"

独立账户

# the default account
gcalendar

# different account named foo
gcalendar --account foo

# different account named bar
gcalendar --account bar

重置帐户

# reset the default account
gcalendar --reset

# reset the account named foo
gcalendar --account foo --reset

# reset the account named bar
gcalendar --account bar --reset

问题

运行gcalendar --debug并用输出创建一个issue。在

应用

肉桂Google Calendardesklet使用gcalendar来拉日历事件并在肉桂桌面上显示它们。在

许可证

GNU通用公共许可证v3

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
java从Dropwizard中的Minio检索文件时,GET请求中的超时是如何处理的?   带Hibernate的java Jackson用于序列化以避免枚举   Raspberry Pi上的java Jave分段错误   java在屏幕旋转时不保存当前片段和数据   java War文件未在Heroku上正确部署   如何使用Java处理Selenium webdriver中的促销广告或cookie   java处理“用法:PApplet[options]<classname>[sketch args]”   java文本文件错误扫描程序   运行第一个JavaFX模块化程序时出现java异常   java将fileoutputstream转换为字符串   如何调试gstreamerjava?   java Spring RestTemplate ResponseBody类是什么样的   如何将JSON数组转换为Java列表。我在用斯文森   javascript在显示div按钮后进入新页面