PDM - Puppy Download Manager

For discussions about programming, programming questions/advice, and projects that don't really have anything to do with Puppy.
Post Reply
Message
Author
User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

PDM - Puppy Download Manager

#1 Post by puppy_apprentice »

Code: Select all

      Title: Puppy Download Manager
Purpose: Learn gtkdialog and bash, make something bigger than Pwsget
 Licence: GPL3
  Author: puppy_apprentice (so far, contributions and errors correction appreciate and welcome)
Edit:
To load urls from clippboard save history in Parcelite as default file name in PDM directory.
Attachments
pdm.sh.zip
false .zip extension
(5.27 KiB) Downloaded 108 times
PDM_multi_files.jpg
To download all files from list do not mark any items on list, choose downloader and press Start button. Stop button will stop downloading only one file (maybe somebody know how to kill whole job like using CTRL+C in PDM console?)
(98.83 KiB) Downloaded 327 times
PDM_one_file.jpg
To download one file mark item on list, choose downloader and press Start button. Press Stop button to stop downloading.
(107.21 KiB) Downloaded 337 times

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#2 Post by 666philb »

hi puppy_apprentice

looks interesting.

load from clipboard isn't working for me, is parcellite required as i have clipit? you could use

Code: Select all

xclip -o
to get what's in the clipboard.

some feature requests..

an input box to paste urls into
youtube-dl as a downloader choice

thanks
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#3 Post by puppy_apprentice »

New version

Added:

- youtube-dll (didn't check because i don't have youtube-dll):

Code: Select all

downloaders="
aria2
axel
curl
youtube-dll
wget
"

funcComboAddItems() {
for item in $downloaders
do
	if [ -e "$(which $item)" ]
	then
		if [ "$item" == "youtube-dll" ]
		then
			echo "<item>"youtube_dl_video"</item>"
			echo "<item>"youtube_dl_ogg"</item>"
		else
			echo "<item>"$item"</item>"
		fi
	fi
done
}

Code: Select all

funcStart_youtube_dl_video() {
	if [ "$1" ] 
	then
		echo youtube-dl "$1" & PID=$!
		echo $(( PID + 1 )) > pid
	else
		youtube-dl -a "$PWD/download_list"
	fi
}

export -f funcStart_youtube_dl_video

funcStart_youtube_dl_ogg() {
	if [ "$1" ] 
	then
		echo youtube-dl -x "$1" & PID=$!
		echo $(( PID + 1 )) > pid
	else
		youtube-dl -x -a "$PWD/download_list"
	fi
}

export -f funcStart_youtube_dl_ogg
- clip:

Code: Select all

funcAddFromClip() {
	if [ -s "$TMPDIR"/inputfile1 ]
	then
		echo -e -n "\n$(xclip -o)" >> "$TMPDIR"/inputfile1
	else
		echo -n "$(xclip -o)" >> "$TMPDIR"/inputfile1
	fi
}

export -f funcAddFromClip
For clipboard wanted to make something like this:

Code: Select all

echo -n $(strings /root/.local/share/parcellite/history | grep "http\|ftp") > "$TMPDIR"/inputfile1
but couldn't find history file for ClipIt
Attachments
pdm.sh.zip
New version
(5.89 KiB) Downloaded 122 times

some1
Posts: 117
Joined: Thu 17 Jan 2013, 11:07

#4 Post by some1 »

Code: Select all

$HOME/.local/share/clipit/history

User avatar
666philb
Posts: 3615
Joined: Sun 07 Feb 2010, 12:27
Location: wales ... by the sea

#5 Post by 666philb »

this is getting good :)

i fixed a few things in the script ...

a couple of spelling mistakes youtube-dll should be youtube-dl
echo was missing for youtube-dl so wasn't showing in the console.
added aria2 commands also added aria2c which is it's name in bionic.

youtube-dl is working well and it will even download entire playlist from a single link.

did an aria2 test it downloaded a torrent from a magnet link no problem.

thanks
Attachments
pdm.sh.zip
(6.14 KiB) Downloaded 140 times
Bionicpup64 built with bionic beaver packages http://murga-linux.com/puppy/viewtopic.php?t=114311
Xenialpup64, built with xenial xerus packages http://murga-linux.com/puppy/viewtopic.php?t=107331

User avatar
puppy_apprentice
Posts: 299
Joined: Tue 07 Feb 2012, 20:32

#6 Post by puppy_apprentice »

@666philb

Thx for contributions. Next i will want to add login & password fields.

Post Reply