Skip to content

Commit

Permalink
[update] IIIF兼容digitalarchive.npm.gov.tw
Browse files Browse the repository at this point in the history
  • Loading branch information
zhudw committed Dec 11, 2023
1 parent 6d48135 commit 928774c
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 150 deletions.
18 changes: 10 additions & 8 deletions app/iiif.go
Original file line number Diff line number Diff line change
Expand Up @@ -26,26 +26,28 @@ type IIIF struct {
type ResponseManifest struct {
Sequences []struct {
Canvases []struct {
Id string `json:"@id"`
Type string `json:"@type"`
Height int `json:"height"`
Id string `json:"@id"`
Type string `json:"@type"`
//兼容某些不正规的网站竟然用了string类型,见https://digitalarchive.npm.gov.tw/Antique/setJsonU?uid=58102&Dept=U
//Height int `json:"height"`
Images []struct {
Id string `json:"@id"`
Type string `json:"@type"`
On string `json:"on"`
Resource struct {
Id string `json:"@id"`
Type string `json:"@type"`
Format string `json:"format"`
Height int `json:"height"`
Id string `json:"@id"`
Type string `json:"@type"`
Format string `json:"format"`
//兼容digitalarchive.npm.gov.tw
//Height int `json:"height"`
Service struct {
Id string `json:"@id"`
} `json:"service"`
Width int `json:"width"`
} `json:"resource"`
} `json:"images"`
Label string `json:"label"`
Width int `json:"width"`
//Width int `json:"width"`
} `json:"canvases"`
} `json:"sequences"`
}
Expand Down
4 changes: 2 additions & 2 deletions build.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#ver="1.2.5"
ver=$(date "+%y%m%d")
ver="1.2.5"
#ver=$(date "+%y%m%d")

sed -i '/const version = */c const version = "'"$ver"'"' config/init.go

Expand Down
2 changes: 1 addition & 1 deletion config/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import (

var Conf Input

const version = "231208"
const version = "1.2.5"

// initSeq false = 最小值 <= 当前页码 <= 最大值
func initSeq() {
Expand Down
10 changes: 0 additions & 10 deletions router/china.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import (
"bookget/app"
"bookget/site/China/luoyang"
"bookget/site/China/ncpssd"
"bookget/site/China/npmtw"
"bookget/site/China/ouroots"
"bookget/site/China/sdutcm"
"bookget/site/China/szlib"
Expand Down Expand Up @@ -43,15 +42,6 @@ func (p RbkdocNpmTw) getRouterInit(sUrl []string) (map[string]interface{}, error
return nil, nil
}

type DigitalarchiveNpmTw struct{}

func (p DigitalarchiveNpmTw) getRouterInit(sUrl []string) (map[string]interface{}, error) {
for i, s := range sUrl {
npmtw.Init(i+1, s)
}
return nil, nil
}

type CuHk struct{}

func (p CuHk) getRouterInit(sUrl []string) (map[string]interface{}, error) {
Expand Down
2 changes: 0 additions & 2 deletions router/init.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,8 +49,6 @@ func FactoryRouter(siteID string, sUrl []string) (map[string]interface{}, error)
Router["lbezone.hkust.edu.hk"] = new(UstHk)
//[中国]台北故宫博物院 - 古籍善本 rbkdocnpmtw.Init
Router["rbk-doc.npm.edu.tw"] = new(RbkdocNpmTw)
//[中国]台北故宫博物院 - 典藏资料 npmtw.Init
Router["digitalarchive.npm.gov.tw"] = new(DigitalarchiveNpmTw)
//[中国]洛阳市图书馆
Router["111.7.82.29:8090"] = new(LuoYang)
//[中国]温州市图书馆
Expand Down
69 changes: 0 additions & 69 deletions site/China/npmtw/npmtw.go

This file was deleted.

58 changes: 0 additions & 58 deletions site/China/npmtw/struct.go

This file was deleted.

0 comments on commit 928774c

Please sign in to comment.