Add desktop menu and edit README.md
This commit is contained in:
parent
c44eac9f6d
commit
274975a240
|
@ -8,17 +8,13 @@ I hope to update and improve this code as well as maybe adding a [Zenity](https:
|
|||
You don't need to install youtube-dl-wrapper, but as part of ensuring and enabling it works as expected, installing helps.
|
||||
|
||||
To install, run the installation script in the main directory - ~/YT-DL/Yt-DL.sh. This will check to see if you have youtube-dl installed and if you don't, it will install it.
|
||||
It installs to /home/{user}/bin/YT-DL and does not as yet create a menu entry, so you need to do that manually for the time being.
|
||||
It installs to /home/{user}/bin/YT-DL
|
||||
I have chosen to download youtube-dl directly from their release page (https://github.com/ytdl-org/youtube-dl), in order to get the latest version, but you can install it from your distro's repo' before installing this script if you'd rather.
|
||||
Note that this script does keep youtube-dl up to date by periodically checking the main repo for updates and applying them if needed.
|
||||
|
||||
### Run
|
||||
|
||||
Execute the following command in the terminal...
|
||||
```` bash
|
||||
~/bin/YT-DL/YT-DL.sh
|
||||
````
|
||||
Or create a link in your menu to this file for convenience.
|
||||
You should find a menu entry under 'Other'.
|
||||
|
||||
Your video will be downloaded to your Desktop.
|
||||
|
||||
|
|
10
install.sh
10
install.sh
|
@ -1,5 +1,8 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Determine where we are...
|
||||
pwd=$(pwd)
|
||||
|
||||
# Environment check. Checking for youtube-dl. If not found, install.
|
||||
echo "
|
||||
Checking that youtube-dl is installed..."
|
||||
|
@ -8,7 +11,11 @@ if [ -f /usr/local/bin/youtube-dl ]
|
|||
else echo "youtube-dl is not present - installing..." && sudo curl -L https://yt-dl.org/downloads/latest/youtube-dl -o /usr/local/bin/youtube-dl && sudo chmod a+rx /usr/local/bin/youtube-dl && echo "1" > ./dbytdl.txt
|
||||
fi
|
||||
|
||||
# End environment check.
|
||||
# Edit desktop menu file.
|
||||
# First the Execution path...
|
||||
sed -i "s|Exec=/path/|Exec=/$HOME/bin/Youtube-dl-wrapper/YT-DL.sh|" $pwd/menu.desktop
|
||||
# Now icon path...
|
||||
sed -i "s|Icon=/path/|Icon=$pwd/YouTube-DL.svg" $pwd/menu.desktop
|
||||
|
||||
# Check for needed directories...
|
||||
if [ -d ~/bin ];
|
||||
|
@ -27,6 +34,7 @@ cp YouTube-DL.svg ~/bin/YT-DL
|
|||
cp YT-DL.sh ~/bin/YT-DL
|
||||
cp LICENSE ~/bin/YT-DL
|
||||
cp README.md ~/bin/YT-DL
|
||||
cp menu.desktop ~/bin/YT-DL
|
||||
|
||||
# Check for the python symlink...
|
||||
if [ -f /usr/bin/python ];
|
||||
|
|
|
@ -0,0 +1,7 @@
|
|||
[Desktop Entry]
|
||||
Name=Youtube Download Wrapper
|
||||
Exec=/path/
|
||||
Comment=A script to make using youtube-dl easier.
|
||||
Terminal=true
|
||||
Icon=/path/
|
||||
Type=Application
|
Loading…
Reference in New Issue