aboutsummaryrefslogtreecommitdiff
path: root/config/moebooru.zsh
blob: f0c38df17f75f261e9019ce8a555b8140f6badd3 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
# Copyright (C) 2024-2026 Maria Lisina
# Copyright (C) 2024-2026 Danil Lisin
# SPDX-License-Identifier: Apache-2.0

ib_cname="moebooru"

case "${ib_board}" in
    (k)
        ib_name="Konachan"
        ib_api="https://konachan.com"
        ib_url="https://konachan.com"
    ;;
    (y)
        ib_name="Yandere"
        ib_api="https://yande.re"
        ib_url="https://yande.re"
    ;;
esac

ib_ratings=(
    s safe
    q questionable
    e explicit
)

ib_groups=(
    tags Tags
)

case "${ib_mode}" in
    (l)
        ib_data_url="${ib_api}/pool.json"
        ib_dlimit="limit"
        ib_dpage="page"
        ib_dquery="query"
        ib_iid="id"
        ib_icreated="created_at"
        ib_ipool="name"
        ib_icount="post_count"
        ib_idate="%Y-%m-%dT%X"
        ib_ispace="_"
        ib_url="${ib_url}/pool/show/"
    ;;
    (p)
        ib_data_url="${ib_api}/post.json"
        ib_dlimit="limit"
        ib_dpage="page"
        ib_dquery="tags"
        ib_iid="id"
        ib_icreated="created_at"
        ib_isize="file_size"
        ib_ifile="file_url"
        ib_isample="sample_url"
        ib_ipreview="preview_url"
        ib_iwidth="width"
        ib_iheight="height"
        ib_irating="rating"
        ib_iparent="parent_id"
        ib_ichildren="has_children"
        ib_imd5="md5"
        ib_isource="source"
        ib_itags="tags"
        ib_url="${ib_url}/post/show/"
    ;;
    (t)
        ib_data_url="${ib_api}/tag.json"
        ib_dlimit="limit"
        ib_dpage="page"
        ib_dquery="name"
        ib_iid="id"
        ib_itag="name"
        ib_icount="count"
        ib_irecode="UTF-8"
        ib_url="${ib_url}/wiki/show?title="
    ;;
esac