关于calendar

系统安装、升级讨论
版面规则
我们都知道新人的确很菜,也喜欢抱怨,并且带有浓厚的Windows习惯,但既然在这里询问,我们就应该有责任帮助他们解决问题,而不是直接泼冷水、简单的否定或发表对解决问题没有任何帮助的帖子。乐于分享,以人为本,这正是Ubuntu的精神所在。
回复
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

关于calendar

#1

帖子 eexpress » 2010-02-04 12:48

man calendar
发现。就没一个 calendar.chinese 这样的。
● 鸣学
头像
missing
帖子: 1470
注册时间: 2008-03-28 20:52
系统: QNX

Re: 关于calendar

#2

帖子 missing » 2010-02-04 12:50

等ee你来啊,没有电脑看日历的习惯
missing is i missing you...
JiangHui
论坛版主
帖子: 21308
注册时间: 2007-08-02 20:29
系统: 窓辺とうこ

Re: 关于calendar

#3

帖子 JiangHui » 2010-02-04 12:52

:em70 求神,诚心诚意来求神
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 关于calendar

#4

帖子 eexpress » 2010-02-04 13:27

~/.calendar/calendar
我自己建立了一个。
附件
27.jpg
● 鸣学
头像
leeaman
帖子: 30702
注册时间: 2007-02-02 18:14
系统: debian sid

Re: 关于calendar

#5

帖子 leeaman » 2010-02-04 16:58

哈哈,神要过生日了哦
醉了星星,醉月亮●●●●●The Long Way To Go(*^_^*)
JiangHui
论坛版主
帖子: 21308
注册时间: 2007-08-02 20:29
系统: 窓辺とうこ

Re: 关于calendar

#6

帖子 JiangHui » 2010-02-04 17:01

:em48 :em34 神诞 :em70
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 关于calendar

#7

帖子 eexpress » 2010-02-04 17:11

金日成找的ics。

代码: 全选

● wget ical.mac.com/ical/China32Public32Holidays.ics
简练的perl转换。

代码: 全选

● dog ical.pl
use Tie::iCal;
tie %events, 'Tie::iCal', "$ARGV[0]" or die "Failed to tie file!\n";
print "#ifndef _calendar_ics_convert\n#define _calendar_ics_convert\n\nLANG=utf-8\n\n";
my @items = map { $events{$_}->[1] } keys(%events);
untie(%events);
@items = sort { $a->{'DTSTART'}->[1] cmp $b->{'DTSTART'}->[1] } @items;
foreach my $item (@items) {
my $date=$item->{'DTSTART'}->[1];
$date=~/(\d{4})(\d{2})(\d{2})/;
$date="$2/$3";
print $date."\t".$item->{'SUMMARY'}.", $1\n";
}
print "\n#endif\n";

代码: 全选

● ical.pl ~/China32Public32Holidays.ics >~/.calendar/calendar.china

代码: 全选

● ical.pl China32Public32Holidays.ics 
#ifndef _calendar_ics_convert
#define _calendar_ics_convert

LANG=utf-8

01/01   元旦 (New Year's Day), 2009
01/01   元旦 (New Year's Day), 2009
01/26   春节 (Spring Festival), 2009
03/08   国际妇女节 (International Women's Day), 2009
04/04   清明节 (Qing Ming Festival), 2009
05/01   劳动节 (Labour Day), 2009
05/04   青年节 (Youth Day) , 2009
05/28   端午节 (Dragon Boat Festival), 2009
06/01   儿童节 (Children's Day), 2009
08/01   建军节 (Army Day), 2009
09/10   教师节 (Teachers' Day), 2009
10/01   国庆节 (National Day), 2009
10/03   中秋节 (Mid-Autumn Festival), 2009
02/14   春节 (Spring Festival), 2010
04/05   清明节 (Qing Ming Festival), 2010
06/16   端午节 (Dragon Boat Festival), 2010
09/22   中秋节 (Mid-Autumn Festival), 2010
02/03   春节 (Spring Festival), 2011
04/05   清明节 (Qing Ming Festival), 2011
06/06   端午节 (Dragon Boat Festival), 2011
09/12   中秋节 (Mid-Autumn Festival), 2011
01/23   春节 (Spring Festival), 2012
04/04   清明节 (Qing Ming Festival), 2012
06/23   端午节 (Dragon Boat Festival), 2012
09/30   中秋节 (Mid-Autumn Festival), 2012

#endif
~/.calendar/calendar.china 不知道为什么不进入日历。手动建立的都进入了。
● 鸣学
头像
tenzu
论坛版主
帖子: 36924
注册时间: 2008-11-21 20:26

Re: 关于calendar

#8

帖子 tenzu » 2010-02-04 17:13

原来你们两个中午在irc就是说这个
头像
eexpress
帖子: 58428
注册时间: 2005-08-14 21:55
来自: 长沙

Re: 关于calendar

#9

帖子 eexpress » 2010-02-04 17:17

代码: 全选

● cat /home/exp/.calendar/calendar
#ifndef _calendar_self_
#define _calendar_self_

#include <calendar.eexp>
#include <calendar.china>

#endif
额这样可以了。
● 鸣学
头像
xsoul
帖子: 441
注册时间: 2007-06-05 18:27

Re: 关于calendar

#10

帖子 xsoul » 2010-02-04 18:25

农历腊月二十六
回复