Re: ydown-0.4.6 link downloader
Updated to 0.4.6 - Added mixcloud support with yt-dlp or youtube-dl. Added extra options when yt-dlp or youtube-dl is the downloading tool (pick the audio and/or video stream(s) to download).
Discussion, talk and tips
https://forum.puppylinux.com/
Updated to 0.4.6 - Added mixcloud support with yt-dlp or youtube-dl. Added extra options when yt-dlp or youtube-dl is the downloading tool (pick the audio and/or video stream(s) to download).
Wow, unexpected but hugely appreciated
Have a great weekend!!
updated to 0.4.7 - bugfixes and added yt-dlp update option to preferences
updated to 0.4.8 - bugfixes and changed main script to use either wget or curl so only one is required.
updated to 0.4.9 - code clean up
Here is my new in-house solution to gettext. It provides on-tap translations to text and interface labels, To acheive this gettext everything as usual, then install 'trans' script in path and add this function. The only problem is delay waiting for translation, but with short strings and few labels, it's negligible. My own modification of your script includes 'trans' so I select foreign language text and 'download' the translation using 'trans'. Of course do not source gettext ... (. gettext.sh). I need to find a way to save the translated interface strings per language, to re-use them thus removing any delays.
Code: Select all
function gettext {
if [[ $(type -p trans) != "" ]]; then
unset WORK
lang=$(locale | grep LANG | cut -c6,7)
if [ "$lng" == "$lang" ];then
echo "$1"
else
[ ! "$lng" ] && lng="$lang" || lng="$lng"
WORK=$(echo -e "$1" | trans -e google -no-auto -b -tl "lng")
[ "$WORK" ] && echo "$WORK" || echo "$1"
fi
else
echo "$1"
fi
}; export -f gettext
@stemsee, I'll add it to the next update.
I've solved the save and retrieve of translated strings. What it tries to do is not translate into english.
You can adjust to suit ydown requirements
EDIT: use sha512sum for saved file name.
EDIT: md5sum is better!
Code: Select all
function gettext {
syslang=$(locale | grep LANG | cut -c6,7)
unset WORK
if [ "$syslang" == 'en' ]; then
echo "$1"
elif [ "$syslang" != 'en' ]; then
HANDLE=$(echo "$1" | md5sum)
if [ -f /root/.ydown/transtext/"$syslang"/"$syslang"-"$HANDLE".transtext ]; then
WORK=$(cat /root/.ydown/transtext/"$syslang"/"$syslang"-"$HANDLE".transtext &)
echo "$WORK"
elif [[ $(type -p trans) != "" ]]; then
WORK=$(echo -e "$1" | trans -e google -no-auto -b -tl "$syslang" &)
[ "$WORK" ] && echo "$WORK" || echo "$1"
[ ! -d /root/.ydown/transtext/"$syslang" ] && mkdir -p /root/.ydown/transtext/"$syslang"
[ ! -f /root/.ydown/transtext/"$syslang"/"$syslang"-"$HANDLE".transtext ] && echo -e "$WORK" > /root/.ydown/transtext/"$syslang"/"$syslang"-"$HANDLE".transtext
else
echo "$1"
fi
fi
}; export -f gettext
Updated to 0.5.0 - some minor fixes and added @stemsee's gettext/trans function.
I wanted to bring to your attention another cli script, this one is for the file-hosting site Mediafire.
https://github.com/Juvenal-Yescas/mediafire-dl
It is a written in Python and does require two additional Python packages to be added to your OS.
mediafire_dl-0.1.0
tqdm-4.65.0
Usage is easy enough eg
mediafire-dl <download url>
Personally, I do find it useful as it bypasses any adverts that pop up.
I do know who to package this up otherwise I would have provided it to others as a PET file.
Is it potentially worth considering as a new addition?
@Jasper, I'll take a look at it...
updated to 0.5.1 - added better support for mediafire and wetransfer
updated to 0.5.2 - added support for gofile and if wget is installed then the builtin scripts will update when certain sites are downloaded from
How would you go about testing a url for status? In the case of http://187.85.121.1:8000/:
Which is a radio stream. How to differentiate streams from file downloads?
@stemsee, Do you want to download the stream or just have ydown ignore the link? I assume just ignore it since it would be an endless download.
If it can be tested for a file or stream in fact I will add a line to play it!
uploaded 0.5.3 - minor bug fixes
updated to 0.5.4 - more bugfixes
updated to 0.5.5 - improved downloading video from facebook and some other minor tweaks
updated to 0.5.6
updated to 0.5.7
updated to 0.5.8
updated to 0.5.9
updated to 0.6.0
0.6.1 is up
0.6.2 is up
@plinej
Thanks for the update
Just a minor cosmetic issue
@Jasper, I'll fix that in the next update. There are a couple of other things I need to cleanup as well.
0.6.3 is up