星期五, 12月 28, 2007

fix koha20071227

refs #49 修改 /intranet-cgi/acqui.simple/addbiblio.pl
refs #50 修正 acqui.simple/addbiblio.tmpl

[討論] Perl6 好像出來了

The Long Perl 6 Super-Feature List
http://www.perlfoundation.org/perl6/index.cgi?the_long_perl_6_super_feature_list

What Is Perl 6
http://www.perl.com/pub/a/2006/01/12/what_is_perl_6.html

http://dev.perl.org/perl6/

Perl 6 Users FAQ
http://perl.net.au/wiki/Perl_6_Users_FAQ

Cultured Perl: Perl 6 grammars and regular expressions
http://www-128.ibm.com/developerworks/linux/library/l-cpregex.html?ca=dgr-lnxw01Perl6Gram

[討論] Perl6 好像出來了

作者: redmist (....�N� ) 看板: Perl
標題: [討論] Perl6 好像出來了
時間: Thu Dec 27 21:17:38 2007

剛估到這個網頁
http://www.perlfoundation.org/perl6/index.cgi

其中有download Perl6
http://www.perlfoundation.org/perl6/index.cgi?download_perl_6

然後是Pugs的網頁,有教你怎麼裝pugs
http://jnthn.net/perl6/

Perl6似乎有許多神奇的功能?hypothetical variables和lazy evaluation等
之前沒聽過的東西,有空來玩看看


--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 218.168.133.77

星期二, 12月 25, 2007

20071226議程

1. 目前完成:

a. Koha 2.2.9(20071214)繁體中文釋出
b. Koha 2.2.9(20071214)安裝手冊
c. koha 介面語言支援

2. 待完成:

Koha 系統管理手冊

星期一, 12月 24, 2007

Parrot

Parrot is a virtual machine

http://www.parrotcode.org/

星期五, 12月 21, 2007

星期二, 12月 18, 2007

20071219議程

1. koha 229 完成 #9,#10, #12~#22, 未完成 #11, #24 // 優先處理
2. koha 3.0 完成 #23, #25, #25, #27, #28,未完成 #27 // 可延後
3. Koha 3.0 開放權限問題
4. 接著陸續完成手冊 // 優先處理
5. case study 還需要處理哪些 // 可延後

參考未完成
http://lit145.lacc.fju.edu.tw:8000/trac/report/1

參考完成
http://lit145.lacc.fju.edu.tw:8000/trac/report/6

星期五, 12月 14, 2007

Re: [kohataiwan] Koha-2.2.9(20071214)

##################################################################
#
# 軟體名稱:Koha-2.2.9(20071214)
# 版本:Beta
# 授權:GNU GPL
# 發佈者:游龍山 <long_sam.tw At yahoo.com.tw>
#
# 下載區:http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9.tgz

# 程式修正對應 trac ticket:
# refs 10,12,13,14,15,16,17,18,19,20,21,22
#

http://lit145.lacc.fju.edu.tw:8000/trac/

#
# 修正:
# 1. 安裝程式
# 2. 新增自動安裝程式
# 3. 修正 koha.mysql
# 4. 修正 marc(整合 thomas)
# 5. 自動產生 apache.conf, my.cnf 並備
# 份舊有設定檔,以時間命名。
# 6. 修正 mysql UTF-8
# 7. 修正 opac 語系選擇 // 再傳布景設定
# 8. 自動安裝請參考 scripts/misc/auto_install
#
# 測試環境:
#
# Ubuntu 6.10 Server
#
# 後續:
# 1. 完成安裝文件
#

http://koha.wikispaces.com/kohainstall610

# 2. 釋出正式版
# 3. 更新使用相關手冊
# 4. 修正 Koha 2.2.9 使用上 bug
#
# 附註:
#
# 1. Business::ISBN 使用 1.84
# 2. 為何不用 CPANPLUS,因為預設系統沒有安裝
#

http://search.cpan.org/~kane/CPANPLUS-0.82/lib/CPANPLUS.pm

# 3. 為何 mysql root 不直接在安裝程式設定,安全考慮
# 4. 為何不處理 CGI.pm 問題。採用 kochin@gmail.com 的作法,不要修
# 改 CGI.pm,直接修改 koha 的程式,正如 kochin 所說檔案需要修改很
# 多,我之後再開張 ticket 處理。目前先採用 escapeHTML() 方式。
# 5. 目前會先以 Koha 2.2.9 為主,Koha 3.0 需處理 zebra Token
# 而且,還有很多事要處理,Koha 3.0 才能算是 ok,當然你也可以不使用
# zebra。
#

http://lists.indexdata.dk/pipermail/zebralist/2007-October/001760.html

#
###################################################################

koha3.0

1. 安裝完後,移除 install
2. 安裝Algorithm::CheckDigits
3. opac http://lit184.lacc.fju.edu.tw:12000
4. staff http://lit184.lacc.fju.edu.tw:15000
5. ajac jQuery, YUI
6. SMS, SIP,xslt ...

星期一, 12月 10, 2007

Changing the working directory

In the shell you would type "cd /home" to change the workingdirectory to /home. You could write the following in your Perl script:

system("cd /home");

But it would have no effect. In fact, since the system call forksfrom the process used by the interpreter, it doesn't change the workingdirectory of your script. Instead, you can use a Perl function called"chdir":

chdir "/home";

http://www.linuxforums.org/programming/learn_perl_in_10_easy_lessons__lesson_5.html

星期五, 12月 07, 2007

Business::ISBN

1. koha 229 安裝 Business::ISBN -> 先使用 1.84,因為
URI 尚未更新 Business::ISBN 函示呼叫
2. QC koha 229 install

星期二, 12月 04, 2007

20071205議程

1. install docs // URI gisle
2. 開發流程 // http://koha.wikispaces.com/researchnotes
3. 成功案例
4. trac + svn
5. koha 3.0

java developer note

1. JCP, JSR // standard
2. CLDC, MIDP // mobile
3. Jxta // p2p
4. Swing // graphic
5. Java stream
6. Java EL & Regular expression
7. eclipse UML
8. JWSDP
9. JAX-RPC
10. Stubs, Ties

星期三, 11月 28, 2007

測試 blogger

測試 koha blogger 編輯

koha blogger

koha blogger email 測試


_____________________________________________________________________________________
馬上體驗全新Yahoo!奇摩電子信箱2.0。 http://tw.mg0.mail.yahoo.com/dc/landing

svn GUI

http://subdiversvn.sourceforge.net/
http://www.twobarleycorns.net/tkcvs.html


http://subversion.tigris.org/links.html#clients

20071128 議程

