https://github.com/ltla/acceptable-anime-gifs-validator
Validator for the acceptable anime GIF database
https://github.com/ltla/acceptable-anime-gifs-validator
Last synced: about 1 year ago
JSON representation
Validator for the acceptable anime GIF database
- Host: GitHub
- URL: https://github.com/ltla/acceptable-anime-gifs-validator
- Owner: LTLA
- Created: 2021-11-24T08:44:31.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-12-04T07:18:54.000Z (over 4 years ago)
- Last Synced: 2025-02-10T12:28:16.514Z (over 1 year ago)
- Language: Go
- Homepage:
- Size: 15.6 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Validate the acceptable anime GIF registry
This repository contains code to validate the [acceptable anime GIF registry](https://github.com/LTLA/acceptable-anime-gifs).
It will also collate the GIF metadata into a single set of manifests for easy consumption by other projects.
To use, simply download the [prebuilt binary](https://github.com/LTLA/acceptable-anime-gifs-validator/releases/tag/latest)
(or run `go build .` yourself) and then run it on a directory containing the GIF registry:
```sh
./validator -dir registry
```
The registry should contain subdirectories for each show, which in turn contain the GIFs from that show.
Each show and each GIF should have a corresponding JSON file containing its metadata.
As a result, the contents of the registry directory should look like:
```
registry/
- .json
- /
- .gif
- .json
- .gif
- .json
- ..
- .json
- /
- .gif
- .json
- ...
- ...
```
Note that the `SHOW_*` and `GIF_*` are arbitrary - any value can be used as long as they are unique within their respective directories.
That is, each show has its own `SHOW_*` name, while each GIF within a given show has a different `GIF_*` name (which does not need to be unique across shows).
For each show, the metadata in the JSON file should contain:
- `id`: the [MyAnimeList](https://myanimelist.net) identifier for the show.
- `name`: the name of the show.
- `characters`: an object containing the name and MyAnimeList identifier for relevant characters.
For example, we might have:
```js
{
"id":"10165",
"name":"Nichijou",
"characters": {
"Nano Shinonome": "10422",
"Hakase Shinonome": "41055",
"Mio Naganohara": "40081"
}
}
```
For each GIF, the metadata should contain:
- `characters`: an array of strings naming the characters involved in the GIF.
Each character named in this manner should also be listed in the show's metadata.
- `sentiments`: an array of strings listing the sentiments expressed in the GIF.
(Controlled vocabulary coming soon.)
- `url`: string containing the original source of the GIF.
So, for example:
```js
{
"characters": [
"Mio Naganohara"
],
"sentiments": [
"attack"
],
"url": "https://25.media.tumblr.com/tumblr_m6r2fnOPGO1qzvtljo1_500.gif"
}
```
The program will then produce two JSON manifests containing arrays of objects.
The first is `gifs.json`, where each object describes a GIF and has the following fields:
- `path`: string containing the path to the GIF file relative to the input directory.
- `show_id`: string containing the MyAnimeList identifier for the show in which the GIF occurs.
- `characters`: an array of strings as described for the `.json` file.
- `sentiments`: an array of strings as described for the `.json` file.
- `url`: string as described for the `.json` file.
The second file is `shows.json`, which also contains an array of objects describing the individual shows.
Each object has exactly the same contents as the `.json` JSON file for each show.