From a8f3a2d5e1e5ef50e9ef259246cc26e2be631809 Mon Sep 17 00:00:00 2001 From: Zergling_man Date: Mon, 23 Sep 2024 21:44:29 +1000 Subject: [PATCH] I also forget to add files --- md.sh | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100755 md.sh diff --git a/md.sh b/md.sh new file mode 100755 index 0000000..cdfc6de --- /dev/null +++ b/md.sh @@ -0,0 +1,15 @@ +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`; } + +$@ \ No newline at end of file