admin」的全部文章

Nokia E65與Fedora 9 上的Evolution同步方法

我最近買了一台Nokia E65(因為以前的手機掉到地上一台變成兩台,沒救了,又等不到google的手機平台出現),這台機器蠻好用的,可惜鍵盤很小,要輸入資料的話會耗掉半條命。因此只能在大電腦上輸入,再靠同步的方式輸入手機。

不過Nokia原廠的程式只能與XP、Vista同步,其實一開始我並不討厭Vista,我的電腦也裝了一個Vista,但是Vista開機實在太慢了。加上我的Linux上面自從跑了VirtualBox、裝了XP之後,實在是不需要再開進去Vista。好啦!於是每次我都是因為要更新聯絡人或行事曆才忍耐好幾分鐘,等Vista開機,輸入完、同步完又開回Linux,這樣實在有點笨笨的。

 於是,昨天我下定決心要想辦法讓Nokia E65跟Linux上的Evolution同步,這樣我就可以完全擺脫Vista。很不幸的google裡面找到的東西都是 Ubuntu的說明(看來Fedora真的是危險了) ,害我自己K menu搞了一個晚上才搞定。為了怕忘記,再這裡寫個小抄。

第一步,先搞定藍芽連接

 yum install bluez-utils bluetooth gnome-bluetooth

 service bluetooth start

 vi /etc/bluetooth/hcid.conf  編輯一下內容,讓手機跟電腦配對上(蠻容易的,莫名其妙就好了)

用  sdptool browse  來看一下手機的藍芽 address

通常是 

00:17:E3:xx:xx:xx  這樣的形式

第二步,設定同步

先裝他個一大堆 opensync 的plugin

 yum install libopensync-plugin-evolution2.i386 libopensync-plugin-file.i386  libopensync-plugin-synce.noarch libopensync.i386 libopensync-devel.i386 libopensync-plugin-gnokii.i386 libsyncml-0.4.5-2.fc9.i386 libopensync-plugin-syncml-0.35-4.fc9.i386

然後開始

 msynctool –addgroup nok         建立group

msynctool –addmember nok evo2-sync        設定第一個成員是 evolution
msynctool –addmember nok syncml-obex-client     設定第二個成員是手機的控制系統
msynctool –configure nok 1    設定 evolution修改成

<?xml version="1.0"?>
<config>
  <address_path>file:///home/username/.evolution/addressbook/local/system</address_path>
  <calendar_path>default</calendar_path>
  <memos_path>default</memos_path>
  <tasks_path>default</tasks_path>
</config>
 

記得要把 username 改成自己的id,其實那一段就是定義自己的evolution資料庫放哪裡

msynctool –configure nok 2      設定手機的資訊

<?xml version="1.0"?>
<config>
  <!– (Only for bluetooth) The bluetooth address if the bluetooth mode is selected –>
  <bluetooth_address>00:17:xx:xx:xx:xx</bluetooth_address>

  <!– (Only for bluetooth) The bluetooth channel to use. `sdptool browse $MAC` to search for the correct channel –>
  <bluetooth_channel>14</bluetooth_channel>
 ……

 <recvLimit>10000</recvLimit>

  <maxObjSize>0</maxObjSize>

  <!– XXX: Currently you need to write this by your own.
       Later it’s planned to create such entries on the fly during
       the discovery() call. Example database field:
  –>

  <database>
     <name>Contacts</name>
     <objtype>contact</objtype>
     <objformat>vcard21</objformat>
  </database>
  <database>
     <name>Calendar</name>
     <objtype>event</objtype>
     <objformat>vevent10</objformat>
  </database>

紅色部份就是要改的,不過我還無法同步「待辦事項」,這個對我來說比較不重要….

msynctool –sync nok –conflict i           設定好了就可以同步了
 

 這個同步系統比較陽春(不過會成功就好了),需要自己處理一下衝突的狀況,上面那個 –conflict i 就是要求

如果兩筆資料一樣,就不要忽略不處理,不然每次都會問我要怎麼辦,這樣會回答的半死。

以後只要定期  msynctool –sync nok –conflict i   即可

繁星計畫DVD製作小抄

1.資料轉入: 必須下 update unv set txt=replace(txt,’‧’,”);  把「‧」刪除,否則會造成轉換錯誤

2.語言選擇: config.php GBCODE=1 就是簡體 GBCODE=0 就是繁體

3.字型檔案: 放在 home directory的 pfont與 gfont中,要複製到 parsing與 gparsing檔案中

4.default版面選擇: gen_hb.php裡面有兩個  if ($st==0 && $tab==1)  要同步修改,第一個st 控制strong number的位置、tab控制格式

5. 產生的指令 wget –timeout=300000 http://xxx.xxx.xxx.xxx/gen_hb.php &

要加 timeout,不然會出現問題

goole map上的 marker 上加註文字

這個問題我解了好久,簡單的作法是採用

 http://googlemapsbook.com/2007/01/22/extending-gmarker/

  http://googlemapsbook.com/2007/03/06/clickable-labeledmarker/

的解決方案

下載 http://google-maps-api.googlegroups.com/web/labeledMarker.js?gda=CyI1HkAAAAApUqsX-WXty5Tu-XmbEKmxnfu1955LlIyxx9ZaA58t_DE72RpmLLwWH5dSX_LoXxYH1DI0V7_0lrJuE6jdmmyJ

之後,用以下的方法引用即可

<script src="labeledmarker.js"
type="text/javascript"></script>

 ……

var point0 = new GLatLng(32.810166495054,35.448489560853);
var mark0=new LabeledMarker(point0,{title:"加利利",labelText:"加利利"});
map.addOverlay(mark0);