1. koha 文件進度(安裝手冊);保留最新,還是全部都保留
# Koha 2.2.9 繁體中文版安裝手冊(ubuntu 6.10)
2. 管控進度 PMP, QC & QA // http://en.wikipedia.org/wiki/Project_Management_Professional
# 文件一樣也要進入 QC & QA
# trac , svn
3. 文章(http://freelins.wikispaces.com)
# 專欄 linuxpliot && 學術期刊
# 完成 (Koha 圖書館資訊系統) http://koha.wikispaces.com/librariansmanual
# 機構典藏是否加入
4. 管理 news 使用 blog or wiki
# 保留會議記錄
# 工作事項

星期六, 11月 24, 2007

PMP

PMP
http://en.wikipedia.org/wiki/Project_Management_Professional

星期五, 11月 23, 2007

20071129會議議題

1. 文件更新進度
2. 成功案例
3. 推廣
4. 研發事項

Koha 2.2.9 繁體中文版安裝手冊(ubuntu 6.10)

進行 Koha 2.2.9 繁體中文版安裝手冊(ubuntu 6.10)文件撰寫

1. 內容修正
2. 圖重新抓取

koha wiki 網站

目前 koha wiki 網站架構為

1. 首頁
2. 文件
3. 成功案例
4. 推廣
5. 研發事項
6. 下載

星期四, 11月 22, 2007

koha wiki 網站整理

1. 文件 - 介紹文章, 手冊, 技術文件
2. 成功案例 -
3. 推廣計畫
4. 研發事項

星期四, 9月 27, 2007

星期四, 9月 13, 2007

Zebra Configuration

http://www.emilda.org/index.php?q=node/36
Sample Zebra Configurations

Below are some directives how to configure Zebra to comply with Emilda in an acceptable manner.

The first thing to be done is to decide where the Zebra folder is to be located. We recommend that you put it as a subfolder (zebra/) of the Emilda source folder. One reason not to have it there is when the Zebra database is bigger than the disk that the Emilda source folder is located on. In such cases, it might be a good idea to put it on a separate drive.

There are two ways to configure Zebra to comply with Emilda; either configuring it from the example files supplied with the Zebra source, or using the pre-configured setup supplied with Emilda.

When configuring from the examples supplied with Zebra, you need to put the USMARC example files into your zebra-root. They are normally located in test/ under the idzebra source folder. Additionally you need to put the tab/ folder from the idzebra source folder into your zebra-root. You can of course use a custom setup if you feel familiar with Zebra configuration.

Now we have a working environment where the "zebrasrv"-process can live and work, but this is not enough for Emilda as it uses attributes that are not defined in the default configuration supplied with Zebra. That is why we have supplied a tarball containing all the files that need to be replaced in your Zebra root folder and it can be downloaded from the same location you downloaded Emilda itself, named "emilda-zebra-folder-VERSION.tar.gz". Unpack the tarball in some arbitraty location, and copy the files to their appropriate locations (see below).

* zebra.cfg - The Zebra root folder (/path/to/emilda/zebra/zebra.cfg)
* bib1.att - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/bib1.att)
* usmarc.abs - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.abs)
* usmarc.tag - The tab/ subfolder of the Zebra root folder (/path/to/emilda/zebra/tab/usmarc.tag)

If you want to use our pre-configured zebra environment, download the tarball and extract into the location where you want your zebra-root to exist. This tarball contains all necessary files for Zebra to work with Emilda, so no configuration should be needed.

Before starting Zebra, we need to create a folder where the MARC-records are to be stored. In our examples it is called records/ and it is located in the Zebra root folder (/path/to/emilda/zebra/records/). What is important with this folder is that both the Zebra process and Apache need to have write access to it. This can be achieved e.g. by running the "zebrasrv"-process as the Apache user and only giving the Apache user write access to records/, or by giving write access to records/ to both Apache and the user running the "zebrasrv"-process. There is no favourable way to do this, both work just as well.

After deciding on which method to use, we are ready to prepare Zebra for running; Zebra needs to init and index the records/ folder before we start the process. If you have any records that you wish to import into Emilda, you need to copy these into the records/ folder before running these commands. (If you afterwards want to import MARC-recods, you copy them into the recods/ folder and run these commands.) However, remember that the Items that the records in the records/ folder represent need to be added into the SQL database before Emilda can use them.

1. Go into the Zebra root folder: "cd /path/to/emilda/zebra/
2. Init Zebra: "zebraidx init"
3. Index the records/ folder: "zebraidx -g emilda update records"
4. Commit results into shadow: "zebraidx commit"
5. Start the zebrasrv-process: "zebrasrv -l /path/to/log @:9999"

This should give you a working environment with Emilda and Zebra.

NOTE!
If the records/ folder is empty, there will be an error of the type

Unsupported Use attribute: 7

which should not show up after the first record has been added. If it persists there is something odd going on - try to check if you have done everything according to the above instructions, or send a note to the Emilda mailing list.

星期日, 9月 02, 2007

Slides from conference presentations

Scaling MySQL and PHP by Jeremy Zawodny, presented at the 2002 PHP Conference
http://jeremy.zawodny.com/mysql/scaling-mysql-and-php.html

Managing MySQL Replication by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/managing-mysql-replication.html

MySQL Backup and Recovery by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-backup-and-recovery.html

MySQL Optimization by Jeremy Zawodny, presented at the 2002 O'Reilly Open Source Conference
http://jeremy.zawodny.com/mysql/mysql-optimization.html

MySQL Cluster

MySQL Cluster: Two webserver setup
http://dev.mysql.com/tech-resources/articles/mysql-cluster-for-two-servers.html

Advanced MySQL Replication Techniques
http://dev.mysql.com/tech-resources/articles/advanced-mysql-replication.html

Chapter 16. MySQL Cluster
http://dev.mysql.com/doc/refman/5.0/en/mysql-cluster.html

Getting started with MySQL Proxy
http://dev.mysql.com/tech-resources/articles/proxy-gettingstarted.html

A.14.4. DRBD and MySQL Replication
http://dev.mysql.com/doc/refman/5.1/en/drbd-virtualization.html

星期五, 8月 31, 2007

mysql master slave

mysql support master slave
+ rand
Master => rw
slave => slave

星期四, 8月 30, 2007

package

cpan -i Bundle::KohaSupport Unicode::String Encode::HanExtra XML::SAX Class::Accessor Business::ISBN PDF::API2 MARC::Record MARC::File::XML XML::Simple Date::Calc GD::Barcode Data::Random PDF::Reuse::Barcode Text::Wrap Text::Trim LWP::Simple MARC::Charset Net::LDAP ZOOM

apt-get install -y mysql-server-4.1 php4 libapache2-mod-auth-mysql php4-mysql phpmyadmin libxml2-dev libssl-dev libwrap0-dev libdate-manip-perl libhtml-template-perl libmail-sendmail-perl make gcc lynx wget ncftp unzip libssl0.9.7 libxslt1-dev libyaz3 yaz libyaz libyaz-dev yaz-doc libgcrypt11-dev

DBD
libmysqlclient14 libmysqlclient14-dev

