星期一, 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();

}