Advertisement
karim0209

19062023_Termux opener

Jun 19th, 2023
1,155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Bash 11.97 KB | None | 0 0
  1. #!/data/data/com.termux/files/usr/bin/bash
  2. export XDG_RUNTIME_DIR='/data/data/com.termux/files/usr/tmp/runtime-u0_a547'
  3. export RUNLEVEL=3
  4. echo "For Audio playlist items    in folder press 111"
  5. echo "File Best video file in jukebox folder  press 0"
  6. echo "File download best short video file   press 99"
  7. echo "For playlist Audio files folder in JukeBox press 1"
  8. echo "For  single  Audio   file in JukeBox press 2"
  9. echo "File download video files in Folder   press 3"
  10. echo "For videos playlist items    in folder press 4"
  11. echo "For plist Audio files mp3 format in JukeBox press 5"
  12. echo "For plist Audio files mp3 format items u want in JukF 6"
  13. echo "For Audio cut using     ffmpeg        press 7"
  14. echo "for item files in folder for playlist press 8"
  15. echo "For Download     instagram    photos  press 9"
  16. echo "For Download youtube video description  in eP press 88"
  17. echo "For Download youtube video description  press 890"
  18. echo "For Download    instagram photo item  press 10"
  19. echo "For Download     spotify playlist     press 11"
  20. echo "For Download     spotify    songs     press 12"
  21. echo "For Download     spotify       Album  press 13"
  22. echo "For gdrivedl    download g    file    press 14"
  23. echo "For url mp3 file download using arial press 15"
  24. echo "For AIR mp3 file download using arial press 16"
  25. echo "For gdrivedl    download g    file    press 17"
  26. echo "For .pdf file download using arial press 18"
  27. echo "For all pdf files in a url download using arial press 19"
  28. echo "For Audio playlist of channel   in folder press 20"
  29. echo "download using THAu&Fino press 21"
  30. echo "Download .m4a file in Dristi Topics press 22"
  31. echo "Download day wise News analysis by DristiIAS press 23"
  32. command="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(title)s -- %(uploader)s.%(ext)s' -i --external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  33. dfol="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/StudyMaterials/DristiIASm4a/%(title)s.%(ext)s' -i"
  34. command1="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(title)s -- %(uploader)s.%(ext)s' -i"
  35. folder="--embed-thumbnail --no-part --no-warnings --no-mtime -o '/data/data/com.termux/files/home/storage/shared/JukeBox/%(playlist)s/%(title)s -- %(uploader)s.%(ext)s' -i --external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  36. dloader="--external-downloader aria2c --external-downloader-args '-c -x 16 -s 16 -k 1M --file-allocation=none'"
  37. Grange="--dest ~/storage/shared/Gallery --range"
  38. Gl="--dest ~/storage/shared/Gallery"
  39. read option
  40. if [ "$option" -eq "111" ]
  41. then
  42.     cd ~/storage/shared/JukeBox/;ls
  43.     echo "Enter you want video items like 2,4-7,..in playlist"
  44.     read items
  45.     yt-dlp -I $items -f 140 --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  46. elif [ "$option" -eq "0" ]
  47. then
  48.     cd ~/storage/shared/Jukebox/VideoSongs/;ls
  49.     yt-dlp -f 22/18/best $1
  50. elif [ "$option" -eq "99" ]
  51. then
  52.     echo $1 | sed 's,shorts/,watch?v=,g'
  53.     cd ~/storage/shared/Youtube/ShortVideos/;ls
  54.     yt-dlp -f 18/22/best $(echo $1 | sed 's,shorts/,watch?v=,g')
  55. elif [ "$option" -eq "1" ]
  56. then
  57.     cd ~/storage/shared/JukeBox/;ls
  58.     yt-dlp -f 140 --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  59. elif [ "$option" -eq "2" ]
  60. then
  61.     cd ~/storage/shared/JukeBox/;ls
  62.     yt-dlp -f 140 --embed-thumbnail  $1
  63. elif [ "$option" -eq "3" ]
  64. then
  65.     cd ~/storage/shared/JukeBox/VideoSongs/;ls
  66.     yt-dlp -f 22/18 --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  67. elif [ "$option" -eq "4" ]
  68. then
  69.     cd ~/storage/shared/JukeBox/;ls
  70.     echo "Enter you want video items like 2,4-7,..in playlist"
  71.     read items
  72.     yt-dlp -f 22/18 -I $items --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  73. elif [ "$option" -eq "5" ]
  74. then
  75.     cd ~/storage/shared/JukeBox/;ls
  76.     yt-dlp --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  77. elif [ "$option" -eq "6" ]
  78. then
  79.     cd ~/storage/shared/JukeBox/;ls
  80.     echo "Enter you want audio items like 2,4-7,..in playlist"
  81.     read items
  82.     yt-dlp -I $items --extract-audio --audio-format mp3 --audio-quality 0 --embed-thumbnail -o '%(playlist)s/%(title)s.%(ext)s'  $1
  83. elif [ "$option" -eq "7" ]
  84. then
  85.     echo -e "Enter start time \n"
  86.     read start
  87.     echo -e "Enter end time duration\n"
  88.     read end
  89.     echo -e "Enter output file name \n"
  90.     read name
  91.     echo "-g -f 140" > ~/.config/youtube-dl/config
  92.     cd ~/storage/shared/Youtube
  93.     ffmpeg -i $(yt-dlp $1) -ss $start -t $end -c copy $name
  94. elif [ "$option" -eq "8" ]
  95. then
  96.     echo -e "Available formates \n"
  97.     youtube-dl -F $1
  98.     echo -e "Enter formates like 136+249 \n"
  99.     read format
  100.     echo -e "Enter Playlist Number You want to items \n"
  101.     read items
  102.     echo -e "$downloader  --no-part --no-mtime -o '/data/data/com.termux/files/home/storage/shared/Youtube/%(playlist)s/%(title)s.%(ext)s' -i -f $format --playlist-items $items" > ~/.config/youtube-dl/config
  103.     youtube-dl $1
  104. elif [ "$option" -eq "9" ]
  105. then
  106.     echo -e "Downloading photos .... \n"
  107.     gallery-dl -u dkarimulla2011@gmail.com -p Allah@786 $Gl $1 | sed 's,/?igshid=.*,,g'
  108. elif [ "$option" -eq "88" ]
  109. then
  110.     cd ~/storage/shared/JukeBox/description/eenaduPratibha/;ls
  111.     echo -e "Downloading video description please wait .... \n"
  112.     yt-dlp --skip-download --write-description $1;ls;sleep 7
  113. elif [ "$option" -eq "890" ]
  114. then
  115.     cd ~/storage/shared/JukeBox/description/;ls
  116.     echo -e "Downloading video description please wait .... \n"
  117.     yt-dlp --skip-download --write-description $1;ls;sleep 7
  118. elif [ "$option" -eq "10" ]
  119. then
  120.     echo -e "Enter specifying which images to download. For example '5-10' or '1,3-5 ... \n"
  121.     read num
  122.     echo -e "Downloading photos .... \n"
  123.     gallery-dl -u dkarimulla2011@gmail.com -p Allah@786 $Grange $num $1 | sed 's,/?igshid=.*,,g'
  124. elif [ "$option" -eq "11" ]
  125. then
  126. #    cd /data/data/com.termux/files/home/storage/shared/spotify-music
  127. #    echo -e "please wait Downloading playlist text file.... \n"
  128. #    spotdl -p $1 && pwd && ls
  129. #    echo -e "please Enter moving .txt file in folder \n"
  130. #    read fname
  131. #    mkdir $fname-$(echo "$(date +%A%d-%B-%Y-Time-%I-%M)")
  132. #    mv *.txt $fname-*
  133. #    cd $fname-* && pwd && ls
  134. #    echo -e "Type playlist name only without extention  \n"
  135. #    read file
  136. #    spotdl -l $file.txt && rm *.txt
  137.      spotdl $1
  138. elif [ "$option" -eq "12" ]
  139. then
  140.     echo -e "Please wait Downloading spotify song...\n"
  141.     cd storage/shared/spotify-music && ls
  142.     echo "" > ~/.config/youtube-dl/config
  143.     spotdl -s $1
  144. elif [ "$option" -eq "13" ]
  145. then
  146.     cd /data/data/com.termux/files/home/storage/shared/spotify-music
  147.     echo -e "please wait Downloading Album text file.... \n"
  148.     spotdl -a $1 && ls
  149.     echo -e "please Enter moving .txt file in folder \n"
  150.     read fname
  151.     mkdir $fname-$(echo "$(date +%A%d-%B-%Y-Time-%I-%M)")
  152.     mv *.txt $fname-*
  153.     cd $fname-* && pwd && ls
  154.     echo -e "Type playlist name only without extention  \n"
  155.     read file
  156.     spotdl -l $file.txt && rm *.txt
  157. elif [ "$option" -eq "14" ]
  158. then
  159.      cd ~/storage/shared/Youtube && ls && gdrivedl $1
  160. elif [ "$option" -eq "15" ]
  161. then
  162.     cd /data/data/com.termux/files/home/storage/shared/youtube
  163.     ls
  164.     echo -e "please wait mp3 file downloading.... \n"
  165.     aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $1 | grep mp3)
  166.     ls
  167. elif [ "$option" -eq "16" ]
  168. then
  169.     cd /data/data/com.termux/files/home/storage/shared/AIR
  170.     ls
  171.     echo -e "please wait mp3 file downloading.... \n"
  172.     aria2c -c -x 16 -s 16 -k 1M $1
  173.     ls
  174. elif [ "$option" -eq "17" ]
  175. then
  176.      cd ~/storage/shared/Youtube && ls && gdrivedl $(lynx -listonly -nonumbers -dump $1 | grep drive)
  177. elif [ "$option" -eq "18" ]
  178. then
  179.     cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  180.     ls
  181.     echo -e "please wait creating directory"
  182.     mkdir $(echo "$(date +%d-%A-%m-%B-%Y-%X%P)" | sed 's, ,-,g')
  183.     ls
  184.     echo -e "Entering Into the creating directory"
  185.     read folder
  186.     cd $folder
  187.     echo -e "please wait .pdf file downloading.... \n"
  188.     aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $1 | grep .pdf )
  189. elif [ "$option" -eq "19" ]
  190. then
  191.     cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  192.     ls
  193.     echo -e "Enter folder name u want please wait creating directory"
  194.     read fname
  195.     mkdir $fname-$(echo "$(date +%d-%A-%m-%B-%Y-%X%P)" | sed 's, ,-,g')
  196.     cd $fname-*
  197.     pwd
  198.     ls
  199.     echo -e "Enter url contain direct pdf files in gdrive 0"
  200.     echo -e "Enter url contain direct pdf files 1"
  201.     echo -e "Enter url contain next level web page pdf file 2"
  202.     read opt
  203.     if [ "$opt" -eq "0" ]
  204.     then
  205.     lynx -listonly -nonumbers -dump $1
  206.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  207.     read link name
  208.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  209.     echo -e "please wait .pdf files downloading gdrivedl.... \n"
  210.     while read file;do gdrivedl $file;done < $name.txt
  211.     elif [ "$opt" -eq "1" ]
  212.     then
  213.     lynx -listonly -nonumbers -dump $1
  214.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  215.     read link name
  216.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  217.     echo -e "please wait .pdf file downloading.... \n"
  218.     while read file;do aria2c -c -x 16 -s 16 -k 1M $file;done < $name.txt
  219.     elif [ "$opt" -eq "2" ]
  220.     then
  221.     lynx -listonly -nonumbers -dump $1
  222.     echo -e "Enter links to extract name and enter .txt file name like link name\n"
  223.     read link name
  224.     lynx -listonly -nonumbers -dump $1 | grep $link > $name.txt
  225.     echo -e "please wait .pdf file downloading.... \n"
  226.     while read file;do aria2c -c -x 16 -s 16 -k 1M $(lynx -listonly -nonumbers -dump $file | grep .pdf );done < $name.txt
  227.     fi
  228. elif [ "$option" -eq "20" ]
  229. then
  230.     echo "$folder --yes-playlist -f 140" > ~/.config/youtube-dl/config
  231.     youtube-dl $1
  232. elif [ "$option" -eq "21" ]
  233. then
  234.     echo -e "paste here your single url THAu press 1"
  235.     echo -e "paste here your single url FinoU press 2"
  236.     read opt
  237.     if [ "$opt" -eq "1" ]
  238.     then
  239.     cd ~/storage/shared/IAS/TheHindu/;ls
  240.     echo -e "$pwd\n Downloading web content ...."
  241.     ls
  242.     echo -e "paste here your single url"
  243.     THAu
  244.     echo -e "your single url data downloaded"
  245.     rm New*
  246.     sleep 3
  247.     elif [ "$opt" -eq "2" ]
  248.     then
  249.     cd ~/storage/shared/StudyMaterials/Finalogy
  250.     echo -e "$pwd\n Downloading web content ...."
  251.     ls
  252.     echo -e "paste here your single url"
  253.     FinoU
  254.     rm NewFilename*
  255.     echo -e "your single url data downloaded"
  256.     sleep 3
  257.     fi
  258. elif [ "$option" -eq "22" ]
  259. then
  260.     youtube-dl $dfol -f 140 $1 > ~/.config/youtube-dl/config
  261. elif [ "$option" -eq "23" ]
  262. then
  263.     cd ~/storage/shared/IAS/Dishti-News-Day-Wise/;ls
  264.     wkhtmltopdf $1 $(echo $1 | sed 's,https://www.drishtiias.com/current-affairs-news-analysis-editorials/news-analysis/,,g' | sed 's,/print,,g' | sed 's,https://vikaspedia.in/,,g' | sed 's,/,_,g' | sed 's,https://www.,,g' | sed 's,http://www.,,g' | sed 's,\.,_,g' | sed 's,?,,g').pdf ;ls;sleep 3
  265. fi
  266. #elif [ "$option" -eq "24" ]
  267. #then
  268. #    cd ~/storage/shared/IAS/TheHindu/;ls
  269. #    echo -e "$pwd\n Downloading web content ...."
  270. #    ls
  271. #    echo -e "paste here your single url"
  272. #    THAu
  273. #    echo -e "your single url data downloaded"
  274. #    rm New*
  275. #    sleep 3
  276. #/storage/emulated/0/Study-Materials/DristiIASm4a
  277. #elif [ "$option" -eq "21" ]
  278. #then
  279. #    cd /data/data/com.termux/files/home/storage/shared/Study-Materials
  280. #    ls
  281. #    echo -e "Downloading web content ...."
  282. #    TheHinduArticle > $(touch $(echo "$(date +%A%d-%B-%Y-Time-%I-%M).txt"))
  283. #    txt2pdf --font /data/data/com.termux/files/home/DroidSerif-Regular.ttf $(echo "$(date +%A%d--%B-%Y-Time-%I-%M).txt") -o $(echo "$(date +%A%d-%B-%Y-Time-%I-%M).pdf")
  284.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement