@irfanshadikrishad/anilist 1.0.9 → 1.0.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/README.md CHANGED
@@ -1,232 +1,237 @@
1
- #### @irfanshadikrishad/anilist
2
-
3
- Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
-
5
- #### How to install?
6
-
7
- Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
8
- Verify installation using
9
-
10
- ```bash
11
- node -v
12
- npm -v
13
- ```
14
-
15
- If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
16
- Then install the package by running
17
-
18
- ```bash
19
- npm install -g @irfanshadikrishad/anilist
20
- ```
21
-
22
- This will install the package globally. And you have to use commands like
23
-
24
- ```bash
25
- anilist tr -c 15
26
- ```
27
-
28
- #### How to use?
29
-
30
- Create an API client from [anilist developer setting](https://anilist.co/settings/developer) with an application name and redirect url as `https://anilist.co/api/v2/oauth/pin`. After creating the client you will get `Client ID` and `Client Secret` which is required in order to login from CLI.
31
-
32
- To login:
33
-
34
- ```
35
- anilist login -i <client-id> -s <client-secret>
36
- ```
37
-
38
- here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting.
39
-
40
- #### CLI Commands Overview
41
-
42
- | **Command** | **Options** | **Description** |
43
- | ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------ |
44
- | **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
45
- | **`logout`** | _None_ | Log out from your AniList account |
46
- | **`me`** | _None_ | Display information about the logged-in user |
47
- | **`-V, --version`** | _None_ | Display the current version of the CLI |
48
- | **`-h, --help`** | _None_ | Display available commands and options |
49
- | **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
50
- | **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
51
- | **`user`** | `<username>` | Get information about a specific AniList user |
52
- | **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
53
- | **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-ac, --activity` | Delete collections of anime, manga or activities |
54
- | **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
55
- | **`anime`** | `<anime-id>` | Get anime details by Anime Id |
56
- | **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
57
- | **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
58
- | **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list in JSON, CSV or XML (MyAnimeList) |
59
- | **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list from exported JSON or MyAnimeList (XML) |
60
-
61
- #### Command Breakdown:
62
-
63
- #### `login`:
64
-
65
- ```bash
66
- anilist login -i <client-id> -s <client-secret>
67
- ```
68
-
69
- - **Options**:
70
- - `-i, --id`: Specify AniList Client ID
71
- - `-s, --secret`: Provide the AniList Client Secret
72
- - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
73
-
74
- #### `logout`:
75
-
76
- ```bash
77
- anilist logout
78
- ```
79
-
80
- - **Description**: End the current session and log out from your AniList account.
81
-
82
- #### `me`:
83
-
84
- ```bash
85
- anilist me
86
- ```
87
-
88
- - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
89
-
90
- #### `-V, --version`:
91
-
92
- ```bash
93
- anilist -V
94
- ```
95
-
96
- - **Description**: Quickly check which version of the CLI you are running.
97
-
98
- #### `-h, --help`:
99
-
100
- ```bash
101
- anilist -h
102
- ```
103
-
104
- - **Description**: List all available commands and their usage details for quick reference.
105
-
106
- #### `trending` _(alias: `tr`)_:
107
-
108
- ```bash
109
- anilist tr -c 15
110
- ```
111
-
112
- - **Options**:
113
- - `-c (count)`: Specify how many trending anime to fetch (default: 10).
114
- - **Description**: Fetch the current trending anime series, with the option to customize how many results to display.
115
-
116
- #### `popular` _(alias: `plr`)_:
117
-
118
- ```bash
119
- anilist popular
120
- ```
121
-
122
- - **Options**:
123
- - `-c (count)`: Specify how many popular anime to fetch (default: 10).
124
- - **Description**: Fetch the most popular anime series, with the option to customize how many results to display.
125
-
126
- #### `upcoming` _(alias: `up`)_:
127
-
128
- ```bash
129
- anilist up -c 25
130
- ```
131
-
132
- - **Options**:
133
- - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
134
- - **Description**: Fetch the upcoming anime series next season, with the option to customize how many results to display.
135
-
136
- #### `user`:
137
-
138
- ```bash
139
- anilist user <username>
140
- ```
141
-
142
- - **Options**:
143
- - `<username>`: Specify the AniList username to fetch.
144
- - **Description**: Retrieve profile information about a specific AniList user.
145
-
146
- #### `lists` _(alias: `ls`)_:
147
-
148
- ```bash
149
- anilist ls -a
150
- ```
151
-
152
- - **Options**:
153
- - `-a, --anime`: Fetch the authenticated user's anime list.
154
- - `-m, --manga`: Fetch the authenticated user's manga list.
155
- - **Description**: Get the anime or manga lists of the logged-in user.
156
-
157
- #### `delete` _(alias: `del`)_:
158
-
159
- ```bash
160
- anilist del -ac
161
- ```
162
-
163
- - **Options**:
164
- - `-a, --anime`: Delete your specific anime collection that you want.
165
- - `-m, --manga`: Delete your specific manga collection that you want.
166
- - `-ac, --activity`: Delete all or any type of activities you want.
167
- - **Description**: Delete the entire anime or manga collection from the logged-in user's profile.
168
-
169
- #### `anime`
170
-
171
- ```bash
172
- anilist anime <anime-id>
173
- ```
174
-
175
- - **Options**
176
- - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
177
- - **Description**: Get anime details by anime Id.
178
-
179
- #### `search` _(alias: `srch`/`find`)_:
180
-
181
- ```bash
182
- anilist search <query> -a -c 20
183
- ```
184
-
185
- - **Options**:
186
- - `<query>` : What you want to search (eg: naruto).
187
- - `-a, --anime`: To get results of anime search.
188
- - `-m, --manga`: To get results of manga search.
189
- - `-c (count)`: Specify how many items to fetch (default: 10).
190
- - **Description**: Get anime/manga search results
191
-
192
- #### `status` _(alias: `write`/`post`)_:
193
-
194
- ```bash
195
- anilist write <status>
196
- ```
197
-
198
- - **Options**:
199
- - `<status>` : This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
200
- - **Description**: Get anime/manga search results
201
-
202
- #### `export` _(alias: `exp`)_:
203
-
204
- ```bash
205
- anilist export -a
206
- ```
207
-
208
- - **Options**:
209
- - `-a, --anime`: To export anime list.
210
- - `-m, --manga`: To export manga list.
211
- - **Description**: Export anime or manga list. For `XML (MyAnimeList)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import`.
212
-
213
- #### `import` _(alias: `imp`)_:
214
-
215
- ```bash
216
- anilist import -m
217
- ```
218
-
219
- - **Options**:
220
- - `-a, --anime`: To import anime list.
221
- - `-m, --manga`: To import manga list.
222
- - **Description**: Import anime or manga list. If you want to import anime/manga list from MyAnimeList, export the XML from [here](https://myanimelist.net/panel.php?go=export).
223
-
224
- #### Security
225
-
226
- Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
227
-
228
- #### Contribution
229
-
230
- Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
231
-
232
- #### **_Thanks for visiting 💙_**
1
+ #### @irfanshadikrishad/anilist
2
+
3
+ Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.
4
+
5
+ #### How to install?
6
+
7
+ Make sure [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com) are already installed in your system.
8
+ Verify installation using
9
+
10
+ ```bash
11
+ node -v
12
+ npm -v
13
+ ```
14
+
15
+ If you see the version then its installed. Otherwise install nodejs and npm should already be installed with nodejs.
16
+ Then install the package by running
17
+
18
+ ```bash
19
+ npm install -g @irfanshadikrishad/anilist
20
+ ```
21
+
22
+ This will install the package globally. And you have to use commands like
23
+
24
+ ```bash
25
+ anilist tr -c 15
26
+ ```
27
+
28
+ #### How to use?
29
+
30
+ Create an API client from [anilist developer setting](https://anilist.co/settings/developer) with an application name and redirect url as `https://anilist.co/api/v2/oauth/pin`. After creating the client you will get `Client ID` and `Client Secret` which is required in order to login from CLI.
31
+
32
+ To login:
33
+
34
+ ```
35
+ anilist login -i <client-id> -s <client-secret>
36
+ ```
37
+
38
+ here `<client-id>` and `<client-secret>` should be replaced by the ones that you recieved from the developer setting.
39
+
40
+ #### CLI Commands Overview
41
+
42
+ | **Command** | **Options** | **Description** |
43
+ | ------------------------------------------- | ----------------------------------------------------------------------- | ------------------------------------------------------------------ |
44
+ | **`login`** | `-i, --id` `-s, --secret` | Log in with your AniList credentials |
45
+ | **`logout`** | _None_ | Log out from your AniList account |
46
+ | **`me`** | _None_ | Display information about the logged-in user |
47
+ | **`-V, --version`** | _None_ | Display the current version of the CLI |
48
+ | **`-h, --help`** | _None_ | Display available commands and options |
49
+ | **`trending`** <br> _(alias: `tr`)_ | `-c (default: 10)` | Fetch trending anime (default count is 10) |
50
+ | **`popular`** <br> _(alias: `plr`)_ | `-c (default: 10)` | Fetch popular anime (default count is 10) |
51
+ | **`user`** | `<username>` | Get information about a specific AniList user |
52
+ | **`lists`** <br> _(alias: `ls`)_ | `-a, --anime` <br> `-m, --manga` | Fetch anime or manga lists of the logged-in user |
53
+ | **`delete`** <br> _(alias: `del`)_ | `-a, --anime` <br> `-m, --manga` <br> `-ac, --activity` | Delete collections of anime, manga or activities |
54
+ | **`upcoming`** <br> _(alias:`up`)_ | `-c (default: 10)` | Fetch upcoming anime (default count is 10) |
55
+ | **`anime`** | `<anime-id>` | Get anime details by Anime Id |
56
+ | **`search`** <br> _(alias:`srch`/`find`)_ | `<query>` <br> `-a, --anime` <br> `-m, --manga` <br> `-c (default: 10)` | Get anime/manga search results |
57
+ | **`status`** <br> _(alias: `write`/`post`)_ | `<status>` | Write a status... (text/markdown/html) |
58
+ | **`export`** <br> _(alias: `exp`)_ | `-a, --anime` <br> `-m, --manga` | Export anime or manga list in JSON, CSV or XML (MyAnimeList) |
59
+ | **`import`** <br> _(alias: `imp`)_ | `-a, --anime` <br> `-m, --manga` | Import anime or manga list from exported JSON or MyAnimeList (XML) |
60
+
61
+ #### Command Breakdown:
62
+
63
+ #### `login`:
64
+
65
+ ```bash
66
+ anilist login -i <client-id> -s <client-secret>
67
+ ```
68
+
69
+ - **Options**:
70
+ - `-i, --id`: Specify AniList Client ID
71
+ - `-s, --secret`: Provide the AniList Client Secret
72
+ - **Usage**: Authenticate and log in to AniList using your ID and secret credentials.
73
+
74
+ #### `logout`:
75
+
76
+ ```bash
77
+ anilist logout
78
+ ```
79
+
80
+ - **Description**: End the current session and log out from your AniList account.
81
+
82
+ #### `me`:
83
+
84
+ ```bash
85
+ anilist me
86
+ ```
87
+
88
+ - **Description**: Retrieve and display information about the currently logged-in user, including stats and profile details.
89
+
90
+ #### `-V, --version`:
91
+
92
+ ```bash
93
+ anilist -V
94
+ ```
95
+
96
+ - **Description**: Quickly check which version of the CLI you are running.
97
+
98
+ #### `-h, --help`:
99
+
100
+ ```bash
101
+ anilist -h
102
+ ```
103
+
104
+ - **Description**: List all available commands and their usage details for quick reference.
105
+
106
+ #### `trending` _(alias: `tr`)_:
107
+
108
+ ```bash
109
+ anilist tr -c 15
110
+ ```
111
+
112
+ - **Options**:
113
+ - `-c (count)`: Specify how many trending anime to fetch (default: 10).
114
+ - **Description**: Fetch the current trending anime series, with the option to customize how many results to display.
115
+
116
+ #### `popular` _(alias: `plr`)_:
117
+
118
+ ```bash
119
+ anilist popular
120
+ ```
121
+
122
+ - **Options**:
123
+ - `-c (count)`: Specify how many popular anime to fetch (default: 10).
124
+ - **Description**: Fetch the most popular anime series, with the option to customize how many results to display.
125
+
126
+ #### `upcoming` _(alias: `up`)_:
127
+
128
+ ```bash
129
+ anilist up -c 25
130
+ ```
131
+
132
+ - **Options**:
133
+ - `-c (count)`: Specify how many upcoming anime to fetch (default: 10).
134
+ - **Description**: Fetch the upcoming anime series next season, with the option to customize how many results to display.
135
+
136
+ #### `user`:
137
+
138
+ ```bash
139
+ anilist user <username>
140
+ ```
141
+
142
+ - **Options**:
143
+ - `<username>`: Specify the AniList username to fetch.
144
+ - **Description**: Retrieve profile information about a specific AniList user.
145
+
146
+ #### `lists` _(alias: `ls`)_:
147
+
148
+ ```bash
149
+ anilist ls -a
150
+ ```
151
+
152
+ - **Options**:
153
+ - `-a, --anime`: Fetch the authenticated user's anime list.
154
+ - `-m, --manga`: Fetch the authenticated user's manga list.
155
+ - **Description**: Get the anime or manga lists of the logged-in user.
156
+
157
+ #### `delete` _(alias: `del`)_:
158
+
159
+ ```bash
160
+ anilist del -ac
161
+ ```
162
+
163
+ - **Options**:
164
+ - `-a, --anime`: Delete your specific anime collection that you want.
165
+ - `-m, --manga`: Delete your specific manga collection that you want.
166
+ - `-ac, --activity`: Delete all or any type of activities you want.
167
+ - **Description**: Delete the entire anime or manga collection from the logged-in user's profile.
168
+
169
+ #### `anime`
170
+
171
+ ```bash
172
+ anilist anime <anime-id>
173
+ ```
174
+
175
+ - **Options**
176
+ - `<anime-id>` _(eg: 21)_ : Id of the anime you want to get details of.
177
+ - **Description**: Get anime details by anime Id.
178
+
179
+ #### `search` _(alias: `srch`/`find`)_:
180
+
181
+ ```bash
182
+ anilist search <query> -a -c 20
183
+ ```
184
+
185
+ - **Options**:
186
+ - `<query>` : What you want to search (eg: naruto).
187
+ - `-a, --anime`: To get results of anime search.
188
+ - `-m, --manga`: To get results of manga search.
189
+ - `-c (count)`: Specify how many items to fetch (default: 10).
190
+ - **Description**: Get anime/manga search results
191
+
192
+ #### `status` _(alias: `write`/`post`)_:
193
+
194
+ ```bash
195
+ anilist write <status>
196
+ ```
197
+
198
+ - **Options**:
199
+ - `<status>` : This is what you want to write, It can be HTML, Markdown and/or Text. But wrap it with quotation mark (") else it might get cut-off.
200
+ - **Description**: Get anime/manga search results
201
+
202
+ #### `export` _(alias: `exp`)_:
203
+
204
+ ```bash
205
+ anilist export -a
206
+ ```
207
+
208
+ - **Options**:
209
+ - `-a, --anime`: To export anime list.
210
+ - `-m, --manga`: To export manga list.
211
+ - **Description**: Export anime or manga list. For `XML (MyAnimeList)` file, to import it on MyAnimeList, go [here](https://myanimelist.net/import.php) and choose `MyAnimeList Import`.
212
+
213
+ #### `import` _(alias: `imp`)_:
214
+
215
+ ```bash
216
+ anilist import -m
217
+ ```
218
+
219
+ - **Options**:
220
+ - `-a, --anime`: To import anime list.
221
+ - `-m, --manga`: To import manga list.
222
+ - **Description**: Import anime or manga list. If you want to import anime/manga list from MyAnimeList, export the XML from [here](https://myanimelist.net/panel.php?go=export).
223
+
224
+ #### Security
225
+
226
+ Since you are creating your own API client for login no else else can get your credentials and the generated access token will be stored in your own system. So, As long as you don't share your device (in case you do, just logout) you are safe.
227
+
228
+ #### Contribution
229
+
230
+ Want to contribute to the project? Check out complete guideline [here](CONTRIBUTING.md).
231
+
232
+ #### Donation
233
+
234
+ <img src='/assets/binance.jpg' alt='irfanshadikrishad_binance_pay' width='200px'><br>
235
+ Support the project if you find it useful to you.
236
+
237
+ #### **_Thanks for visiting 💙_**
Binary file
@@ -130,28 +130,28 @@ class Auth {
130
130
  perPage: 10,
131
131
  });
132
132
  const activities = (_b = (_a = activiResponse === null || activiResponse === void 0 ? void 0 : activiResponse.data) === null || _a === void 0 ? void 0 : _a.Page) === null || _b === void 0 ? void 0 : _b.activities;
133
- console.log(`
134
- ID: ${user === null || user === void 0 ? void 0 : user.id}
135
- Name: ${user === null || user === void 0 ? void 0 : user.name}
136
- siteUrl: ${user === null || user === void 0 ? void 0 : user.siteUrl}
137
- profileColor: ${(_c = user === null || user === void 0 ? void 0 : user.options) === null || _c === void 0 ? void 0 : _c.profileColor}
138
- timeZone: ${(_d = user === null || user === void 0 ? void 0 : user.options) === null || _d === void 0 ? void 0 : _d.timezone}
139
- activityMergeTime: ${(_e = user === null || user === void 0 ? void 0 : user.options) === null || _e === void 0 ? void 0 : _e.activityMergeTime}
140
- donatorTier: ${user === null || user === void 0 ? void 0 : user.donatorTier}
141
- donatorBadge: ${user === null || user === void 0 ? void 0 : user.donatorBadge}
142
- unreadNotificationCount:${user === null || user === void 0 ? void 0 : user.unreadNotificationCount}
143
- Account Created: ${new Date((user === null || user === void 0 ? void 0 : user.createdAt) * 1000).toUTCString()}
144
- Account Updated: ${new Date((user === null || user === void 0 ? void 0 : user.updatedAt) * 1000).toUTCString()}
145
-
146
- Statistics (Anime):
147
- Count: ${(_g = (_f = user === null || user === void 0 ? void 0 : user.statistics) === null || _f === void 0 ? void 0 : _f.anime) === null || _g === void 0 ? void 0 : _g.count}
148
- Mean Score: ${(_j = (_h = user === null || user === void 0 ? void 0 : user.statistics) === null || _h === void 0 ? void 0 : _h.anime) === null || _j === void 0 ? void 0 : _j.meanScore}
149
- Minutes Watched: ${(_l = (_k = user === null || user === void 0 ? void 0 : user.statistics) === null || _k === void 0 ? void 0 : _k.anime) === null || _l === void 0 ? void 0 : _l.minutesWatched}
150
-
151
- Statistics (Manga):
152
- Count: ${(_o = (_m = user === null || user === void 0 ? void 0 : user.statistics) === null || _m === void 0 ? void 0 : _m.manga) === null || _o === void 0 ? void 0 : _o.count}
153
- Chapters Read: ${(_q = (_p = user === null || user === void 0 ? void 0 : user.statistics) === null || _p === void 0 ? void 0 : _p.manga) === null || _q === void 0 ? void 0 : _q.chaptersRead}
154
- Volumes Read: ${(_s = (_r = user === null || user === void 0 ? void 0 : user.statistics) === null || _r === void 0 ? void 0 : _r.manga) === null || _s === void 0 ? void 0 : _s.volumesRead}
133
+ console.log(`
134
+ ID: ${user === null || user === void 0 ? void 0 : user.id}
135
+ Name: ${user === null || user === void 0 ? void 0 : user.name}
136
+ siteUrl: ${user === null || user === void 0 ? void 0 : user.siteUrl}
137
+ profileColor: ${(_c = user === null || user === void 0 ? void 0 : user.options) === null || _c === void 0 ? void 0 : _c.profileColor}
138
+ timeZone: ${(_d = user === null || user === void 0 ? void 0 : user.options) === null || _d === void 0 ? void 0 : _d.timezone}
139
+ activityMergeTime: ${(_e = user === null || user === void 0 ? void 0 : user.options) === null || _e === void 0 ? void 0 : _e.activityMergeTime}
140
+ donatorTier: ${user === null || user === void 0 ? void 0 : user.donatorTier}
141
+ donatorBadge: ${user === null || user === void 0 ? void 0 : user.donatorBadge}
142
+ unreadNotificationCount:${user === null || user === void 0 ? void 0 : user.unreadNotificationCount}
143
+ Account Created: ${new Date((user === null || user === void 0 ? void 0 : user.createdAt) * 1000).toUTCString()}
144
+ Account Updated: ${new Date((user === null || user === void 0 ? void 0 : user.updatedAt) * 1000).toUTCString()}
145
+
146
+ Statistics (Anime):
147
+ Count: ${(_g = (_f = user === null || user === void 0 ? void 0 : user.statistics) === null || _f === void 0 ? void 0 : _f.anime) === null || _g === void 0 ? void 0 : _g.count}
148
+ Mean Score: ${(_j = (_h = user === null || user === void 0 ? void 0 : user.statistics) === null || _h === void 0 ? void 0 : _h.anime) === null || _j === void 0 ? void 0 : _j.meanScore}
149
+ Minutes Watched: ${(_l = (_k = user === null || user === void 0 ? void 0 : user.statistics) === null || _k === void 0 ? void 0 : _k.anime) === null || _l === void 0 ? void 0 : _l.minutesWatched}
150
+
151
+ Statistics (Manga):
152
+ Count: ${(_o = (_m = user === null || user === void 0 ? void 0 : user.statistics) === null || _m === void 0 ? void 0 : _m.manga) === null || _o === void 0 ? void 0 : _o.count}
153
+ Chapters Read: ${(_q = (_p = user === null || user === void 0 ? void 0 : user.statistics) === null || _p === void 0 ? void 0 : _p.manga) === null || _q === void 0 ? void 0 : _q.chaptersRead}
154
+ Volumes Read: ${(_s = (_r = user === null || user === void 0 ? void 0 : user.statistics) === null || _r === void 0 ? void 0 : _r.manga) === null || _s === void 0 ? void 0 : _s.volumesRead}
155
155
  `);
156
156
  console.log(`\nRecent Activities:`);
157
157
  if (activities.length > 0) {
@@ -194,10 +194,11 @@ Statistics (Manga):
194
194
  static Logout() {
195
195
  return __awaiter(this, void 0, void 0, function* () {
196
196
  try {
197
+ const username = yield Auth.MyUserName();
197
198
  if (fs.existsSync(save_path)) {
198
199
  try {
199
200
  fs.unlinkSync(save_path);
200
- console.log(`\nLogout successful. See you soon, ${yield Auth.MyUserName()}.`);
201
+ console.log(`\nLogout successful. See you soon, ${username}.`);
201
202
  }
202
203
  catch (error) {
203
204
  console.error("\nError logging out:", error);
@@ -168,49 +168,49 @@ function selectFile(fileType) {
168
168
  });
169
169
  }
170
170
  function createAnimeXML(malId, progress, status, episodes, title) {
171
- return `
172
- <anime>
173
- <series_animedb_id>${malId}</series_animedb_id>
174
- <series_title><![CDATA[${title}]]></series_title>
175
- <series_type>""</series_type>
176
- <series_episodes>${episodes}</series_episodes>
177
- <my_id>0</my_id>
178
- <my_watched_episodes>${progress}</my_watched_episodes>
179
- <my_start_date>0000-00-00</my_start_date>
180
- <my_finish_date>0000-00-00</my_finish_date>
181
- <my_score>0</my_score>
182
- <my_storage_value>0.00</my_storage_value>
183
- <my_status>${status}</my_status>
184
- <my_comments><![CDATA[]]></my_comments>
185
- <my_times_watched>0</my_times_watched>
186
- <my_rewatch_value></my_rewatch_value>
187
- <my_priority>LOW</my_priority>
188
- <my_tags><![CDATA[]]></my_tags>
189
- <my_rewatching>0</my_rewatching>
190
- <my_rewatching_ep>0</my_rewatching_ep>
191
- <my_discuss>0</my_discuss>
192
- <my_sns>default</my_sns>
193
- <update_on_import>1</update_on_import>
171
+ return `
172
+ <anime>
173
+ <series_animedb_id>${malId}</series_animedb_id>
174
+ <series_title><![CDATA[${title}]]></series_title>
175
+ <series_type>""</series_type>
176
+ <series_episodes>${episodes}</series_episodes>
177
+ <my_id>0</my_id>
178
+ <my_watched_episodes>${progress}</my_watched_episodes>
179
+ <my_start_date>0000-00-00</my_start_date>
180
+ <my_finish_date>0000-00-00</my_finish_date>
181
+ <my_score>0</my_score>
182
+ <my_storage_value>0.00</my_storage_value>
183
+ <my_status>${status}</my_status>
184
+ <my_comments><![CDATA[]]></my_comments>
185
+ <my_times_watched>0</my_times_watched>
186
+ <my_rewatch_value></my_rewatch_value>
187
+ <my_priority>LOW</my_priority>
188
+ <my_tags><![CDATA[]]></my_tags>
189
+ <my_rewatching>0</my_rewatching>
190
+ <my_rewatching_ep>0</my_rewatching_ep>
191
+ <my_discuss>0</my_discuss>
192
+ <my_sns>default</my_sns>
193
+ <update_on_import>1</update_on_import>
194
194
  </anime>`;
195
195
  }
196
196
  function createMangaXML(malId, progress, status, chapters, title) {
197
- return `
198
- <manga>
199
- <manga_mangadb_id>${malId}</manga_mangadb_id>
200
- <manga_title><![CDATA[${title ? title : "unknown"}]]></manga_title>
201
- <manga_volumes>0</manga_volumes>
202
- <manga_chapters>${chapters ? chapters : 0}</manga_chapters>
203
- <my_id>0</my_id>
204
- <my_read_chapters>${progress}</my_read_chapters>
205
- <my_start_date>0000-00-00</my_start_date>
206
- <my_finish_date>0000-00-00</my_finish_date>
207
- <my_score>0</my_score>
208
- <my_status>${status}</my_status>
209
- <my_reread_value></my_reread_value>
210
- <my_priority>LOW</my_priority>
211
- <my_rereading>0</my_rereading>
212
- <my_discuss>0</my_discuss>
213
- <update_on_import>1</update_on_import>
197
+ return `
198
+ <manga>
199
+ <manga_mangadb_id>${malId}</manga_mangadb_id>
200
+ <manga_title><![CDATA[${title ? title : "unknown"}]]></manga_title>
201
+ <manga_volumes>0</manga_volumes>
202
+ <manga_chapters>${chapters ? chapters : 0}</manga_chapters>
203
+ <my_id>0</my_id>
204
+ <my_read_chapters>${progress}</my_read_chapters>
205
+ <my_start_date>0000-00-00</my_start_date>
206
+ <my_finish_date>0000-00-00</my_finish_date>
207
+ <my_score>0</my_score>
208
+ <my_status>${status}</my_status>
209
+ <my_reread_value></my_reread_value>
210
+ <my_priority>LOW</my_priority>
211
+ <my_rereading>0</my_rereading>
212
+ <my_discuss>0</my_discuss>
213
+ <update_on_import>1</update_on_import>
214
214
  </manga>`;
215
215
  }
216
216
  function createAnimeListXML(mediaWithProgress) {
@@ -230,19 +230,19 @@ function createAnimeListXML(mediaWithProgress) {
230
230
  const status = statusMap[anime.status];
231
231
  return createAnimeXML(malId, progress, status, episodes, title);
232
232
  });
233
- return `<myanimelist>
234
- <myinfo>
235
- <user_id/>
236
- <user_name>${yield Auth.MyUserName()}</user_name>
237
- <user_export_type>1</user_export_type>
238
- <user_total_anime>0</user_total_anime>
239
- <user_total_watching>0</user_total_watching>
240
- <user_total_completed>0</user_total_completed>
241
- <user_total_onhold>0</user_total_onhold>
242
- <user_total_dropped>0</user_total_dropped>
243
- <user_total_plantowatch>0</user_total_plantowatch>
244
- </myinfo>
245
- \n${xmlEntries.join("\n")}\n
233
+ return `<myanimelist>
234
+ <myinfo>
235
+ <user_id/>
236
+ <user_name>${yield Auth.MyUserName()}</user_name>
237
+ <user_export_type>1</user_export_type>
238
+ <user_total_anime>0</user_total_anime>
239
+ <user_total_watching>0</user_total_watching>
240
+ <user_total_completed>0</user_total_completed>
241
+ <user_total_onhold>0</user_total_onhold>
242
+ <user_total_dropped>0</user_total_dropped>
243
+ <user_total_plantowatch>0</user_total_plantowatch>
244
+ </myinfo>
245
+ \n${xmlEntries.join("\n")}\n
246
246
  </myanimelist>`;
247
247
  });
248
248
  }
@@ -263,19 +263,19 @@ function createMangaListXML(mediaWithProgress) {
263
263
  const status = statusMap[manga.status];
264
264
  return createMangaXML(malId, progress, status, chapters, title);
265
265
  });
