将iCal文件转换为Emacs组织模式数据

ical2org的Python项目详细描述


ical2org是一个命令行工具,用于从mac os x导出数据 应用程序,因此它可以与emacs工具org-mode一起使用。 数据传输是单向的(从iCal到Emacs),目的是 用于显示iCal在 组织的议程视图。

安装

ical2org作为一组Python源文件分发,并且 要求已安装python。源分布是 使用Distribute创建,它将与ical2org一起安装。

快速安装

使用普通的python应用程序步骤安装ical2org:

$ pip install ical2org

或:

$ easy_install ical2org

将安装其他依赖项(pytzvobject) 自动。

来源

  1. 下载并安装依赖项。

  2. project home page下载最新版本的tarball。

  3. 解压缩文件:

    $ tar zxvf ical2org-VERSION.tar.gz
    
  4. 运行安装脚本:

    $ cd ical2org-VERSION
    $ python setup.py install
    

    注意

    有些系统可能需要超级用户权限才能安装。

生成组织模式文件

虽然ical2org支持多种输出格式,但默认为 组织模式大纲。每个日历条目都包括摘要、位置, 日期和时间,以及完整的描述(用于搜索)。

例如,要从名为“meetup”的日历中提取条目: python“,您将运行:

$ ical2org "Meetup: Python"
Starting 14 days ago at 2010-01-03 00:00:00-05:00
Ending 30 days from now at 2010-02-17 00:00:00-05:00
Processing: Meetup: Python
  Python Atlanta February Meetup
# -*- coding: utf-8 -*-
* Meetup: Python    :clubs:
  :CATEGORY: Personal
** Python Atlanta February Meetup
   <2010-02-11 Thu 19:30-21:30>
   - PyAtl: Atlanta Python Programmers

     After an optional 6pm dinner at Figo Pasta at the corner of
     Howell Mill Road and Huff Road, we will meet as usual in the
     spacious and comfortable auditorium of the GTRI Food
     Processing Building at 7:30pm for our monthly meeting.

     Topics for this meeting:

     Brandon Rhodes will give his PyCon talk: "Learning Hosting
     Best-Practices From WebFaction"

     Atlanta, GA  30318 - USA

     Thursday, February 11 at 7:30 PM

     Photo: http://photos2.meetupstatic.com/photos/event/4/7/3/5/event_5238229.jpeg

     Attending: 3

     Details: http://www.meetup.com/python-atlanta/calendar/12325308/

输出被编码为utf-8,这可能不适用于unix管道和 外壳重定向。将输出保存到文件而不是保存它 打印到标准输出,使用-o选项。

默认情况下,ical2org处理 以iCal显示。隐藏日历将被忽略,除非您将其 命令行上的名称。

生成日记文件

默认输出格式使用组织的大纲结构。如果你愿意 相反,使用emacs的日记模式,使用-f diary来切换模式。这个 日记条目不包括事件的全文。

经常性事件

iCal中的重复事件被“分解”以在 输出。这使得在添加注释时可以轻松地重新填充事件, 没有一次会议的记录出现在 日期不对。

命令行选项

-hshow this help message and exit
-c CONFIG_FILENAME, --config=CONFIG_FILENAME
Configuration file name. Defaults to ~/.ical2org
-b DAYS_AGO, --begin=DAYS_AGO, --days-ago=DAYS_AGO
Number of days back in time to search. Defaults to 14.
-e DAYS_AHEAD, --end=DAYS_AHEAD, --days-ahead=DAYS_AHEAD
Number of days forward in time to search. Defaults to 30.
-v, --verboseIncrease verbose level
-q, --quietTurn off verbose output
-o OUTPUT_FILE_NAME, --output-file=OUTPUT_FILE_NAME
Write the output to the named file instead of stdout
--allInclude all calendars, not just active.
--input-directory=INPUT_DIRECTORY
Directory containing calendars. Defaults to ~/Library/Calendars.
-f FORMAT, --format=FORMAT
Output format. One of [‘org’, ‘diary’]. Defaults to “diary”.
--opt=OPT, --formatter-option=OPT
Formatter-specific option name=value
--helpVerbose help

历史记录

1.2

  • Fix bug with event spans due to mis-interpretation of iCalendar standard.

1.1

  • Fix DST handling for recurring events.

1.0.3

  • Patches from KANEUCHI Tetsuya to fix problems with unicode console output and empty descriptions

1.0.2

  • Updated installation instructions.

1.0.1

  • Fixed some installation annoyances.

1.0

  • First public release.

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

推荐PyPI第三方库


热门话题
oop Java多态性:如何指示应该使用子类进行比较?   JavaLibGDX:渲染基于可缩放向量的形状的最快方法是什么?   java如何通过可选选项同时检查NPE上对象的字段和条件?如果一切正常,什么都不做,否则抛出异常   java使用camera2获取图像捕获时间   未单击时选中java Recyclerview复选框   java Android Hello world项目未运行   java在网站上发布处理代码?   java如何在jdialog中设置垂直滚动条?   java等待并通知   使用JavaFX在raspberry PI上构建java Maven失败   java处理空值Hazelcast投影   在java中为以下数据选择完美的数据结构   通过ApacheHttpClient将对象的arraylist从Java传递到PHP   使用同步关键字的多线程java等待通知方法   java素数与布尔逻辑   java组织。json。JSONException:JSONArray文本必须以“[”开头