@irfanshadikrishad/anilist 1.0.0-forbidden.4 → 1.0.0-forbidden.5
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/LICENSE.md +382 -382
- package/README.md +266 -266
- package/bin/helpers/auth.js +40 -36
- package/bin/helpers/mutations.js +35 -35
- package/bin/helpers/queries.js +176 -176
- package/bin/helpers/workers.js +71 -71
- package/package.json +84 -84
package/bin/helpers/workers.js
CHANGED
|
@@ -202,49 +202,49 @@ function selectFile(fileType) {
|
|
|
202
202
|
});
|
|
203
203
|
}
|
|
204
204
|
function createAnimeXML(malId, progress, status, episodes, title, format) {
|
|
205
|
-
return `
|
|
206
|
-
<anime>
|
|
207
|
-
<series_animedb_id>${malId}</series_animedb_id>
|
|
208
|
-
<series_title><![CDATA[${title}]]></series_title>
|
|
209
|
-
<series_type>${format}</series_type>
|
|
210
|
-
<series_episodes>${episodes}</series_episodes>
|
|
211
|
-
<my_id>0</my_id>
|
|
212
|
-
<my_watched_episodes>${progress}</my_watched_episodes>
|
|
213
|
-
<my_start_date>0000-00-00</my_start_date>
|
|
214
|
-
<my_finish_date>0000-00-00</my_finish_date>
|
|
215
|
-
<my_score>0</my_score>
|
|
216
|
-
<my_storage_value>0.00</my_storage_value>
|
|
217
|
-
<my_status>${status}</my_status>
|
|
218
|
-
<my_comments><![CDATA[]]></my_comments>
|
|
219
|
-
<my_times_watched>0</my_times_watched>
|
|
220
|
-
<my_rewatch_value></my_rewatch_value>
|
|
221
|
-
<my_priority>LOW</my_priority>
|
|
222
|
-
<my_tags><![CDATA[]]></my_tags>
|
|
223
|
-
<my_rewatching>0</my_rewatching>
|
|
224
|
-
<my_rewatching_ep>0</my_rewatching_ep>
|
|
225
|
-
<my_discuss>0</my_discuss>
|
|
226
|
-
<my_sns>default</my_sns>
|
|
227
|
-
<update_on_import>1</update_on_import>
|
|
205
|
+
return `
|
|
206
|
+
<anime>
|
|
207
|
+
<series_animedb_id>${malId}</series_animedb_id>
|
|
208
|
+
<series_title><![CDATA[${title}]]></series_title>
|
|
209
|
+
<series_type>${format}</series_type>
|
|
210
|
+
<series_episodes>${episodes}</series_episodes>
|
|
211
|
+
<my_id>0</my_id>
|
|
212
|
+
<my_watched_episodes>${progress}</my_watched_episodes>
|
|
213
|
+
<my_start_date>0000-00-00</my_start_date>
|
|
214
|
+
<my_finish_date>0000-00-00</my_finish_date>
|
|
215
|
+
<my_score>0</my_score>
|
|
216
|
+
<my_storage_value>0.00</my_storage_value>
|
|
217
|
+
<my_status>${status}</my_status>
|
|
218
|
+
<my_comments><![CDATA[]]></my_comments>
|
|
219
|
+
<my_times_watched>0</my_times_watched>
|
|
220
|
+
<my_rewatch_value></my_rewatch_value>
|
|
221
|
+
<my_priority>LOW</my_priority>
|
|
222
|
+
<my_tags><![CDATA[]]></my_tags>
|
|
223
|
+
<my_rewatching>0</my_rewatching>
|
|
224
|
+
<my_rewatching_ep>0</my_rewatching_ep>
|
|
225
|
+
<my_discuss>0</my_discuss>
|
|
226
|
+
<my_sns>default</my_sns>
|
|
227
|
+
<update_on_import>1</update_on_import>
|
|
228
228
|
</anime>`;
|
|
229
229
|
}
|
|
230
230
|
function createMangaXML(malId, progress, status, chapters, title) {
|
|
231
|
-
return `
|
|
232
|
-
<manga>
|
|
233
|
-
<manga_mangadb_id>${malId}</manga_mangadb_id>
|
|
234
|
-
<manga_title><![CDATA[${title ? title : "unknown"}]]></manga_title>
|
|
235
|
-
<manga_volumes>0</manga_volumes>
|
|
236
|
-
<manga_chapters>${chapters ? chapters : 0}</manga_chapters>
|
|
237
|
-
<my_id>0</my_id>
|
|
238
|
-
<my_read_chapters>${progress}</my_read_chapters>
|
|
239
|
-
<my_start_date>0000-00-00</my_start_date>
|
|
240
|
-
<my_finish_date>0000-00-00</my_finish_date>
|
|
241
|
-
<my_score>0</my_score>
|
|
242
|
-
<my_status>${status}</my_status>
|
|
243
|
-
<my_reread_value></my_reread_value>
|
|
244
|
-
<my_priority>LOW</my_priority>
|
|
245
|
-
<my_rereading>0</my_rereading>
|
|
246
|
-
<my_discuss>0</my_discuss>
|
|
247
|
-
<update_on_import>1</update_on_import>
|
|
231
|
+
return `
|
|
232
|
+
<manga>
|
|
233
|
+
<manga_mangadb_id>${malId}</manga_mangadb_id>
|
|
234
|
+
<manga_title><![CDATA[${title ? title : "unknown"}]]></manga_title>
|
|
235
|
+
<manga_volumes>0</manga_volumes>
|
|
236
|
+
<manga_chapters>${chapters ? chapters : 0}</manga_chapters>
|
|
237
|
+
<my_id>0</my_id>
|
|
238
|
+
<my_read_chapters>${progress}</my_read_chapters>
|
|
239
|
+
<my_start_date>0000-00-00</my_start_date>
|
|
240
|
+
<my_finish_date>0000-00-00</my_finish_date>
|
|
241
|
+
<my_score>0</my_score>
|
|
242
|
+
<my_status>${status}</my_status>
|
|
243
|
+
<my_reread_value></my_reread_value>
|
|
244
|
+
<my_priority>LOW</my_priority>
|
|
245
|
+
<my_rereading>0</my_rereading>
|
|
246
|
+
<my_discuss>0</my_discuss>
|
|
247
|
+
<update_on_import>1</update_on_import>
|
|
248
248
|
</manga>`;
|
|
249
249
|
}
|
|
250
250
|
function createAnimeListXML(mediaWithProgress) {
|
|
@@ -267,19 +267,19 @@ function createAnimeListXML(mediaWithProgress) {
|
|
|
267
267
|
const format = anime.format ? anime.format : "";
|
|
268
268
|
return createAnimeXML(malId, progress, status, episodes, title, format);
|
|
269
269
|
});
|
|
270
|
-
return `<myanimelist>
|
|
271
|
-
<myinfo>
|
|
272
|
-
<user_id/>
|
|
273
|
-
<user_name>${yield Auth.MyUserName()}</user_name>
|
|
274
|
-
<user_export_type>1</user_export_type>
|
|
275
|
-
<user_total_anime>0</user_total_anime>
|
|
276
|
-
<user_total_watching>0</user_total_watching>
|
|
277
|
-
<user_total_completed>0</user_total_completed>
|
|
278
|
-
<user_total_onhold>0</user_total_onhold>
|
|
279
|
-
<user_total_dropped>0</user_total_dropped>
|
|
280
|
-
<user_total_plantowatch>0</user_total_plantowatch>
|
|
281
|
-
</myinfo>
|
|
282
|
-
\n${xmlEntries.join("\n")}\n
|
|
270
|
+
return `<myanimelist>
|
|
271
|
+
<myinfo>
|
|
272
|
+
<user_id/>
|
|
273
|
+
<user_name>${yield Auth.MyUserName()}</user_name>
|
|
274
|
+
<user_export_type>1</user_export_type>
|
|
275
|
+
<user_total_anime>0</user_total_anime>
|
|
276
|
+
<user_total_watching>0</user_total_watching>
|
|
277
|
+
<user_total_completed>0</user_total_completed>
|
|
278
|
+
<user_total_onhold>0</user_total_onhold>
|
|
279
|
+
<user_total_dropped>0</user_total_dropped>
|
|
280
|
+
<user_total_plantowatch>0</user_total_plantowatch>
|
|
281
|
+
</myinfo>
|
|
282
|
+
\n${xmlEntries.join("\n")}\n
|
|
283
283
|
</myanimelist>`;
|
|
284
284
|
});
|
|
285
285
|
}
|
|
@@ -302,19 +302,19 @@ function createMangaListXML(mediaWithProgress) {
|
|
|
302
302
|
const status = statusMap[manga.status];
|
|
303
303
|
return createMangaXML(malId, progress, status, chapters, title);
|
|
304
304
|
});
|
|
305
|
-
return `<myanimelist>
|
|
306
|
-
<myinfo>
|
|
307
|
-
<user_id/>
|
|
308
|
-
<user_name>${yield Auth.MyUserName()}</user_name>
|
|
309
|
-
<user_export_type>2</user_export_type>
|
|
310
|
-
<user_total_manga>5</user_total_manga>
|
|
311
|
-
<user_total_reading>1</user_total_reading>
|
|
312
|
-
<user_total_completed>1</user_total_completed>
|
|
313
|
-
<user_total_onhold>1</user_total_onhold>
|
|
314
|
-
<user_total_dropped>1</user_total_dropped>
|
|
315
|
-
<user_total_plantoread>1</user_total_plantoread>
|
|
316
|
-
</myinfo>
|
|
317
|
-
\n${xmlEntries.join("\n")}\n
|
|
305
|
+
return `<myanimelist>
|
|
306
|
+
<myinfo>
|
|
307
|
+
<user_id/>
|
|
308
|
+
<user_name>${yield Auth.MyUserName()}</user_name>
|
|
309
|
+
<user_export_type>2</user_export_type>
|
|
310
|
+
<user_total_manga>5</user_total_manga>
|
|
311
|
+
<user_total_reading>1</user_total_reading>
|
|
312
|
+
<user_total_completed>1</user_total_completed>
|
|
313
|
+
<user_total_onhold>1</user_total_onhold>
|
|
314
|
+
<user_total_dropped>1</user_total_dropped>
|
|
315
|
+
<user_total_plantoread>1</user_total_plantoread>
|
|
316
|
+
</myinfo>
|
|
317
|
+
\n${xmlEntries.join("\n")}\n
|
|
318
318
|
</myanimelist>`;
|
|
319
319
|
});
|
|
320
320
|
}
|
|
@@ -383,21 +383,21 @@ const anidbToanilistMapper = (romanjiName, year, englishName) => __awaiter(void
|
|
|
383
383
|
function activityBy(activity, count) {
|
|
384
384
|
var _a, _b, _c, _d;
|
|
385
385
|
if ((_a = activity === null || activity === void 0 ? void 0 : activity.messenger) === null || _a === void 0 ? void 0 : _a.name) {
|
|
386
|
-
return `[${count ?
|
|
386
|
+
return `[${count ? count : "?"}]\t${activity.messenger.name} >> messaged ${activity.recipient.name}`;
|
|
387
387
|
}
|
|
388
388
|
else if ((_c = (_b = activity === null || activity === void 0 ? void 0 : activity.media) === null || _b === void 0 ? void 0 : _b.title) === null || _c === void 0 ? void 0 : _c.userPreferred) {
|
|
389
389
|
if (activity.progress) {
|
|
390
|
-
return `[${count ?
|
|
390
|
+
return `[${count ? count : "?"}]\t${activity.user.name} >> ${activity.status} ${activity.progress} of ${activity.media.title.userPreferred}`;
|
|
391
391
|
}
|
|
392
392
|
else {
|
|
393
|
-
return `[${count ?
|
|
393
|
+
return `[${count ? count : "?"}]\t${activity.user.name} >> ${activity.status} ${activity.media.title.userPreferred}`;
|
|
394
394
|
}
|
|
395
395
|
}
|
|
396
396
|
else if ((_d = activity === null || activity === void 0 ? void 0 : activity.user) === null || _d === void 0 ? void 0 : _d.name) {
|
|
397
|
-
return `[${count ?
|
|
397
|
+
return `[${count ? count : "?"}]\t${activity.user.name}`;
|
|
398
398
|
}
|
|
399
399
|
else {
|
|
400
|
-
return `[${count ?
|
|
400
|
+
return `[${count ? count : "?"} ???`;
|
|
401
401
|
}
|
|
402
402
|
}
|
|
403
403
|
/**
|
package/package.json
CHANGED
|
@@ -1,84 +1,84 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@irfanshadikrishad/anilist",
|
|
3
|
-
"description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
|
|
4
|
-
"author": "Irfan Shadik Rishad",
|
|
5
|
-
"version": "1.0.0-forbidden.
|
|
6
|
-
"main": "./bin/index.js",
|
|
7
|
-
"type": "module",
|
|
8
|
-
"types": "./bin/index.d.ts",
|
|
9
|
-
"bin": {
|
|
10
|
-
"anilist": "./bin/index.js"
|
|
11
|
-
},
|
|
12
|
-
"publishConfig": {
|
|
13
|
-
"access": "public"
|
|
14
|
-
},
|
|
15
|
-
"scripts": {
|
|
16
|
-
"build": "rm -rf ./bin && tsc",
|
|
17
|
-
"build:watch": "rm -rf ./bin && tsc -w",
|
|
18
|
-
"format": "prettier . --write",
|
|
19
|
-
"format:check": "prettier . --check",
|
|
20
|
-
"lint": "eslint ./dist",
|
|
21
|
-
"lint:fix": "eslint ./dist --fix",
|
|
22
|
-
"all": "npm run build && npm run lint && npm run lint:fix && npm run format && npm test",
|
|
23
|
-
"test": "jest ./tests"
|
|
24
|
-
},
|
|
25
|
-
"keywords": [
|
|
26
|
-
"anilist",
|
|
27
|
-
"CLI",
|
|
28
|
-
"anime",
|
|
29
|
-
"manga",
|
|
30
|
-
"anime list",
|
|
31
|
-
"manga list",
|
|
32
|
-
"anime tracker",
|
|
33
|
-
"manga tracker",
|
|
34
|
-
"anilist API",
|
|
35
|
-
"anime progress",
|
|
36
|
-
"manga progress",
|
|
37
|
-
"media list",
|
|
38
|
-
"export anime",
|
|
39
|
-
"import anime",
|
|
40
|
-
"export manga",
|
|
41
|
-
"import manga",
|
|
42
|
-
"status tracker",
|
|
43
|
-
"watchlist",
|
|
44
|
-
"reading list",
|
|
45
|
-
"graphql"
|
|
46
|
-
],
|
|
47
|
-
"repository": {
|
|
48
|
-
"type": "git",
|
|
49
|
-
"url": "https://github.com/irfanshadikrishad/anilist"
|
|
50
|
-
},
|
|
51
|
-
"homepage": "https://github.com/irfanshadikrishad/anilist",
|
|
52
|
-
"bugs": {
|
|
53
|
-
"url": "https://github.com/irfanshadikrishad/anilist/issues"
|
|
54
|
-
},
|
|
55
|
-
"license": "MPL-2.0",
|
|
56
|
-
"devDependencies": {
|
|
57
|
-
"@babel/preset-env": "^7.26.9",
|
|
58
|
-
"@eslint/js": "^9.21.0",
|
|
59
|
-
"@types/jest": "^29.5.14",
|
|
60
|
-
"@types/node": "^22.13.5",
|
|
61
|
-
"@types/papaparse": "^5.3.15",
|
|
62
|
-
"@types/xml2js": "^0.4.14",
|
|
63
|
-
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
|
64
|
-
"eslint": "^9.21.0",
|
|
65
|
-
"globals": "^16.0.0",
|
|
66
|
-
"jest": "^29.7.0",
|
|
67
|
-
"prettier": "^3.5.2",
|
|
68
|
-
"prettier-plugin-organize-imports": "^4.1.0",
|
|
69
|
-
"ts-jest": "^29.2.
|
|
70
|
-
"ts-node": "^10.9.2",
|
|
71
|
-
"typescript": "^5.7.3"
|
|
72
|
-
},
|
|
73
|
-
"dependencies": {
|
|
74
|
-
"commander": "^13.1.0",
|
|
75
|
-
"fast-xml-parser": "^5.0.6",
|
|
76
|
-
"inquirer": "^12.4.2",
|
|
77
|
-
"jsonrepair": "^3.12.0",
|
|
78
|
-
"node-fetch": "^3.3.2",
|
|
79
|
-
"open": "^10.1.0",
|
|
80
|
-
"papaparse": "^5.5.2",
|
|
81
|
-
"tiny-spinner": "^2.0.5",
|
|
82
|
-
"xml2js": "^0.6.2"
|
|
83
|
-
}
|
|
84
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@irfanshadikrishad/anilist",
|
|
3
|
+
"description": "Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts",
|
|
4
|
+
"author": "Irfan Shadik Rishad",
|
|
5
|
+
"version": "1.0.0-forbidden.5",
|
|
6
|
+
"main": "./bin/index.js",
|
|
7
|
+
"type": "module",
|
|
8
|
+
"types": "./bin/index.d.ts",
|
|
9
|
+
"bin": {
|
|
10
|
+
"anilist": "./bin/index.js"
|
|
11
|
+
},
|
|
12
|
+
"publishConfig": {
|
|
13
|
+
"access": "public"
|
|
14
|
+
},
|
|
15
|
+
"scripts": {
|
|
16
|
+
"build": "rm -rf ./bin && tsc",
|
|
17
|
+
"build:watch": "rm -rf ./bin && tsc -w",
|
|
18
|
+
"format": "prettier . --write",
|
|
19
|
+
"format:check": "prettier . --check",
|
|
20
|
+
"lint": "eslint ./dist",
|
|
21
|
+
"lint:fix": "eslint ./dist --fix",
|
|
22
|
+
"all": "npm run build && npm run lint && npm run lint:fix && npm run format && npm test",
|
|
23
|
+
"test": "jest ./tests"
|
|
24
|
+
},
|
|
25
|
+
"keywords": [
|
|
26
|
+
"anilist",
|
|
27
|
+
"CLI",
|
|
28
|
+
"anime",
|
|
29
|
+
"manga",
|
|
30
|
+
"anime list",
|
|
31
|
+
"manga list",
|
|
32
|
+
"anime tracker",
|
|
33
|
+
"manga tracker",
|
|
34
|
+
"anilist API",
|
|
35
|
+
"anime progress",
|
|
36
|
+
"manga progress",
|
|
37
|
+
"media list",
|
|
38
|
+
"export anime",
|
|
39
|
+
"import anime",
|
|
40
|
+
"export manga",
|
|
41
|
+
"import manga",
|
|
42
|
+
"status tracker",
|
|
43
|
+
"watchlist",
|
|
44
|
+
"reading list",
|
|
45
|
+
"graphql"
|
|
46
|
+
],
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/irfanshadikrishad/anilist"
|
|
50
|
+
},
|
|
51
|
+
"homepage": "https://github.com/irfanshadikrishad/anilist",
|
|
52
|
+
"bugs": {
|
|
53
|
+
"url": "https://github.com/irfanshadikrishad/anilist/issues"
|
|
54
|
+
},
|
|
55
|
+
"license": "MPL-2.0",
|
|
56
|
+
"devDependencies": {
|
|
57
|
+
"@babel/preset-env": "^7.26.9",
|
|
58
|
+
"@eslint/js": "^9.21.0",
|
|
59
|
+
"@types/jest": "^29.5.14",
|
|
60
|
+
"@types/node": "^22.13.5",
|
|
61
|
+
"@types/papaparse": "^5.3.15",
|
|
62
|
+
"@types/xml2js": "^0.4.14",
|
|
63
|
+
"@typescript-eslint/eslint-plugin": "^8.24.1",
|
|
64
|
+
"eslint": "^9.21.0",
|
|
65
|
+
"globals": "^16.0.0",
|
|
66
|
+
"jest": "^29.7.0",
|
|
67
|
+
"prettier": "^3.5.2",
|
|
68
|
+
"prettier-plugin-organize-imports": "^4.1.0",
|
|
69
|
+
"ts-jest": "^29.2.6",
|
|
70
|
+
"ts-node": "^10.9.2",
|
|
71
|
+
"typescript": "^5.7.3"
|
|
72
|
+
},
|
|
73
|
+
"dependencies": {
|
|
74
|
+
"commander": "^13.1.0",
|
|
75
|
+
"fast-xml-parser": "^5.0.6",
|
|
76
|
+
"inquirer": "^12.4.2",
|
|
77
|
+
"jsonrepair": "^3.12.0",
|
|
78
|
+
"node-fetch": "^3.3.2",
|
|
79
|
+
"open": "^10.1.0",
|
|
80
|
+
"papaparse": "^5.5.2",
|
|
81
|
+
"tiny-spinner": "^2.0.5",
|
|
82
|
+
"xml2js": "^0.6.2"
|
|
83
|
+
}
|
|
84
|
+
}
|