17
|
1 Calcon version 0.01
|
|
2
|
|
3 Calendar/Address Book converter
|
|
4
|
|
5 河野真治
|
|
6
|
|
7 Zaurus なんかのアドレス帳やスケジュールを Mac OS Xのアドレスブックや
|
|
8 iCalに移動するのに書きました。Entourageもapplescript 経由でできます。
|
|
9 書き出しは、Mac::Applescript module が必要です。CPANにあります。
|
|
10 Applescript は前もってアプリケーションを立ち上げる必要がある時が
|
|
11 あるみたい。
|
|
12
|
|
13 入力フォーマット
|
|
14 'Zaurus' => 'Calcon::Zaurus_read',
|
|
15 ザウルスのデータ CFにコピーするかで取り出した *.BOX ファイル
|
|
16 SCHEDULE1.BOX, ADDRESS1.BOX などです。MI-C1,MI-110 は試しました。
|
|
17 'Backup Zaurus' => 'Calcon::Zaurus_backup_read',
|
|
18 ザウルスのバックアップデータ *.BCK です。シリアル経由で取った
|
|
19 ものも読めます。
|
|
20 'Xcalendar' => 'Calcon::Xcalendar_read',
|
|
21 Unix X Window の xcalendar の旧フォーマット
|
|
22 'Vcard' => 'Calcon::Vcard_read',
|
|
23 VCARD
|
|
24 'SLA300' => 'Calcon::Sla300_read',
|
|
25 リナックスザウルス
|
|
26 'iApp' => 'Calcon::iApp_read',
|
|
27 Mac OS X のiCal, Address Book, Applescript 経由です
|
|
28 'Entourage' => 'Calcon::Entourage_read',
|
|
29 Mac OS X のEntourage X, Applescript 経由です
|
|
30 アドレスは export したファイルも読めます。こちらの方が高速。
|
|
31 'File' => 'Calcon::File_read',
|
|
32 独自のフラットファイルフォーマット (EUC)
|
|
33
|
|
34 出力フォーマット
|
|
35 'Xcalendar' => 'Calcon::Xcalendar_write',
|
|
36 Unix X Window の xcalendar の旧フォーマット
|
|
37 'Vcard' => 'Calcon::Vcard_write',
|
|
38 VCARD
|
|
39 'SLA300' => 'Calcon::Sla300_write',
|
|
40 リナックスザウルス
|
|
41 'Address Book'=> 'Calcon::Vcard_Apple_write',
|
|
42 'AppleScript' => 'Calcon::iApp_write',
|
|
43 'iApp' => 'Calcon::iApp_write',
|
|
44 Mac OS X のiCal, Address Book, Applescript 経由です
|
|
45 'Entourage' => 'Calcon::Entourage_write',
|
|
46 Mac OS X のEntourage X, Applescript 経由です
|
|
47 'N702' => 'Calcon::Vcard_N702iD_write',
|
|
48 Docomo 携帯電話のVcard
|
|
49 'File' => 'Calcon::File_write',
|
|
50 独自のフラットファイルフォーマット (EUC)
|
|
51
|
|
52
|
|
53 使い方
|
|
54 perl calcon.pl -f from-format -t to-format file
|
|
55 ファイル名は最後でないとだめ。getops.pm の制限かな。perl calcon.pl -h
|
|
56 で対応するフォーマットの一覧がでます。format は識別できる最初の
|
|
57 一文字です。
|
|
58
|
|
59 同期ソフトではないので全部変換されます。同期したいときは、移動するデータ
|
|
60 を選択するものを別に書かないとだめだね。自分では Xcalendar 用は持っている
|
|
61 んだけど...
|
|
62
|
|
63 例題
|
|
64 Xcalendar から iCal にアップルスクリプト経由でデータを移動
|
|
65 perl calcon.pl -f x -t i ~/Calendar
|
|
66 Zaurus CFカードから、vcard format を生成
|
|
67 perl calcon.pl -f z -t v /Voluemes/NO_NAME/__zaurus/S*.BOX > all.vcs
|
|
68 perl calcon.pl -f z -t v /Voluemes/NO_NAME/__zaurus/A*.BOX > all.vcf
|
|
69 自分のテキスト形式のアドレス帳からMac OS X の Address Book へ
|
|
70 perl calcon.pl -t Add > all.vcf
|
|
71 open all.vcf
|
|
72
|
|
73 tips
|
|
74
|
|
75 Address Book, iCal に移す時には vcard 経由の方が高速です。
|
|
76 (旧)Address Book に移すときには、読みがなの関係でアップルスクリプトを使うべし。
|
|
77
|
|
78 iCalは変な漢字コードに敏感で読み落すのではなくて読み落ちるようです。
|
|
79 とりあえずは読んで欲しいよね。
|
|
80
|
|
81 SLA300は生成されたファイルを、
|
|
82 /home/root/Applications/addressbook/addressbook.xml
|
|
83 /home/root/Applications/datebook/datebook.xml
|
|
84 にコピーします。その時に、カレンダーとかアドレスブックが動いていては
|
|
85 いけません。
|
|
86
|
|
87 Zaurus のBOX format はversion 依存性が結構あるので読めないのも
|
|
88 多いかも。書き出しは、やっぱりできません。
|
|
89
|
|
90 option
|
|
91
|
|
92 -d デバッグ情報を出力する
|
|
93 -F カレンダーで未来の情報のみを出力する (Applescript は遅いので)
|
|
94 -c カレンダー情報のみを出力する
|
|
95 -a アドレス情報のみを出力する
|
|
96
|
|
97
|
|
98
|
|
99 ===================
|
|
100
|
|
101 The README is used to introduce the module and provide instructions on
|
|
102 how to install the module, any machine dependencies it may have (for
|
|
103 example C compilers and installed libraries) and any other information
|
|
104 that should be provided before the module is installed.
|
|
105
|
|
106 A README file is required for CPAN modules since CPAN extracts the
|
|
107 README file from a module distribution so that people browsing the
|
|
108 archive can use it get an idea of the modules uses. It is usually a
|
|
109 good idea to provide version information here so that people can
|
|
110 decide whether fixes for the module are worth downloading.
|
|
111
|
|
112 INSTALLATION
|
|
113
|
|
114 To install this module type the following:
|
|
115
|
|
116 perl Makefile.PL
|
|
117 make
|
|
118 make test
|
|
119 make install
|
|
120
|
|
121 DEPENDENCIES
|
|
122
|
|
123 This module requires these other modules and libraries:
|
|
124
|
|
125 blah blah blah
|
|
126
|
|
127 COPYRIGHT AND LICENCE
|
|
128
|
|
129 Put the correct copyright and licence information here.
|
|
130
|
|
131 Copyright (C) 2003 Shinji KONO
|
|
132
|
|
133 This library is free software; you can redistribute it and/or modify
|
|
134 it under the same terms as Perl itself.
|
|
135
|