https://github.com/hans5958/premid-mts
:heavy_check_mark: PreMiD Presence Metadata Test Suite, a tool for testing "metadata.json" files on https://github.com/PreMiD/Presences.
https://github.com/hans5958/premid-mts
bash bash-script cli cli-app cli-tool cli-utilities premid script shell shell-script tool utility
Last synced: 9 days ago
JSON representation
:heavy_check_mark: PreMiD Presence Metadata Test Suite, a tool for testing "metadata.json" files on https://github.com/PreMiD/Presences.
- Host: GitHub
- URL: https://github.com/hans5958/premid-mts
- Owner: Hans5958
- License: mpl-2.0
- Created: 2020-05-13T14:15:55.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-07-12T06:12:44.000Z (over 5 years ago)
- Last Synced: 2025-04-07T01:28:24.552Z (6 months ago)
- Topics: bash, bash-script, cli, cli-app, cli-tool, cli-utilities, premid, script, shell, shell-script, tool, utility
- Language: Shell
- Homepage:
- Size: 25.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# PreMiD Presence Metadata Test Suite
PreMiD Presence Metadata Test Suite (PreMiD-MTS) is a script/tool that is developed to test a presence's metadata (``metadata.json``) on [PreMiD/Presences](https://github.com/PreMiD/Presences). The ``metadata.json`` files consist various information related to a presence.
The motive behind this project is some unfortunate events on PreMiD that is caused by human error. One example is a presence developer made a mistake on their metadata. This, for some reason, crashes the whole store. Another one is when I developed [my own presence stats dashboard thing](https://mini.hans5958.me/premid-presence-stats). It is occassional to see either someone typed the wrong category (``others`` instead of ``other``), the wrong language (``ja`` instead of ``ja_JP``), etc.
With that reasoning, I developed this test suite so developers can mitigate such events, and for make the staff team's jobs easier.
This is also a PoC that it is possible to integrate metadata checking by using continuous integration (Travis CI, GitHub Actions, etc), and my first attempt to develop a software (well, it's just a script, but...) using shell/bash/*nix script and a proper version control.
## Requirements
- A Linux/*nix enviroment.
I use WSL (the Ubuntu one) to developing this tool, so any Linux enviroment should work. This has not been tested in native Linux enviroment, however.
- [jq](https://stedolan.github.io/jq), for reading JSON files.## Installation
Just download the latest release [here](https://github.com/Hans5958/PreMiD-MTS/releases).
The ``.sh`` file includes the **main** variant of the program, and the ``.zip`` files includes the **main** and [**TAP**](https://en.wikipedia.org/wiki/Test_Anything_Protocol) variants.
Only use the [TAP](https://en.wikipedia.org/wiki/Test_Anything_Protocol) variant if you know what you are doing.
## Usage
```
Usage: premid-mts.sh [-hovrn] [--help] [--offline] [--verbose] [--results] [--no-ansi] pathpath Path to the presence folder OR the metadata.json file.
-h/--help Print this help text.
-o/--offline Use offline mode.
-v/--verbose Print the logs with more information.
-r/--results Print only the results.
-n/--no-ansi Print the logs without ANSI codes for viewing in text editors. Slower.
```
### Examples
```bash
$ bash premid-mts.sh GitHub
$ bash premid-mts.sh --offline Twitch/dist/metadata.json
$ bash premid-mts.sh --results websites/Y/YouTube
$ bash premid-mts.sh -ov DeviantArt
```## License
PreMiD Presence Metadata Test Suite (PreMiD-MTS) is licensed under the terms of [Mozila Public License 2.0](https://github.com/Hans5958/PreMiD-MTS/blob/master/LICENSE.md).