Kết nối dữ liệu từ Koha, Dspace sang Vufind - cse-library/vufind GitHub Wiki
Thêm dữ liệu từ Koha:
Trong Koha:
Đặt đường dẫn cho PERL5LIB và đặt biến trỏ đến tệp cấu hình Koha: export PERL5LIB=/usr/share/koha/lib:$PERL5LIB export KOHA_CONF=/etc/koha/sites/library/koha-conf.xml
Xuất dữ liệu Koha thành file dạng XML: /usr/share/koha/bin/export_records.pl --format=xml --filename="koha.xml"
Trên máy chủ:
Copy file koha.xml sang máy chủ. sudo docker cp koha:<đường dẫn>/koha.xml <đường dẫn tới vị trí cần đặt file ở máy chủ>
Đưa file koha.xml vào Docker Vufind. sudo docker cp <đường dẫn>/koha.xml vufind:/usr/local/vufind/import/koha.xml
Trong Vufind:
Sao chép file marc_local.properties từ $VUFIND_HOME/import sang $VUFIND_LOCAL_DIR/import: cp $VUFIND_HOME/import/marc_local.properties $VUFIND_LOCAL_DIR/import/
Chỉnh sửa file với các trường: vi $VUFIND_LOCAL_DIR/import/marc_local.properties #collection = "collection" institution = "My University" #building = "Library A" id = 999c, first
Nhập dữ liệu vào Vufind bằng import-marc.sh + đường dẫn tới file XML hoặc MARC: ./import-marc.sh $VUFIND_HOME/import/koha.xml
Chọn Koha ILS Driver trong $VUFIND_LOCAL_DIR/config/vufind/config.ini: vi $VUFIND_LOCAL_DIR/config/vufind/config.ini [Catalog] driver = "Koha"
Đổi cấu hình Koha.ini dẫn tới Koha: vi $VUFIND_LOCAL_DIR/config/vufind/Koha.ini [Catalog] host = 172.120.0.31 port = 3306 username = koha_library password = PQfnM4zwJvMjg3p8 database = koha_library url = http://172.120.0.31
Thêm dữ liệu từ Dspace
Trong Dspace
Kiểm tra http://yourdspacehostname:8080/oai/ có chạy hay không? Nếu không bật OAI-PMH trong DSpace. Cấp quyền thư mục Dspace và tiến hành đưa dữ liệu lên OAI: chmod +x /dspace/bin/dspace /dspace/bin/dspace oai import
Trong Vufind
Mở OAI-PMH trong Vufind yourvufindhostname/vufind/oai
Cấu hình oai.ini dẫn tới Dspace: vi $VUFIND_LOCAL_DIR/harvest/oai.ini [DSpace] url=http://172.120.0.33:8080/oai/request metadataPrefix=oai_dc idSearch[]="/^oai:172.120.0.33:8080:/" idReplace[]="ir-" idSearch[]="/\//" idReplace[]="-" injectDate="datestamp" injectId="identifier" dateGranularity=auto harvestedIdLog=harvest.log
Vào thư mục harvest tiến hành kết nối cổng OAI Dspace và cập nhật dữ liệu vào Vufind: cd $VUFIND_HOME/harvest php harvest_oai.php ./batch-import-xsl.sh DSpace dspace.properties