dongnelibrary 0.2.10 → 0.2.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/cli.js +4 -1
- package/src/dongnelibrary.js +2 -0
- package/src/library/gg.js +3 -0
- package/src/library/gunpo.js +3 -0
- package/src/library/hscity.js +9 -3
- package/src/library/osan.js +3 -0
- package/src/library/snlib.js +5 -0
- package/src/library/suwon.js +3 -0
- package/src/library/yongin.js +3 -0
package/package.json
CHANGED
package/src/cli.js
CHANGED
|
@@ -45,7 +45,10 @@ const MARKS = {
|
|
|
45
45
|
notOk: "✖ ",
|
|
46
46
|
};
|
|
47
47
|
|
|
48
|
-
const printBooks = ({ booklist }) => {
|
|
48
|
+
const printBooks = ({ booklist, homeUrl }) => {
|
|
49
|
+
if (homeUrl) {
|
|
50
|
+
console.log(colors.yellow(`[${homeUrl}]`));
|
|
51
|
+
}
|
|
49
52
|
for (const { libraryName, exist, title, bookUrl } of booklist) {
|
|
50
53
|
const mark = exist ? ` ${MARKS.ok} ` : ` ${colors.red(MARKS.notOk)} `;
|
|
51
54
|
console.log(`${cutTail(libraryName, "도서관")}${mark}${title}`);
|
package/src/dongnelibrary.js
CHANGED
|
@@ -13,6 +13,7 @@ const libraryList = LIBRARY_MODULES.flatMap((module) =>
|
|
|
13
13
|
module.getLibraryNames().map((name) => ({
|
|
14
14
|
name,
|
|
15
15
|
search: module.search,
|
|
16
|
+
homeUrl: module.homeUrl,
|
|
16
17
|
})),
|
|
17
18
|
);
|
|
18
19
|
|
|
@@ -60,6 +61,7 @@ const searchLibrary = (lib, title) =>
|
|
|
60
61
|
result: {
|
|
61
62
|
title,
|
|
62
63
|
libraryName: lib.name,
|
|
64
|
+
homeUrl: lib.homeUrl,
|
|
63
65
|
totalBookCount: data.totalBookCount,
|
|
64
66
|
startPage: data.startPage,
|
|
65
67
|
booklist: getSortedBooks(data.booklist),
|
package/src/library/gg.js
CHANGED
|
@@ -3,6 +3,8 @@ const jquery = require("jquery");
|
|
|
3
3
|
const { get } = require("../http");
|
|
4
4
|
const { JSDOM } = require("jsdom");
|
|
5
5
|
|
|
6
|
+
const homeUrl = "https://lib.goe.go.kr";
|
|
7
|
+
|
|
6
8
|
const libraryList = [
|
|
7
9
|
{ code: "MA", name: "경기중앙교육도서관" },
|
|
8
10
|
{ code: "MB", name: "경기평택교육도서관" },
|
|
@@ -108,6 +110,7 @@ async function search(opt, getBook) {
|
|
|
108
110
|
|
|
109
111
|
module.exports = {
|
|
110
112
|
search,
|
|
113
|
+
homeUrl,
|
|
111
114
|
getLibraryNames: function () {
|
|
112
115
|
return getLibraryNames(libraryList);
|
|
113
116
|
},
|
package/src/library/gunpo.js
CHANGED
|
@@ -2,6 +2,8 @@ const { get } = require("../http");
|
|
|
2
2
|
const _ = require("lodash");
|
|
3
3
|
const getLibraryNames = require("../util.js").getLibraryNames;
|
|
4
4
|
|
|
5
|
+
const homeUrl = "https://www.gunpolib.go.kr";
|
|
6
|
+
|
|
5
7
|
const libraryList = [
|
|
6
8
|
{ code: "1", name: "산본도서관" },
|
|
7
9
|
{ code: "2", name: "당동도서관" },
|
|
@@ -98,6 +100,7 @@ async function search(opt, getBook) {
|
|
|
98
100
|
|
|
99
101
|
module.exports = {
|
|
100
102
|
search,
|
|
103
|
+
homeUrl,
|
|
101
104
|
getLibraryNames: function () {
|
|
102
105
|
return getLibraryNames(libraryList);
|
|
103
106
|
},
|
package/src/library/hscity.js
CHANGED
|
@@ -3,18 +3,20 @@ const jquery = require("jquery");
|
|
|
3
3
|
const { post } = require("../http");
|
|
4
4
|
const { JSDOM } = require("jsdom");
|
|
5
5
|
|
|
6
|
+
const homeUrl = "https://hscitylib.or.kr";
|
|
7
|
+
|
|
6
8
|
const libraryList = [
|
|
7
9
|
{ code: "MA", name: "남양도서관" },
|
|
8
10
|
{ code: "MB", name: "태안도서관" },
|
|
9
11
|
{ code: "MC", name: "삼괴도서관" },
|
|
10
12
|
{ code: "MD", name: "병점도서관" },
|
|
11
13
|
{ code: "ME", name: "샘내도서관" },
|
|
12
|
-
{ code: "MF", name: "
|
|
14
|
+
{ code: "MF", name: "두빛나래어린이도서관" },
|
|
13
15
|
{ code: "MG", name: "봉담도서관" },
|
|
14
|
-
{ code: "MH", name: "
|
|
16
|
+
{ code: "MH", name: "둥지나래어린이도서관" },
|
|
15
17
|
{ code: "MI", name: "목동이음터도서관" },
|
|
16
18
|
{ code: "MJ", name: "기아행복마루도서관" },
|
|
17
|
-
{ code: "MK", name: "
|
|
19
|
+
{ code: "MK", name: "화성동탄중앙도서관" },
|
|
18
20
|
{ code: "ML", name: "송산도서관" },
|
|
19
21
|
{ code: "MM", name: "정남도서관" },
|
|
20
22
|
{ code: "MN", name: "비봉도서관" },
|
|
@@ -30,7 +32,10 @@ const libraryList = [
|
|
|
30
32
|
{ code: "MX", name: "노을빛도서관" },
|
|
31
33
|
{ code: "MY", name: "서연이음터도서관" },
|
|
32
34
|
{ code: "MZ", name: "호연이음터도서관" },
|
|
35
|
+
{ code: "NA", name: "향남복합문화센터도서관" },
|
|
36
|
+
{ code: "NB", name: "봉담와우도서관" },
|
|
33
37
|
{ code: "TA", name: "늘봄이음터도서관" },
|
|
38
|
+
{ code: "TB", name: "달빛나래어린이도서관" },
|
|
34
39
|
];
|
|
35
40
|
|
|
36
41
|
function getLibraryCode(libraryName) {
|
|
@@ -116,6 +121,7 @@ async function search(opt, getBook) {
|
|
|
116
121
|
|
|
117
122
|
module.exports = {
|
|
118
123
|
search,
|
|
124
|
+
homeUrl,
|
|
119
125
|
getLibraryNames: function () {
|
|
120
126
|
return getLibraryNames(libraryList);
|
|
121
127
|
},
|
package/src/library/osan.js
CHANGED
|
@@ -2,6 +2,8 @@ const getLibraryNames = require("../util.js").getLibraryNames;
|
|
|
2
2
|
const { get } = require("../http");
|
|
3
3
|
const { JSDOM } = require("jsdom");
|
|
4
4
|
|
|
5
|
+
const homeUrl = "https://www.osanlibrary.go.kr";
|
|
6
|
+
|
|
5
7
|
const libraryList = [
|
|
6
8
|
{ code: "MA", name: "오산중앙도서관" },
|
|
7
9
|
{ code: "MG", name: "꿈두레도서관" },
|
|
@@ -139,6 +141,7 @@ async function search(opt, getBook) {
|
|
|
139
141
|
|
|
140
142
|
module.exports = {
|
|
141
143
|
search,
|
|
144
|
+
homeUrl,
|
|
142
145
|
getLibraryNames: function () {
|
|
143
146
|
return getLibraryNames(libraryList);
|
|
144
147
|
},
|
package/src/library/snlib.js
CHANGED
|
@@ -3,15 +3,19 @@ const jquery = require("jquery");
|
|
|
3
3
|
const { get } = require("../http");
|
|
4
4
|
const { JSDOM } = require("jsdom");
|
|
5
5
|
|
|
6
|
+
const homeUrl = "https://www.snlib.go.kr";
|
|
7
|
+
|
|
6
8
|
const libraryList = [
|
|
7
9
|
{ code: "BF", name: "논골도서관" },
|
|
8
10
|
{ code: "CK", name: "중원어린이도서관" },
|
|
9
11
|
{ code: "MA", name: "성남중앙도서관" },
|
|
10
12
|
{ code: "MB", name: "분당도서관" },
|
|
13
|
+
{ code: "MD", name: "고등도서관" },
|
|
11
14
|
{ code: "MG", name: "구미도서관" },
|
|
12
15
|
{ code: "MH", name: "해오름도서관" },
|
|
13
16
|
{ code: "MJ", name: "중원도서관" },
|
|
14
17
|
{ code: "MM", name: "무지개도서관" },
|
|
18
|
+
{ code: "MO", name: "수내도서관" },
|
|
15
19
|
{ code: "MP", name: "판교도서관" },
|
|
16
20
|
{ code: "MR", name: "위례도서관" },
|
|
17
21
|
{ code: "MS", name: "수정도서관" },
|
|
@@ -118,6 +122,7 @@ async function search(opt, getBook) {
|
|
|
118
122
|
|
|
119
123
|
module.exports = {
|
|
120
124
|
search,
|
|
125
|
+
homeUrl,
|
|
121
126
|
getLibraryNames: function () {
|
|
122
127
|
return getLibraryNames(libraryList);
|
|
123
128
|
},
|
package/src/library/suwon.js
CHANGED
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
const getLibraryNames = require("../util.js").getLibraryNames;
|
|
2
2
|
const { createSession } = require("../http");
|
|
3
3
|
|
|
4
|
+
const homeUrl = "https://www.suwonlib.go.kr";
|
|
5
|
+
|
|
4
6
|
const libraryList = [
|
|
5
7
|
{ code: "141025", name: "선경도서관" },
|
|
6
8
|
{ code: "141024", name: "수원중앙도서관" },
|
|
@@ -143,6 +145,7 @@ async function search(opt, getBook) {
|
|
|
143
145
|
|
|
144
146
|
module.exports = {
|
|
145
147
|
search,
|
|
148
|
+
homeUrl,
|
|
146
149
|
getLibraryNames: function () {
|
|
147
150
|
return getLibraryNames(libraryList);
|
|
148
151
|
},
|
package/src/library/yongin.js
CHANGED
|
@@ -2,6 +2,8 @@ const getLibraryNames = require("../util.js").getLibraryNames;
|
|
|
2
2
|
const { get } = require("../http");
|
|
3
3
|
const { JSDOM } = require("jsdom");
|
|
4
4
|
|
|
5
|
+
const homeUrl = "https://lib.yongin.go.kr";
|
|
6
|
+
|
|
5
7
|
const libraryList = [
|
|
6
8
|
// Public libraries (시립도서관)
|
|
7
9
|
{ code: "MB", name: "수지도서관" },
|
|
@@ -176,6 +178,7 @@ async function search(opt, getBook) {
|
|
|
176
178
|
|
|
177
179
|
module.exports = {
|
|
178
180
|
search,
|
|
181
|
+
homeUrl,
|
|
179
182
|
getLibraryNames: function () {
|
|
180
183
|
return getLibraryNames(libraryList);
|
|
181
184
|
},
|