Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/wuhan005/jkit
🔧 JSON CLI Tool
https://github.com/wuhan005/jkit
Last synced: about 10 hours ago
JSON representation
🔧 JSON CLI Tool
- Host: GitHub
- URL: https://github.com/wuhan005/jkit
- Owner: wuhan005
- License: mit
- Created: 2021-01-18T17:45:34.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2021-10-06T15:09:55.000Z (about 3 years ago)
- Last Synced: 2024-06-21T16:55:50.320Z (5 months ago)
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 5
- Watchers: 3
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 🔧 jkit [![Go](https://github.com/wuhan005/jkit/actions/workflows/go.yml/badge.svg)](https://github.com/wuhan005/jkit/actions/workflows/go.yml)
JSON CLI Tool
## Install
```bash
git clone https://github.com/wuhan005/jkit.git
cd jkit
go install
```## Usage
Copy your JSON first, then enjoy it.
------
### `jkit f` Format JSON
[Input JSON](https://i.apicon.cn/chunzhen/?ip=52.68.96.58)
```bash
> jkit f{
"data": {
"area": "东京Amazon数据中心",
"country": "日本",
"ip": "52.68.96.58"
},
"error": 0,
"msg": "success"
}
```### `jkit c ` Fold JSON
[Input JSON](https://api.bilibili.com/pgc/web/season/section?season_id=34412)
```bash
> jkit c 4{
"code": 0.000000,
"message": "success",
"result": {
"main_section": {
"type": 0.000000,
"episodes": [
{ 14 items dict },
{ 14 items dict },
{ 14 items dict },
{ 14 items dict },
{ 14 items dict },
],
"id": 49914.000000,
"title": "正片"
},
"section": [
{
"id": 50112.000000,
"title": "PV",
"type": 2.000000,
"episodes": [ 3 items array ]
}
]
}
}
```### `jkit g` Get JSON element
[Input JSON](https://api.bilibili.com/pgc/web/season/section?season_id=34412)
```bash
> jkit g result.main_section.episodes.0{
"badge": "会员",
"badge_info": {
"bg_color": "#FB7299",
"bg_color_night": "#BB5B76",
"text": "会员"
},
"cover": "http://i0.hdslb.com/bfs/archive/34a44b83a9c657a9d096d85771334f545e32dd17.jpg",
"from": "bangumi",
"id": 341208,
"is_premiere": 0,
"status": 13,
"title": "1",
"vid": "",
"badge_type": 0,
"long_title": "见习魔女伊蕾娜",
"aid": 329827456,
"cid": 281989571,
"share_url": "https://www.bilibili.com/bangumi/play/ep341208"
}
```### `jkit m` Generate JSON form list
Input from my [GitHub profile README](https://github.com/wuhan005/wuhan005):
```bash
> jkit m[
"Hi, I'm E99p1ant. 🍆",
"🐭 Focus on Golang.",
"🏠 Blog at github.red.",
"💬 Ask me something?",
"🤤 Buy me a cup of coffee.",
"Some cool gadgets I made:",
"",
"NekoBox - 匿名提问箱 / Anonymous Question Box",
"Apicon - API 热爱者"
]
```