星期日, 8月 26, 2007

koha 2.2.9 for ubuntu 6.10 中文版釋出公告

本版本釋出遵從 GNU GPL 授權
一共分成兩種版本

1.簡單 CMARC
http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9-simple.tar.gz

2.完整 CMARC(thomas 提供)
http://groups.google.com.tw/group/kohataiwan/web/koha-2.2.9-full.tar.gz

系統環境為 ubuntu 6.10
網頁伺服器 apache2.0.55-4ubuntu4
perl 5.8.8-6
mysql 4.1.15-1ubuntu5
關於 mysql-5.0 支援 foreign key,所以很多程式
需要重新改寫,才能正常使用。

修正 OPAC
1.左邊導覽列
2.查詢切截功能
3.css 功能

修正 Intranet

1.z3950 檢索功能
2.補齊 CMRAC 功能
3.指標功能中文化
4.系統參數中文化
5.權限參數中文化
6.修正 Encode::HanExtra(cccii.ucm)感謝唐鳳

其餘
1.修正 ubuntu package
2.修正 perl Modules
3.修正 install 相關程式
4.sources.lst

ps. 如果有 proxy,安裝前請先設定
export http_proxy="http://yourproxy:3128"

demo site:天主教輔仁大學圖書資訊學系系館
http://koha.lins.fju.edu.tw

若有任何 bug 請 e-mail kohataiwan@googlegroups.com

星期六, 8月 25, 2007

koha 2.2.9 for ubuntu package

finish
installer.pl
Install.pm
sources.list
CGI.pm


1. modify z3950 search
2. modify leader editor & inc
3. config cmarc
4. export mysql

apt sources.lst

deb http://free.nchc.org.tw/ubuntu edgy main restricted universe multiverse
deb http://ftp.indexdata.dk/debian indexdata/sarge released
deb-src http://ftp.indexdata.dk/debian indexdata/sarge released

星期三, 8月 22, 2007

package koha229 for ubuntu 6.10 (cmarc)

1.install koha229 for ubuntu 6.10
2.import cmarc & setup config
3.modify perl script for chinese
4.test koha & modify install.pm
5.release chinese notes
6.package koha

星期二, 8月 21, 2007

Encode::HanExtra

update Encode::HanExtra

split.pl
open(CCCII, "/home/laxendion/tools/UNI_CI_V3.txt");
open(NEW,"> /home/laxendion/tools/UNI.txt");

foreach (){
($Uni,$Cii,$other) = split (/,/,$_);
$Uni =~ /(\d)(\w)(\w)(\w)(\w)/g;
if ($1 == 0){
$Uni = "";
$Cii =~ s/(\w\w)(\w\w)(\w\w)/\\x$1\\x$2\\x$3/g;
$other = "|0";
print NEW "$Uni $Cii $other\n";
}
elsif ($1 == 2){
$Uni = "";
$Cii =~ s/(\w\w)(\w\w)(\w\w)/\\x$1\\x$2\\x$3/g;
$other = "|0";
print NEW "$Uni $Cii $other\n";
}
}
close(CCCII);
close(NEW);

send to 唐鳳
cccii.ucm
http://kohataiwan.googlegroups.com/web/cccii.ucm

星期二, 8月 14, 2007

koha 2.2.9 modify

1.修正 z3950 cccii

