mcp-rule34 0.1.0 → 1.1.0
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 +0 -0
- package/README.md +55 -23
- package/dist/index.d.ts +0 -0
- package/dist/index.js +252 -83
- package/dist/index.js.map +1 -1
- package/dist/rule34/client.d.ts +31 -3
- package/dist/rule34/client.js +79 -12
- package/dist/rule34/client.js.map +1 -1
- package/package.json +1 -1
- package/server.json +2 -2
package/LICENSE
CHANGED
|
File without changes
|
package/README.md
CHANGED
|
@@ -76,10 +76,23 @@ it knows the site will refuse.
|
|
|
76
76
|
|
|
77
77
|
## Tools
|
|
78
78
|
|
|
79
|
-
| Tool | What it does
|
|
80
|
-
| -------------- |
|
|
81
|
-
| `search_posts` | Finds posts carrying a tag, or several at once.
|
|
82
|
-
| `get_post` | Reads one post whole, with a kind for every tag.
|
|
79
|
+
| Tool | What it does | Key parameters |
|
|
80
|
+
| -------------- | ------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
81
|
+
| `search_posts` | Finds posts carrying a tag, or several at once. | `tags`, `any_of`, `exclude`, `media_type`, `rating`, `sort`, `limit`, `page` |
|
|
82
|
+
| `get_post` | Reads one post whole, with a kind for every tag. | `id`, `url` |
|
|
83
|
+
| `find_tags` | Finds how the site spells a tag, and how many posts carry it. | `query` |
|
|
84
|
+
|
|
85
|
+
### Finding how a tag is spelled
|
|
86
|
+
|
|
87
|
+
`find_tags` asks rule34.xxx which names begin with a piece of text, and how many
|
|
88
|
+
posts each one carries. It matches from the start of a name, so `kimagure` finds
|
|
89
|
+
`kimagure_orange_road` while a word sitting in the middle of a name finds
|
|
90
|
+
nothing. The site offers at most ten names and the answer says so, since ten
|
|
91
|
+
back means the list was cut rather than exhausted.
|
|
92
|
+
|
|
93
|
+
This is also what a search that found nothing falls back on: when a required tag
|
|
94
|
+
does not exist, the answer names it and offers the names the site does hold that
|
|
95
|
+
begin like it.
|
|
83
96
|
|
|
84
97
|
### A search names posts, a post is then read whole
|
|
85
98
|
|
|
@@ -91,12 +104,12 @@ first twelve and states how many the post carries in all.
|
|
|
91
104
|
`get_post` reads one post by its id, or by a link to its page, and returns every
|
|
92
105
|
tag with its kind, character, copyright, artist, general or metadata, and how
|
|
93
106
|
many posts share it, alongside the uploader, the number of comments and the
|
|
94
|
-
|
|
107
|
+
date the site took it in. A link is read rather than followed: this server builds its
|
|
95
108
|
own request from the id it finds in it.
|
|
96
109
|
|
|
97
110
|
Reading one post costs two requests, because neither format the API publishes
|
|
98
|
-
carries everything: the
|
|
99
|
-
name, the comment count and the tag kinds from the other.
|
|
111
|
+
carries everything: the date the site took the post in comes from one, and the
|
|
112
|
+
uploader's name, the comment count and the tag kinds from the other.
|
|
100
113
|
|
|
101
114
|
### Tags are single tokens
|
|
102
115
|
|
|
@@ -156,11 +169,13 @@ Every answer carries the total the site counted for the whole search, the page
|
|
|
156
169
|
that was served, and the search as it was sent in the site's own language. A
|
|
157
170
|
post carries its rule34.xxx page, its file, its thumbnail, its dimensions, its
|
|
158
171
|
score, its rating, its tags, whatever the uploader credited as a source, and the
|
|
159
|
-
date it
|
|
172
|
+
date rule34.xxx took it in.
|
|
160
173
|
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
174
|
+
A post carries two dates, and neither one is when its subject was made. The
|
|
175
|
+
first is the day the site took the post in, the second the day the post last
|
|
176
|
+
changed, which retagging moves. rule34.xxx imported much of its older catalogue
|
|
177
|
+
in bulk, so thousands of posts share one day in November 2010: a question about
|
|
178
|
+
what came first is answered by the import, not by the work.
|
|
164
179
|
|
|
165
180
|
## What this server does not do
|
|
166
181
|
|
|
@@ -281,10 +296,23 @@ une requête dont il sait que le site la refusera.
|
|
|
281
296
|
|
|
282
297
|
## Les outils
|
|
283
298
|
|
|
284
|
-
| Outil | Ce qu'il fait
|
|
285
|
-
| -------------- |
|
|
286
|
-
| `search_posts` | Trouve les posts portant un tag, ou plusieurs.
|
|
287
|
-
| `get_post` | Lit un post en entier, avec le type de chacun de ses tags.
|
|
299
|
+
| Outil | Ce qu'il fait | Paramètres principaux |
|
|
300
|
+
| -------------- | -------------------------------------------------------------------- | ---------------------------------------------------------------------------- |
|
|
301
|
+
| `search_posts` | Trouve les posts portant un tag, ou plusieurs. | `tags`, `any_of`, `exclude`, `media_type`, `rating`, `sort`, `limit`, `page` |
|
|
302
|
+
| `get_post` | Lit un post en entier, avec le type de chacun de ses tags. | `id`, `url` |
|
|
303
|
+
| `find_tags` | Trouve comment le site écrit un tag, et combien de posts le portent. | `query` |
|
|
304
|
+
|
|
305
|
+
### Trouver comment un tag s'écrit
|
|
306
|
+
|
|
307
|
+
`find_tags` demande à rule34.xxx quels noms commencent par un texte, et combien
|
|
308
|
+
de posts chacun porte. La correspondance part du début d'un nom, donc `kimagure`
|
|
309
|
+
trouve `kimagure_orange_road` là où un mot situé au milieu d'un nom ne trouve
|
|
310
|
+
rien. Le site propose au plus dix noms et la réponse le dit, puisque dix en
|
|
311
|
+
retour signifie une liste coupée plutôt qu'épuisée.
|
|
312
|
+
|
|
313
|
+
C'est aussi le repli d'une recherche qui n'a rien trouvé : quand un tag requis
|
|
314
|
+
n'existe pas, la réponse le nomme et propose les noms que le site détient et qui
|
|
315
|
+
commencent comme lui.
|
|
288
316
|
|
|
289
317
|
### La recherche nomme les posts, la fiche les lit en entier
|
|
290
318
|
|
|
@@ -297,12 +325,13 @@ au total.
|
|
|
297
325
|
`get_post` lit un post par son identifiant, ou par un lien vers sa page, et rend
|
|
298
326
|
chaque tag avec son type, personnage, copyright, artiste, général ou métadonnée,
|
|
299
327
|
et le nombre de posts qui le partagent, avec le déposant, le nombre de
|
|
300
|
-
commentaires et la date
|
|
328
|
+
commentaires et la date à laquelle le site l'a pris. Un lien est lu et non suivi : ce serveur
|
|
301
329
|
construit sa propre requête à partir de l'identifiant qu'il y trouve.
|
|
302
330
|
|
|
303
331
|
Lire une fiche coûte deux requêtes, parce qu'aucun des deux formats publiés par
|
|
304
|
-
l'API ne porte tout : la date
|
|
305
|
-
déposant, le nombre de commentaires et les types de tags viennent
|
|
332
|
+
l'API ne porte tout : la date à laquelle le site a pris le post vient de l'un,
|
|
333
|
+
et le nom du déposant, le nombre de commentaires et les types de tags viennent
|
|
334
|
+
de l'autre.
|
|
306
335
|
|
|
307
336
|
### Un tag est un seul mot
|
|
308
337
|
|
|
@@ -357,11 +386,14 @@ Chaque réponse porte le total compté par le site pour la recherche entière, l
|
|
|
357
386
|
page servie, et la requête telle qu'elle a été envoyée dans le langage du site.
|
|
358
387
|
Un post porte sa page rule34.xxx, son fichier, sa vignette, ses dimensions, son
|
|
359
388
|
score, sa classification, ses tags, la source créditée par le déposant quand il
|
|
360
|
-
en a crédité une, et
|
|
361
|
-
|
|
362
|
-
Un post porte deux dates et
|
|
363
|
-
|
|
364
|
-
|
|
389
|
+
en a crédité une, et la date à laquelle rule34.xxx l'a pris.
|
|
390
|
+
|
|
391
|
+
Un post porte deux dates, et aucune n'est celle où son sujet a été fait. La
|
|
392
|
+
première est le jour où le site a pris le post, la seconde le jour où il a
|
|
393
|
+
changé pour la dernière fois, que le retaguage déplace. rule34.xxx a importé en
|
|
394
|
+
masse une grande partie de son fonds ancien, donc des milliers de posts portent
|
|
395
|
+
un même jour de novembre 2010 : une question sur ce qui vient en premier est
|
|
396
|
+
répondue par l'import, jamais par l'œuvre.
|
|
365
397
|
|
|
366
398
|
## Ce que ce serveur ne fait pas
|
|
367
399
|
|
package/dist/index.d.ts
CHANGED
|
File without changes
|