15 lines
1.1 KiB
Bash
Executable File
15 lines
1.1 KiB
Bash
Executable File
function generate_link { echo https://mangadex.org/title/$1/`tr '[:upper:] ' '[:lower:]-' <<< "${*:2}" | tr -cd '[:lower:]-'`; }
|
|
|
|
function search { curl -s "https://api.mangadex.org/manga?contentRating[]=safe&contentRating[]=suggestive&contentRating[]=erotica&contentRating[]=pornographic&title=$(sed 's/ /+/g' <<< $*)" | jq ".data | .[] | .id,.attributes.title.en?,.attributes.description.en?,\"\""; }
|
|
|
|
function information { curl -s "https://api.mangadex.org/manga/$1" | jq ".data | .id,.attributes.title.en?,.attributes.description.en?,\"\""; }
|
|
|
|
function chapter_information { inf=$(curl -s "https://api.mangadex.org/chapter/$1"); jq '.data.attributes | .volume+" "+.chapter' <<< "$inf"; mdi $(jq -r '.data.relationships[] | select (.type=="manga").id' <<< "$inf"); }
|
|
|
|
function download { dler.py $@; }
|
|
|
|
function update_from_v3_to_v5 { curl -si https://mangadex.org/title/$1 | grep -i location; }
|
|
|
|
function login { INSTANCE=api.mangadex.org; TOKE=`curl -s https://$INSTANCE/auth/login --json '{"username":"'$USERNAME'","password":"'$PASSWORD'"}' | jq -r .token.session`; }
|
|
|
|
$@ |