delete /scripts/z3950daemon/*
stop z3950-daemon-launch.sh
/intranet/cgi-bin/z3950/search.pl

2.修正
authorised_values.sql
marc_subfield_structure.sql
marc_tag_structure.sql

http://groups.google.com.tw/group/kohataiwan/files?hl=zh-TW
http://140.136.153.210/cgi-bin/koha/opac-main.pl

星期一, 8月 13, 2007

css

intranet.liblime.css
colors.css
opac-layout.liblime.css
opac-colors.css

星期一, 7月 30, 2007

z39.50

Z39.50 RFC
http://www.rfc-editor.org/cgi-bin/rfcsearch.pl

http://www.bios.csie.ncnu.edu.tw/scripts/shlin/index.asp?CID=206&View=&UID=

星期一, 7月 23, 2007

星期日, 7月 22, 2007

perlvar 特殊變數

http://linux.die.net/man/1/perlvar

man perlvar

koha228 modules

apt-get install -y mysql-server-4.1 php4 libapache2-mod-auth-mysql php4-mysql phpmyadmin libxml2-dev libssl-dev libwrap-dev libdate-manip-perl libhtml-template-perl libmail-sendmail-perl make gcc lynx wget ncftp unzip

apt-get install libssl0.9.7 libxslt1-dev libyaz libyaz-dev libyaz3 yaz yaz-doc
libgcrypt11-dev


cpan -i Bundle::KohaSupport Unicode::String Encode::HanExtra XML::SAX Class::Accessor Business::ISBN Net::LDAP PDF::API2 MARC::Record MARC::File::XML XML::Simple Date::Calc
ZOOM GD::Barcode Data::Random PDF::Reuse::Barcode Net::LDAP

星期四, 7月 19, 2007

koha 2.2.9 for ubuntu 6.10

modify /opac/temp/npl/includes/doc-head-close.inc

@import url();

change to

@import url(/includes/);

chanage z3950
npl/temp/z3950/searchresult.tmpl

to

default/temp/z3950/searchresult.tmpl

星期五, 6月 22, 2007

[Koha-devel] Announcing Koha Project Day 發佈Koha 計畫 2007/6/16

http://lists.gnu.org/archive/html/koha-devel/2007-06/msg00013.html

哈羅各位!

Liblime 的管理團隊,很高興宣佈一項提議促進社群發展以及koha計畫的成長。
截至本週,每個星期天在 Liblime 是Koha 計畫日(針對紐西蘭員工則是星期一)。

當然,在這一個星期裡,我們 Liblime 會花大部分時間針對我們的客戶:撰寫規格
、作一些研發工作、實作以及支援。Koha 計畫日給我們一個歸還社群的機會 -- 社群
可以讓所有變成可能!

禁止任何緊急支援請求,或是最後一刻提案,我們打算 koha 計畫日,集中精力完全
放在koha 計畫本身 -- 每一個星期。


We'd like to extend the invitation to you, dear community. Join us
any time on any Sunday and pitch in. Or, alternatively, pick a
regular day/time that you find convenient and announce it to the rest
of the community. It's strictly voluntary of course (for our staff
too), so if you're unable to participate, we won't hold a grudge :-).
But if you're able, join us and help out, there's plenty to do.

Speaking of which, what is there to do? Glad you asked. Here's just
a partial list:

* organize and write documentation
* write specifications for new proposed features
* write technical documentation for existing Koha features
* respond to questions/comments on the Koha lists
* test features and report bugs
* fix bugs :-)
* read through the code and make comments
* translate Koha into your native language
* write that new feature you thought of
* talk to the developers and tell them how to improve Koha

Where is all of this happening? Well, you can join us in real time
on the #koha channel on irc.katipo.co.nz. If you've not used IRC
before, and you're running Windows, give mIRC a shot:

http://www.mirc.com/

Well, that sums it up. Our first Koha Project Day starts tomorrow
morning at 9:00am here in Ohio and runs for 15 hours to 5:00pm
in New Zealand. If you're around, pop in and say hello :-)

[Koha-devel] Naming Conventions 命名常規 2007/6/17

http://lists.gnu.org/archive/html/koha-devel/2007-06/msg00012.html

哈羅!各位

前鎮子,我張貼一個問題到論壇,詢問在你的圖書館裡,命名的常規,指得像似讀者
(patrons)/瀏覽者(borrowers)/使用者(uesrs)/等等,謝謝各位的回應!
絕大部分你會使用讀者(patrons),於是,我建議要改變 koha 預設大部分佈景呈現
的命名常規。

在你們之中,命名常規已經有一些回應,例如:登出(check-out)和登入(check-in)被
使用超過借出(issue)和歸還(return)。我已經從一些北美展示的圖書館,得到相同的
回應,所以我想要修正預設的佈景,來回應這些。

當然,在我們靈活的翻譯架構,在你的 koha安裝,這是一個相當瑣碎程序改變用語,
如果你喜歡目前的常規。

有沒有人反對?

koha-devel Paul POULAIN 2007/6/15 法國進度

http://lists.gnu.org/archive/html/koha-devel/2007-06/msg00011.html

法國已經有兩個圖書館使用 Koha 3.0(cvs head),一個是由 koha 2.2
升級而來的,而且運作非常好(至少在 UNIMARC),Paul 已經把詳細
步驟寫在 wiki http://wiki.koha.org/doku.php?id=22_to_30&do=diff1182268250
,同時也寫好文件,描述 Koha 3.0 情況。

  1. http://www.koha-fr.org/IMG/pdf/nouveautes_koha3.pdf
  2. http://www.koha-fr.org/IMG/pdf/koha_3_copies_ecran_6_dec_06.pdf

假如有自願者想翻譯法文 -> 英文,可以跟 Paul 要求 Openoffice.org 版本,
大概有 33 頁。

星期五, 3月 09, 2007

zoom.pl nbinet.ncl.edu.tw marc

#!/usr/bin/perl -w

use ZOOM;
use MARC::Record;
use Encode;
use MARC::Batch;

$conn = new ZOOM::Connection("nbinet.ncl.edu.tw:210/innopac");
#$conn = new ZOOM::Connection("140.136.208.1:210/innopac");
print("主機:",$conn->option("serverImplementationName"),"\n");
$conn->option(preferredRecordSyntax => "usmarc");
#$rs = $conn->search_pqf('@attr 1=4 perl');
#$ss = $conn->scan('@attr 1=1003 a');

# if ($conn->errcode() != 0) {
# die("somthing went wrong: " . $conn->errmsg())
# }
# $conn->destroy();
# $rs = $conn->search_pqf('@attr 1=7 957493327X');
$rs = $conn->search_pqf('@attr 1=4 @attr 4=107 100');
my $n = $rs->size();
for my $i (1 .. $n) {
$rec = $rs->record($i-1);

# print $rec->render(); $rec->raw();
# print $rec->raw() . "\n";
# print "========================\n";

my $b = $rec->raw();
my $l =length ($b);
my $transl= '';
my $status = 0;
my $tmp ='';


for ($i=0; $i<$l; $i++) {
my $key = substr($b,$i,1);
if ($status == 0){
if (ord($key) != '27') {
$transl=$transl.$key;
}
else
{
$status = 1;
}
}
if ($status == 1){
if (ord($key)==36){ $status = 2; }
}
if ($status == 2) {
if (ord($key)==49){
$status = 3;
$count = -1 ;
}
}
if ($status == 3) {
if (ord($key) == '27' )
{ $status = 4;}
else {
if ($count == -1 ) {
$count = 0;
}
else {
$tmp=$tmp.$key;
}
}
}

if ($status == 4) {
if (ord($key) ==40) { $status = 5 ;}
}
if ($status == 5) {
if (ord($key) == 66) { $status = 6;}
}
if ($status == 6) {
$transl=$transl.decode('cccii',$tmp);
$status = 0;
$tmp='';
}
}
print $transl;
# $rec->render() => usmarc, $rec->raw() => iso2709
#print decode('cccii',$rec->raw()) , "\n";
}

星期三, 3月 07, 2007

cccii convert utf8

#!/usr/bin/perl -w

use ZOOM;
use MARC::Record;
use Encode;
use MARC::Batch;

$conn = new ZOOM::Connection("nbinet.ncl.edu.tw:210/innopac");
#$conn = new ZOOM::Connection("140.136.208.1:210/innopac");
print("主機:",$conn->option("serverImplementationName"),"\n");
$conn->option(preferredRecordSyntax => "usmarc");
#$rs = $conn->search_pqf('@attr 1=4 perl');
#$ss = $conn->scan('@attr 1=1003 a');

# if ($conn->errcode() != 0) {
# die("somthing went wrong: " . $conn->errmsg())
# }
# $conn->destroy();
$rs = $conn->search_pqf('@attr 1=7 957493327X');
my $n = $rs->size();
for my $i (1 .. $n) {
$rec = $rs->record($i-1);

# print $rec->render(); $rec->raw();
# print $rec->raw() . "\n";
# print "========================\n";

my $b = $rec->raw();
my $l =length ($b);
my $transl= '';
my $status = 0;
my $tmp ='';


for ($i=0; $i<$l; $i++) {
my $key = substr($b,$i,1);
if ($status == 0){
if (ord($key) != '27') {
$transl=$transl.$key;
}
else
{
$status = 1;
}
}
if ($status == 1){
if (ord($key)==36){ $status = 2; }
}
if ($status == 2) {
if (ord($key)==49){
$status = 3;
$count = -1 ;
}
}
if ($status == 3) {
if (ord($key) == '27' )
{ $status = 4;}
else {
if ($count == -1 ) {
$count = 0;
}
else {
$tmp=$tmp.$key;
}
}
}

if ($status == 4) {
if (ord($key) ==40) { $status = 5 ;}
}
if ($status == 5) {
if (ord($key) == 66) { $status = 6;}
}
if ($status == 6) {
$transl=$transl.decode('cccii',$tmp);
$status = 0;
$tmp='';
}
}
print $transl;
# $rec->render() => usmarc, $rec->raw() => iso2709
#print decode('cccii',$rec->raw()) , "\n";
}

new project copy trad-chinese zh_TW marc

new koha project
mirror all http://nbinet.ncl.edu.tw/ marcdata to koha breedings
about 5 million records,these marcdatas have to decode cccii to
utf8.

use perl script & modules
innopac use " { "cccii code " } "

innopac cccii

連接 INNOPAC 圖書館的CCCII編碼方式已經解決了, 他們是用 "{}"
來把每一個字括起來

eg.

字1,字2 = { + 字1 + } + { + 字2 + } = {212321}{212324}

星期二, 3月 06, 2007

catalog

http://140.136.208.1/search/.b1002201/.b1002201/1,1,1,B/marc~b1001204?save=b1001204/++export/1,-1,-1,B/export?ex_format=50&ex_device=43

http://140.119.115.1:1080/search/.b1799783/.b1799783/1,1,1,B/marc~b1799780?save=b1799780

http://140.119.115.1:1080/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45

http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45

http://tulips.ntu.edu.tw/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780

http://tulips.ntu.edu.tw/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45

http://140.136.208.1/search/.b1002201/.b1002201/1,1,1,B/marc~b1001204?save=b1001204/++export/1,-1,-1,B/export?ex_format=50&ex_device=43

http://140.119.115.1:1080/search/.b1799783/.b1799783/1,1,1,B/marc~b1799780?save=b1799780

http://140.119.115.1:1080/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45

http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45

http://140.119.115.1:1080/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780

fetch innopac

1.save tmp
http://140.119.115.1:1080/search/.a1/.a1/1,1,1,B/marc~b1799780?save=b1799780
2.export
http://140.136.208.1/search/.a1/++export/1,-1,-1,B/export?ex_format=50&ex_device=45
save file
ex_format=50 => MARC
ex_format=47 => Full Display
ex_format=6 => Brief Display

ex_device=45 => local disk
ex_device=44 => e-mail
ex_device=43 => screen
ex_format=50&ex_device=44&email_addx=long_sam.tw%40yahoo.com.tw&email_subj=From+the+library+catalog

catalog spider

create catalog spider
fetch nbinet cmarc for unicode
import iso2709 koha breedings

星期日, 3月 04, 2007

unimarc print

#!/usr/bin/perl -w

use MARC::Batch;

my $batch = MARC::Batch->new('USMARC','/home/laxendion/tools/iso/new1.dat');
while( my $record = $batch->next()) {

my @fields = $record->fields();
foreach my $field (@fields) {
print
$field->tag(), " ",
defined $field->indicator(1) ? $field->indicator(1) : "",
defined $field->indicator(2) ? $field->indicator(2) : "",
" ", $field->as_string, " \n";
}
}

unimarc 681 convert 805

#!/usr/bin/perl -w

use MARC::Record;
use MARC::Batch;

my $batch = MARC::Batch->new('USMARC','/home/laxendion/tools/iso/marc');
open(OUT,'> new1.dat') or die $!;
$batch->strict_off();
## read in each record.
while ( my $record = $batch->next() ) {
##fetch 852h
#my $good = $record->field('681');
#my $goodsub = $good->subfield('a');
#$record->subfield(681,"a");
## find the tag after 900.
my $class = $record->field('681')->subfield("a");
my $before;
foreach ($record->fields()) {
$before = $_;
last if $_->tag() > 800;
}

## create the 942 field.
my $new = MARC::Field->new('805','','','d' => $class);
## insert our 942 field after the $before.
$record->insert_fields_before($before,$new);
print $class . "\n";
## and print out the new record.
print OUT $record->as_usmarc();

}

An example perl script to move 852h >dewey< to 942k dewey default for Koha2.2

http://wiki.koha.org/doku.php?id=herea

## Example U2 this is a modified script with thanks to the MARC::Record
## designers and documentation group

use MARC::Batch;
my $batch = MARC::Batch->new('USMARC','/home/mike1/lib4per/MICRO.new');
open(OUT,'>new1.dat') or die $!;
$batch->strict_off();
## read in each record.
while ( my $record = $batch->next() ) {
##fetch 852h
my $good = $record->field('852');
my $goodsub = $good->subfield('h');
## find the tag after 900.
my $before;
foreach ($record->fields()) {
$before = $_;
last if $_->tag() > 900;
}

## create the 942 field.
my $new = MARC::Field->new('942','','',k=>$goodsub);

## insert our 942 field after the $before.
$record->insert_fields_before($before,$new);

## and print out the new record.
print OUT $record->as_usmarc();

}

星期六, 3月 03, 2007

koha 3.0 opac for zebra

1.install koha 2.2.5 & koha 2.2.6 ...
2.cp nkes Koha => your Koha
and run rel_3_0/koha/updater/updater/updatedatabase

3.setup zebra
http://wiki.koha.org/doku.php?id=installingzebraplugin226
http://wiki.koha.org/doku.php?id=faqzebra
zebra.cfg
http://kohaa.blogspot.com/2007/02/zebracfg.html

PS. cvs dev_week
cp dev_week/koha/zebraplugin/zebradb/biblios/tab/* to your zebra/etc/*
4.cvs koha rel_3_0
cp /opac/*.pl -> /opac/cgi-bin/
http://kohataiwan.googlegroups.com/web/prog_opac_zh_TW.po
http://koha.wikispaces.com/chinesenization

5.export nkes marc iso2709

6.Must have zebra.cfg config directory(zebra-XXX.cfg
use -c parameter)

copy zebrapl
zebra init
zebra create biblios(databaename see your koha.xml)
zebra -g iso2709 -d biblios(databaename see your koha.xml) update
iso2709.marc(marc data) -n
zebra -f /etc/koha.xml

koha.xml(see rel_3_0 /misc/koha.xml)

7.modify koha-httpd.conf
opac
chanage SetEnv KOHA_CONF /etc/koha.xml
and restart apache
--------------------------------------------------------------------
chanage systempreferences
opacthemes => prog
lang =>zh_TW
opacstylesheet => /opac-tmpl/prog/zh_TW/includes/opac.css
marcflavour => unimarc check your marc type

PS.MARCXML /misc/migration_tools/22_to_30/move_marc_to_biblioitems.pl
you use unimarc must modify scipt,marc21 don't modify
=> marcxml parser problem
see http://www.indexdata.com/zebra/doc/

星期三, 2月 28, 2007

modify zebra isbn

marc_subfield_table.sql

星期一, 2月 26, 2007

發自博客來網路書店

這個訊息是發自博客來網路書店,
告知您策略聯盟的審核已經通過!

【基本資料】
申請日期:2007-02-17 09:18:00
申請帳號:laxendion
網站名稱:南投縣國姓鄉南港國小圖書館
網  址:http://koha.nkes.ntct.edu.tw
網站描述:南投縣國姓鄉南港國小圖書館


【 合作內容】
合約日期:2007/02/26-2008/02/26
(合約到期15天前,系統會發信詢問您是否續約)
回饋分類:無仲介金行銷引薦
回饋金%:


 



==========================
如有任何問題,歡迎來信詢問
ap@books.com.tw
博客來網路書店 敬上
==========================  

星期六, 2月 24, 2007

koha3.0

perl libxml

[Sat Feb 17 11:21:53 2007] [error] [client 127.0.0.1] Start tag expected, '<' not found at /usr/local/lib/perl/5.8.7/XML/LibXML/SAX.pm line 64
[Sat Feb 17 11:21:53 2007] [error] [client 127.0.0.1] at /usr/local/share/perl/5.8.7/XML/Simple.pm line 291

/etc/koha-httpd.conf
SetEnv KOHA_CONF "/etc/koha.xml"

星期五, 2月 16, 2007

zebra command

1. zebraidx init
2. zebraidx create database
3. zebraidx -g iso2709 -d databae update /path/to/marc -n
4. zebraidx commit
5. zebrasrv @:2100

nkes

[nkes]Record type: USmarc
00691cam 2200229 4500
010 0 $a 957-754-154-2 $b 精裝
090 $9 1019 $a 1019
100 $a 20020412d1995 m y0chiy09 e.
101 0 $a chi
102 $a TW
105 $a y z 000fd.
200 1 $a 木魚石 $e 嘉慶皇帝傳奇 $f 林鐵均著.
205 $a 初版.
210 $a 臺北市 $c 國際村出版 $a 板橋市 $c 錦德發行 $d 1995[民84]
215 0 $a 217面 $d 22公分.
225 2 $a 清帝傳奇 $v 11.
606 $a 中國
700 1 $a 李
801 $a TW $b nges $g CCR $m 4
805 $a nges $d 627 $e 3024 $y v.7 $t CCL $v 增訂七版
990 $a BOOK
995 $b nges $c nges $e 中文書庫 $f A01139 $j A01139 $k 627 3024 v.7 $m 20060624 $o 0 $9 1313
--------------------------------------------------------------------------

zebra cfg

http://lists.gnu.org/archive/html/koha-devel/2005-08/msg00057.html

http://www.unt.edu/wmoen/Z3950/GIZMO/section3.htm


http://lists.indexdata.dk/pipermail/zebralist/2005-June/000800.html

GRS-1

[demo]Record type: GRS-1
(3,001) 101445213
(3,010)
(3,0 )
(3,b) 平裝
(3,d) 人民幣2.35元
(3,050)
(3, )
(3,a) 101445213
(3,100)
(3, )
(3,a) 20030718d1986 k y0chib09 e
(3,101)
(3,0 )
(3,a) chi
(3,102)
(3, )
(3,a) cn
(3,105)
(3, )
(3,a) a a 000yy
(3,200)
(3,1 )
(3,a) 系統辨識導論
(3,f) 徐南榮著
(3,205)
(3, )
(3,a) 第1版
(3,210)
(3, )
(3,a) 北京市
(3,c) 電子工業出版社
(3,d) 1986
(3,215)
(3,0 )
(3,a) 212面
(3,c) 圖
(3,d) 26公分
(3,300)
(3, )
(3,a) 簡體字本
(3,300)
(3, )
(3,a) 高等學校教材
(3,320)
(3, )
(3,a) 含參考書目
(3,517)
(3,1 )
(3,a) 系统辨识导论
(3,z) chi
(3,606)
(3, )
(3,2) csh
(3,a) 科學
(3,x) 哲學, 原理
(3,681)
(3, )
(3,a) 301
(3,b) 8556
(3,v) 增訂七版
(3,700)
(3, 1)
(3,a) 徐
(3,b) 南榮
(3,801)
(3, 0)
(3,a) cw
(3,b) 國圖
(3,c) 20060301
(3,g) CCR
(3,801)
(3, 1)
(3,a) cw
(3,b) 國圖
(3,c) 20060301
(3,g) CCR

zebra.cfg

# Simple Zebra configuration file that defines
# a database with MARCXML records.
# $Id: zebra-biblios.cfg,v 1.1.2.2 2006/10/05 20:50:52 kados Exp $
#
# Where are the config files located?
modulePath:/usr/local/lib/idzebra-2.0/modules/
#profilePath:/usr/share/idzebra-2.0/tab/
profilePath:${srcdir:-.}:/home/laxendion/tools/cvs/dev_week/koha/zebraplugin/zebradb/biblios/tab/

encoding: utf-8

# Files that describe the attribute sets supported.
attset: bib1.att
attset: explain.att
attset: gils.att

systag sysno rank
# Specify record type
iso2709.recordType:grs.marcxml.record
iso2709.recordType: grs.marc.unimarc
recordType:grs.xml
#recordId: (bib1,Identifier-standard)
#recordId: (bib1,Local-number)
elm 001 local-number !
storeKeys:1
storeData:1


# Lock File Area
lockDir: /home/zebra/zebradb/biblios/lock
perm.anonymous:rw
#perm.kohaadmin:rw
#passw.kohalis
register: /home/zebra/zebradb/biblios/register:1G
shadow: /home/zebra/zebradb/biblios/shadow:1G

# Temp File area for result sets
setTmpDir: /home/zebra/zebradb/biblios/tmp

# Temp File area for index program
keyTmpDir: /home/zebra/zebradb/biblios/key

# Approx. Memory usage during indexing
memMax: 40M

MARC::File::XML

http://lists.gnu.org/archive/html/koha-devel/2006-05/msg00036.html

Hi everyone,

Just providing an update on this issue. As you may recall, I've
been putting the MARC::Record suite, specifically MARC::File::XML
and MARC::Charset, through some fairly rigourous tests, including
a 'roundtrip' test, which converts the binary MARC-8 records to
MARCXML / UTF-8 and then back to binary MARC but encoded as UTF-8.
This test is available here:

http://liblime.com/public/roundtrip.pl

I discovered a number of bugs or issues, not in the MARC::* stuff, but in the
back-end SAX parsers. I'll just summarize my discoveries here for
posterity:

1. MARC::File::XML, if it encounteres unmapped encoding in a
MARC-8 encoded binary MARC file (in as_xml()) will drop the entire
subfield where the improper encoding exists. The simple solution is
to always use: MARC::Charset->ignore_errors(1); if you expect your
data will have improper encoding.

2. the XML::SAX::PurePerl parser cannot properly handle combining
characters. I've reported this bug here:

http://rt.cpan.org/Public/Bug/Display.html?id=19543

At the suggestion of several, I tried replacing my default system
parser with expat, which cause another problem:

3. handing valid UTF-8 encoded XML to new_from_xml() sometimes
causes the entire record to be destroyed when using XML::SAX::Expat
as the parser (with PurePerl these seem to work). It fails with
the error:

not well-formed (invalid token) at line 23, column 43, byte 937 at
/usr/lib/perl5/XML/Parser.pm line 187

I haven't been able to track the cause of this bug, I eventually
found a workaround that didn't result in the above error, but instead,
silently mangled the resulting binary MARC record on the way out:

4. Using incompatible version of XML::SAX::LibXML and libxml2 will
cause binary MARC records to be mangled when passed through new_from_xml()
in some cases. The solution here is to make sure you're running
compatible versions of XML::SAX::LibXML and libxml2. I run Debian
Sarge and when I just used the package maintainer's versions it
fixed the bug. It's unclear to me why the binary MARC would be
mangled, this may indicate a problem with MARC::* but I haven't
had time to track it down and since installing compatible versions
of the parser back-end solves the problem I can only assume it's
the fault of the incompatible parsers.

Issues #3 and #4 above can be replicated following batch of records
through the roundtrip.pl script above:

http://liblime.com/public/several.mrc

If you want to test #2, try running this record through roundtrip.pl:

http://liblime.com/public/combiningchar.mrc

BTW: you can change your default SAX parser by editing the .ini file ...
mine is located in /usr/local/share/perl/5.8.4/XML/SAX/ParserDetails.ini

So the bottom line is, if you want to use MARC::File::XML in any
serious application, you've got to use compatible versions of the
libxml2 parser and XML::SAX::LibXML. Check the README in the perl
package for documentation on which are compatible...

Maybe a note somewhere in the MARC::File::XML documentation to point
these issues out would be useful. Also, it wouldn't be too bad to have
a few tests to make sure that the system's default SAX parser is capable
of handling these cases. Just my two cents.

Cheers,

zebra unimarc

[biblios]Record type: USmarc
00765nam0 2200253 4500
001 89017875
010 0 $a 957-33-1758-3 $b 平裝
090 $9 13 $a 13
100 $a 20001123d2000 k y0chiy09 e.
101 1 $a chi
102 $a US
105 $a a z 000ay.
200 1 $a 哈利波特 $e 消失的密室 $f J. K. 羅琳(J. K. Rowling)著 $g 彭倩文譯.
205 $a 初版.
210 $a 臺北市 $c 皇冠文化 $d 2000[民89]
215 0 $a 396面 $d 21公分.
225 1 $a 皇冠叢書 $v 第3063種.
225 1 $a Choice $v 36.
700 1 $a 羅林
702 1 $a 彭
801 0 $b lins $c 20010223 $g AACR
805 $f c33 $f c26.
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 2 $j 2 $k 2 $o 0 $9 10
--------------------------------------------------------------------
[biblios]Record type: USmarc
00631nam0 2200205 4500
010 0 $a 4335352514 $b 精裝
090 $9 23 $a 23
100 $a 20060526d2005 k y0chiy09 e
101 0 $a jpn
102 $a US
105 $a y z 000yy
200 1 $a 消費者契約の法理論 $f 後藤卷則著
205 $a 初版
210 $a 東京 $c 弘文堂 $d 2002[民91]
215 0 $a 370面 $d 22公分
606 $a 消費者保護
700 $a 後藤
801 0 $b lins $c 20060526 $g CCR
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 18 $j 18 $k 222 22 $m 20050311 $o 0 $9 20
-------------------------------------------------------------------------
[biblios]Record type: USmarc
00699cam0 2200229 4500
001 100141393
010 0 $b 平裝
090 $9 35 $a 35
100 $a 19890421d1984 k a0chib09 e
101 0 $a chi
102 $a US
105 $a a z 000yy
200 1 $a 最新臺灣公路指南 $f [南華出版社編輯部編]
210 $a 臺北市 $c 南華 $d 民73
215 0 $a 60面 $d 9 x 18公分
606 $a 公路
712 02 $a 南華出版社
801 0 $b lins $c 19970417 $g CCR
801 0 $b lins $c 19970417 $g CCR
801 0 $b lins $c 20060315 $g AACR
990 $a ????
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 中文書庫 $f 35 $j 35 $k 234 44 $m 20070125 $o 0 $9 32
------------------------------------------------------------------------
[biblios]Record type: USmarc
00680cem0 2200205 4500
001 101603678
010 0 $b 平裝
090 $9 60 $a 60
100 $a 20041105d1947 m y0chib09 e
101 0 $a chi $a eng
102 $a US
200 1 $a 最新省都觀光地圖 $d Sketch map of Taipei $f [臺灣旅行社編]
205 $a 第三版
210 $a [臺北市 $c 臺灣旅行社 $d 民36]
215 0 $a 1幅地圖 $d 印於79 x 53公分紙上
712 02 $a 臺灣旅行社
801 0 $b lins $c 20060411 $g CCR
801 0 $b lins $c 20060411 $g AACR
990 $a BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 中文書庫 $f 60 $j 60 $k 222 $m 20041109 $o 0 $9 57

koha3.0

i set up rel_3_0 and use zebra(unimarc),
my opac operl script & opac_tmpl(prog) use rel_3_0.
database execute updatedatabase.

koha.xml
---------------------------------------------

tcp:@:9900

/home/zebra/zebradb/biblios
/home/laxendion/tools/cvs/dev_week/koha/zebraplugin/etc/zebra.cfg
/home/laxendion/tools/cvs/dev_week/koha/zebraplugin/etc/pqf.properties


Koha
-------------------------------------------
it means mysql database name or zebra databae name.
i can't sure which that?
--------------------------------------------
localhost
koha
dion0104
default
0
default
0
/usr/loca/koha/intranet
/usr/local/koha/opac
/usr/local/koha/opac/htdocs/opac-tmpl
/usr/local/koha/intranet/htdocs/intranet-tmpl
/usr/local/koha/intranet/htdocs/intranet-tmpl/default/en/includes/


-----------------------------------------------------------------------
i import some biblios. i use yaz-client

root@laxendion:~# yaz-client @:9900/biblios
Connecting...OK.
Sent initrequest.
Connection accepted by v3 target.
ID : 81
Name : Zebra Information Server/GFS/YAZ
Version: Zebra 2.0.6/1.108/2.1.46
Options: search present delSet triggerResourceCtrl scan sort extendedServices namedResultSets
Elapsed: 0.052761
Z> find @attr 1=1016 perl
Sent searchRequest.
Received SearchResponse.
Search was a success.
Number of hits: 1, setno 1
SearchResult-1: term=perl cnt=1
records returned: 0
Elapsed: 0.208630
----------------------------------------------------
show 1
Z> show 1
Sent presentRequest (1+1).
Records: 1
[biblios]Record type: USmarc
01051 2200217 4500
010 $a 96007074 //r96
020 $a 1571690581
082 $a 005.13/3
090 $c 15 $d 15
100 1 $a Glover, Mike.
245 10 $a Perl 5 how-to / $c Mike Glover, Aidan Humphreys, Ed Weiss.
260 $a Corte Madera, Calif. : $b Waite Group Press, $c c1996.
300 $a xxiii, 860 p. : $b ill. ; $c 23 cm. + $e 1 computer laser optical disc (4 3/4 in.)
500 $a "The definitive perl programming problem-solver."--Cover.
538 $a System requirements for accompanying computer disc: IBM PC or UNIX workstation; DOS 3.3 or greater; Windows 3.1 or greater; Windows 95; UNIX-compatible operating system with Perl port; recommended: CD-ROM drive and Internet access.
650 0 $a Perl (Computer program language)
650 0 $a Object-oriented programming (Computer science)
700 1 $a Humphreys, Aidan.
700 1 $a Weiss, Ed.
942 $c BOOK
995 $b 輔仁大學圖書資訊學系資訊組織 $c 輔仁大學圖書資訊學系資訊組織 $e 西文書庫 $f 11 $j 11 $k 123.34 $o 0 $9 12

nextResultSetPosition = 2
Elapsed: 0.052356
--------------------------------------------------------------------------
and then my koha.conf

zebradb=localhost:9900/biblios
database=Koha
hostname=localhost
user=koha
pass=dion0104
intranetdir=/usr/local/koha/intranet
opacdir=/usr/local/koha/opac
kohalogdir=/usr/local/koha/log
kohaversion=3.0
httpduser=www-data
intrahtdocs=/usr/local/koha/intranet/htdocs/intranet-tmpl
opachtdocs=/usr/local/koha/opac/htdocs/opac-tmpl
-----------------------------------------------------
i run opac-search.pl but it can't work

error log
--------------------------------------------
error : Can't call method "_conn" on an undefined value at /usr/local/lib/perl/5.8.7/ZOOM.pm line 123.


[Fri Feb 16 09:43:10 2007] [error] [client 127.0.0.1] Start tag expected, '<' not found at /usr/local/lib/perl/5.8.7/XML/LibXML/SAX.pm line 64
[Fri Feb 16 09:43:10 2007] [error] [client 127.0.0.1] at /usr/local/share/perl/5.8.7/XML/Simple.pm line 291

星期四, 2月 08, 2007

可重複欄位

cp koha227 acqui.simple

books.com.tw 柏克萊

  1. 得獎榮譽
  2. 內容簡介
  3. 內容連載
  4. 同類推薦書籍
  5. 讀者書評
  6. 目錄

星期二, 2月 06, 2007

opac-images

modify

opac-basket.tmpl
opac-shelives.tmpl
opac-shelives.pl

$line{'isbn'}=$item->{'isbn'};

opac-readingrecord.tmpl
opac-readingrecord.pl
$line{isbn}=$issues->[$i]->{'isbn'};

星期一, 2月 05, 2007

rss XML::Simple

#!/usr/bin/perl

use strict;
use XML::Simple;
use LWP::Simple;
use Data::Dumper;

my $url = "http://newsrss.bbc.co.uk/rss/newsonline_world_edition/middle_east/rss.xml";


my $content = get($url);
warn "could not retrieve $url" unless $content;

my $simple = XML::Simple->new();
my $data = $simple->XMLin($content);
# DEBUG
#print Dumper($data) . "\n";


foreach my $result (@{$data->{channel}->{item}}){

print
join "\n",
$result->{title} . "\n",
$result->{description} . "\n\n";
}

phpMyAdmin 2.7.0(含)以上版本 中文顯示亂碼問題解決 + 基本設定

phpMyAdmin 2.7.0(含)以上版本 中文顯示亂碼問題解決 + 基本設定

select_lang.lib.php 這個檔案內容
'big5' => 'big5', 更改 'big5' => 'latin1',
'utf-8' => 'utf-8', 更改 'utf-8' => ' latin1',

星期六, 2月 03, 2007

Search.pm ISBN

ISBN -

Search.pm

line 1545;

$data->{'isbn'} = DisplayISBN($data->{'isbn'});
$data->{'isbn'} =~ s/-//g;

SearchMarc.pm

koha 229

NOT statements

222
$word =~ s/%//g unless length($word)>4;
$word = "\%" . $word . "\%";

247
NORMAL statements
$word =~ s/%//g unless length($word)>4;
$word = "\%" . $word . "\%";

星期日, 1月 28, 2007

npl search-topmenu.inc

modify

ISBDdetail.pl

add detail.pl & modify ISDBdetail.tmpl
add

星期六, 1月 27, 2007

koha holidays

koha reviews

opac-review.pl
opac-showreviews.pl
opac-readingrecord.pl

Serials.pm
Letters.pm

menus.inc
menu-serials.inc

CREATE TABLE `reviews` (
`reviewid` int(11) NOT NULL auto_increment,
`borrowernumber` int(11) default NULL,
`biblionumber` int(11) default NULL,
`review` text,
`approved` tinyint(4) default NULL,
`datereviewed` datetime default NULL,
PRIMARY KEY (`reviewid`)
) ENGINE=MyISAM;

koha reviwes




星期四, 1月 25, 2007

google bookviews

http://books.google.com/books?vid=ISBN0596004788&printsec=frontcover&dq=isbn:0596004788

query stat

add cookie table

CREATE TABLE `cookie` (
`id` int(255) NOT NULL auto_increment,
`names` text NOT NULL,
`counts` int(255) NOT NULL default '1',
PRIMARY KEY (`id`),
KEY `blbnoidx` (`id`)
) ENGINE=MyISAM ;

opac-main.pl

my $dbh = C4::Context->dbh;
my $top="Select names,SUM(counts) \"co\" from cookie group by names order by co desc limit 0 , 10";
my $sth=$dbh->prepare($top);
$sth->execute;

my @top;
my $top;

while (my ($names,$counts) = $sth->fetchrow_array) {
my %rows = ( searchterm => $names,
counts => $counts,
);
push @top, \%rows;
}
$sth->finish;


$template->param(top => \@top)

----------------------------------------------
opac-main.tmpl


">

----------------------------------------------
opac-search.pl

# put into cookie
for my $count (@value) {
my $dbh=C4::Context->dbh;
$sth = $dbh->prepare("insert into cookie(names) values (?)");
$sth->execute($count) || die $sth->errstr;
}

星期六, 1月 06, 2007

ajax安全性

1.跨網域限制

2.跨網站指令碼


3.SQL/OS 命令植入攻擊
$sql = "SELECT * From table where number = ".$_GET['id'].";";
利用 mysql_wscape_string()、splite_escape_string()

4.密碼檔案管理

資料庫

MySQL
PHP $A = mysql_escape_string($_GET['A']);
Perl $A =~ s/'/"/g; or $A =~ s/\\/\\\/g;

PGSQL
PHP $A = psgl_escape_string($_GET['A']);
Perl $A =~ s/'/"/g; orf $A =~ /\\/\\\/g;

SQLite $A = splite_escape_string($_GET['A']);

系統

Linux
PHP $A = escapeshellarg($A); system($A);
Perl $A =~ s/'/\\'/; system("echo '$A'");

跨網站指令碼

PHP $A = htmlspecialchars($data);
Perl $A =~ s/

Library Technology

http://www.librarytechnology.org/automationhistory.pl

http://www.libraryjournal.com/article/CA6319048.html