266
- return `<myanimelist>
267
- <myinfo>
268
- <user_id/>
269
- <user_name>${yield Auth.MyUserName()}</user_name>
270
- <user_export_type>2</user_export_type>
271
- <user_total_manga>5</user_total_manga>
272
- <user_total_reading>1</user_total_reading>
273
- <user_total_completed>1</user_total_completed>
274
- <user_total_onhold>1</user_total_onhold>
275
- <user_total_dropped>1</user_total_dropped>
276
- <user_total_plantoread>1</user_total_plantoread>
277
- </myinfo>
278
- \n${xmlEntries.join("\n")}\n
266
+ return `<myanimelist>
267
+ <myinfo>
268
+ <user_id/>
269
+ <user_name>${yield Auth.MyUserName()}</user_name>
270
+ <user_export_type>2</user_export_type>
271
+ <user_total_manga>5</user_total_manga>
272
+ <user_total_reading>1</user_total_reading>
273
+ <user_total_completed>1</user_total_completed>
274
+ <user_total_onhold>1</user_total_onhold>
275
+ <user_total_dropped>1</user_total_dropped>
276
+ <user_total_plantoread>1</user_total_plantoread>
277
+ </myinfo>
278
+ \n${xmlEntries.join("\n")}\n
279
279
  </myanimelist>`;
280
280
  });
281
281
  }
package/bin/index.js CHANGED
@@ -16,7 +16,7 @@ const cli = new Command();
16
16
  cli
17
17
  .name("anilist")
18
18
  .description("Minimalist unofficial AniList CLI for Anime and Manga Enthusiasts.")
19
- .version("1.0.9");
19
+ .version("1.0.11");
20
20
  cli
21
21
  .command("login")
22
22
  .description("Login with AniList")
package/package.json CHANGED
@@ -1,73 +1,73 @@
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.9",
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 -w",
17
- "format": "prettier . --write",
18
- "format:check": "prettier . --check",
19
- "lint": "eslint ./dist",
20
- "lint:fix": "eslint ./dist --fix",
21
- "all": "npm run lint && npm run lint:fix && npm run format"
22
- },
23
- "keywords": [
24
- "anilist",
25
- "CLI",
26
- "anime",
27
- "manga",
28
- "anime list",
29
- "manga list",
30
- "anime tracker",
31
- "manga tracker",
32
- "anilist API",
33
- "anime progress",
34
- "manga progress",
35
- "media list",
36
- "export anime",
37
- "import anime",
38
- "export manga",
39
- "import manga",
40
- "status tracker",
41
- "watchlist",
42
- "reading list",
43
- "graphql"
44
- ],
45
- "repository": {
46
- "type": "git",
47
- "url": "https://github.com/irfanshadikrishad/anilist"
48
- },
49
- "homepage": "https://github.com/irfanshadikrishad/anilist",
50
- "bugs": {
51
- "url": "https://github.com/irfanshadikrishad/anilist/issues"
52
- },
53
- "license": "MPL-2.0",
54
- "devDependencies": {
55
- "@eslint/js": "^9.13.0",
56
- "@types/json2csv": "^5.0.7",
57
- "@types/node": "^22.7.9",
58
- "eslint": "^9.13.0",
59
- "globals": "^15.11.0",
60
- "prettier": "^3.3.3",
61
- "prettier-plugin-organize-imports": "^4.1.0",
62
- "typescript": "^5.6.3",
63
- "typescript-eslint": "^8.11.0"
64
- },
65
- "dependencies": {
66
- "commander": "^12.1.0",
67
- "fast-xml-parser": "^4.5.0",
68
- "inquirer": "^12.0.0",
69
- "json2csv": "^6.0.0-alpha.2",
70
- "node-fetch": "^3.3.2",
71
- "open": "^10.1.0"
72
- }
73
- }
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.11",
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 -w",
17
+ "format": "prettier . --write",
18
+ "format:check": "prettier . --check",
19
+ "lint": "eslint ./dist",
20
+ "lint:fix": "eslint ./dist --fix",
21
+ "all": "npm run lint && npm run lint:fix && npm run format"
22
+ },
23
+ "keywords": [
24
+ "anilist",
25
+ "CLI",
26
+ "anime",
27
+ "manga",
28
+ "anime list",
29
+ "manga list",
30
+ "anime tracker",
31
+ "manga tracker",
32
+ "anilist API",
33
+ "anime progress",
34
+ "manga progress",
35
+ "media list",
36
+ "export anime",
37
+ "import anime",
38
+ "export manga",
39
+ "import manga",
40
+ "status tracker",
41
+ "watchlist",
42
+ "reading list",
43
+ "graphql"
44
+ ],
45
+ "repository": {
46
+ "type": "git",
47
+ "url": "https://github.com/irfanshadikrishad/anilist"
48
+ },
49
+ "homepage": "https://github.com/irfanshadikrishad/anilist",
50
+ "bugs": {
51
+ "url": "https://github.com/irfanshadikrishad/anilist/issues"
52
+ },
53
+ "license": "MPL-2.0",
54
+ "devDependencies": {
55
+ "@eslint/js": "^9.13.0",
56
+ "@types/json2csv": "^5.0.7",
57
+ "@types/node": "^22.8.6",
58
+ "eslint": "^9.13.0",
59
+ "globals": "^15.11.0",
60
+ "prettier": "^3.3.3",
61
+ "prettier-plugin-organize-imports": "^4.1.0",
62
+ "typescript": "^5.6.3",
63
+ "typescript-eslint": "^8.12.2"
64
+ },
65
+ "dependencies": {
66
+ "commander": "^12.1.0",
67
+ "fast-xml-parser": "^4.5.0",
68
+ "inquirer": "^12.0.1",
69
+ "json2csv": "^6.0.0-alpha.2",
70
+ "node-fetch": "^3.3.2",
71
+ "open": "^10.1.0"
72
+ }
73
+ }