Calcon version 0.01 Calendar/Address Book converter 河野真治 Zaurus なんかのアドレス帳やスケジュールを Mac OS Xのアドレスブックや iCalに移動するのに書きました。Entourageもapplescript 経由でできます。 書き出しは、Mac::Applescript module が必要です。CPANにあります。 Applescript は前もってアプリケーションを立ち上げる必要がある時が あるみたい。 入力フォーマット 'Zaurus' => 'Calcon::Zaurus_read', ザウルスのデータ CFにコピーするかで取り出した *.BOX ファイル SCHEDULE1.BOX, ADDRESS1.BOX などです。MI-C1,MI-110 は試しました。 'Backup Zaurus' => 'Calcon::Zaurus_backup_read', ザウルスのバックアップデータ *.BCK です。シリアル経由で取った ものも読めます。 'Xcalendar' => 'Calcon::Xcalendar_read', Unix X Window の xcalendar の旧フォーマット 'Vcard' => 'Calcon::Vcard_read', VCARD 'SLA300' => 'Calcon::Sla300_read', リナックスザウルス 'iApp' => 'Calcon::iApp_read', Mac OS X のiCal, Address Book, Applescript 経由です 'Entourage' => 'Calcon::Entourage_read', Mac OS X のEntourage X, Applescript 経由です アドレスは export したファイルも読めます。こちらの方が高速。 'File' => 'Calcon::File_read', 独自のフラットファイルフォーマット (EUC) 出力フォーマット 'Xcalendar' => 'Calcon::Xcalendar_write', Unix X Window の xcalendar の旧フォーマット 'Vcard' => 'Calcon::Vcard_write', VCARD 'SLA300' => 'Calcon::Sla300_write', リナックスザウルス 'AppleScript' => 'Calcon::iApp_write', 'iApp' => 'Calcon::iApp_write', Mac OS X のiCal, Address Book, Applescript 経由です 'Entourage' => 'Calcon::Entourage_write', Mac OS X のEntourage X, Applescript 経由です 'File' => 'Calcon::File_write', 独自のフラットファイルフォーマット (EUC) 使い方 perl calcon.pl -f from-format -t to-format file ファイル名は最後でないとだめ。getops.pm の制限かな。perl calcon.pl -h で対応するフォーマットの一覧がでます。format は識別できる最初の 一文字です。 同期ソフトではないので全部変換されます。同期したいときは、移動するデータ を選択するものを別に書かないとだめだね。自分では Xcalendar 用は持っている んだけど... 例題 Xcalendar から iCal にアップルスクリプト経由でデータを移動 perl -f x -t i ~/Calendar Zaurus CFカードから、vcard format を生成 perl -f z -t v /Voluemes/NO_NAME/__zaurus/S*.BOX > all.vcs perl -f z -t v /Voluemes/NO_NAME/__zaurus/A*.BOX > all.vcf tips iCal に移す時には vcard 経由の方が高速です。 Address Book に移すときには、読みがなの関係でアップルスクリプトを使うべし。 iCalは変な漢字コードに敏感で読み落すのではなくて読み落ちるようです。 とりあえずは読んで欲しいよね。 SLA300は生成されたファイルを、 /home/root/Applications/addressbook/addressbook.xml /home/root/Applications/datebook/datebook.xml にコピーします。その時に、カレンダーとかアドレスブックが動いていては いけません。 Zaurus のBOX format はversion 依存性が結構あるので読めないのも 多いかも。書き出しは、やっぱりできません。 option -d デバッグ情報を出力する -F カレンダーで未来の情報のみを出力する (Applescript は遅いので) -c カレンダー情報のみを出力する -a アドレス情報のみを出力する =================== The README is used to introduce the module and provide instructions on how to install the module, any machine dependencies it may have (for example C compilers and installed libraries) and any other information that should be provided before the module is installed. A README file is required for CPAN modules since CPAN extracts the README file from a module distribution so that people browsing the archive can use it get an idea of the modules uses. It is usually a good idea to provide version information here so that people can decide whether fixes for the module are worth downloading. INSTALLATION To install this module type the following: perl Makefile.PL make make test make install DEPENDENCIES This module requires these other modules and libraries: blah blah blah COPYRIGHT AND LICENCE Put the correct copyright and licence information here. Copyright (C) 2003 Shinji KONO This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.