Pwget

Stuff that has yet to be sorted into a category.
Message
Author
User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

Pwget

#1 Post by Lobster »

Image
Pwget is a simple GUI front end to the wget utility.
Wget is used for reliably downloading larger files from the internet such as ISOs.
The files are verified during the download procedure.
As ISO and other files are checked and downloads resumed,
they do not require a md5sum check.
Cut and paste the source file you wish to download.
Use the file selector to choose the destination

Image
use right click on pwget to activate icon and drag on to desktop

to paste in URL location (Linux method - learn it!) :D
highlight with mouse and middle button click in address

Development details
With thanks to Mark Ulrich and other developers
http://www.murga-linux.com/puppy/viewto ... 183http://

Basically this is a replacement/update for Ian's front end
which was written in tkl (No longer in Dingo)
Dingo has a downloader based on gcurl (very similar in operation)

Has been tested on 2.17 and Dingo Alpha
It should work on any Puppy with GTK3 (aprox Puppy 2.12 Puplets and above)
Last edited by Lobster on Mon 21 Jan 2008, 19:17, edited 1 time in total.
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
cb88
Posts: 1165
Joined: Mon 29 Jan 2007, 03:12
Location: USA
Contact:

#2 Post by cb88 »

hey lobster i think you grabed that link from you newest post page and it doesn't work!

here is the correct link to pwget's development :

http://www.murga-linux.com/puppy/viewto ... 183http://
Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
X86: Sager NP6110 3630QM 16GB ram, Tyan Thunder 2 2x 300Mhz
Sun: SS2 , LX , SS5 , SS10 , SS20 ,Ultra 1, Ultra 10 , T2000
Mac: Platinum Plus, SE/30

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#3 Post by Lobster »

Thanks cb88 :)

have modified the link :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
rerwin
Posts: 2017
Joined: Wed 24 Aug 2005, 22:50
Location: Maine, USA

Please correct terminology before going public

#4 Post by rerwin »

Lobster,
It may come across as nit-picky, but "copy-and-paste" is what you seem to intend; so please make Pwget use the appropriate term. "Cut-&-paste" is alarming, if one doesn't want to risk changing the source of the URL text.

This is a common misuse of "cut and paste", so I would not like to see it propagated in a Puppy dialog. Thanks for listening.
Richard

User avatar
Eyes-Only
Posts: 1043
Joined: Thu 10 Aug 2006, 06:32
Location: La Confederation Abenaquaise

#5 Post by Eyes-Only »

Hi Lobster!

I was just going down through the menus here in 3.0.1 to see whether we had anything similar to that and we do, named "Xweget". So out of curiosity to see what the GUI looked like I started it up. UGH! I have to admit that I've never used these before, always being lazy and just clicking on the file in my browser. ;)

Yet there have been so many times I'd have loved to have closed the browser and just walk off. Thanks for opening my eyes to another way to download where I can do just that.

And for the GUI behind yours? Nicer than Xweget's by far mate! Thanks for sharing! :D

Amicalement,

Eyes-Only
"L'Peau-Rouge"
*~*~*~*~*~*
Proud user of LXpup and 3-Headed Dog. 8)
*~*~*~*~*~*

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#6 Post by Lobster »

8) Thanks for the feedback guys.
Barry has included the code in Dingo (Puppy 4)

I used the command line code from Ian's Xweget
Without tkl (which is not included with Dingo)
all that was required was a front end and some
copy + paste from Ian's code

There is incidentally a command line program called wput
(not in Dingo but potentially very useful for developers)
that uploads in a similar way . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Ian
Official Dog Handler
Posts: 1234
Joined: Wed 04 May 2005, 12:00
Location: Queensland

#7 Post by Ian »

Lobster

I didn't realize you were doing this as I could have saved myself time & effort.
I've attached a later version of what I am working on, it has a Resume function but is not perfect yet, you might find it of interest.

Eyes-Only has mentioned Xweget in3.0.1 I think he means Xwget.
I didn't think the GUI was that bad considering it was created with tcl/TK.

He may like to have a look at Xwget-6 and see if I have improved.
Attachments
Xwget-6EXP.tar.gz
(2.97 KiB) Downloaded 1554 times

Py
Posts: 70
Joined: Fri 12 Aug 2005, 05:18

Re: Pwget

#8 Post by Py »

Lobster wrote: PWget is used for reliably downloading larger files from the internet such as ISOs.
The files are verified during the download procedure.
As ISO and other files are checked and downloads resumed,
they do not require a md5sum check.
Am I to understand that by using this on my 56k dialup and http or ftp, I do not have to do any checking of md5's? Sounds great.

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#9 Post by Lobster »

Thanks Ian,

Yes Py - you are correct . . .
No only that, if your line breaks down during download
Set up again with the same parameters and location
and it will start off with inclusion of your previous download
- so you do not have to start from scratch

Never have to use md5sum unless downloading from browser . . .
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
HairyWill
Posts: 2928
Joined: Fri 26 May 2006, 23:29
Location: Southampton, UK

#10 Post by HairyWill »

Lobster,
I think you might have this wrong.
How does pwget know what the md5 of the file is?
Will
contribute: [url=http://www.puppylinux.org]community website[/url], [url=http://tinyurl.com/6c3nm6]screenshots[/url], [url=http://tinyurl.com/6j2gbz]puplets[/url], [url=http://tinyurl.com/57gykn]wiki[/url], [url=http://tinyurl.com/5dgr83]rss[/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#11 Post by Lobster »

HairyWill wrote:How does pwget know what the md5 of the file is?
I don't think it uses md5sum which verifies that the file the programmer created, is the file you downloaded.
What it does do (from memory) is ensure the file that is downloaded is not corrupted or lost through line cut outs - partial downloads are still 'credited' and not corrupted.

So for tin-hats and the securely paranoid you could do a md5sum check too . . . :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#12 Post by Lobster »

The following code which I found in a recent unrelated thread
would add the facility to download a whole website

Code: Select all

# wget -r --convert-links -P/your/save/directory/ 
http://www.example.com/
I started working on the code
(you can find the original in user/local/pwget)
but really need help to get it working . . .
watch out for the test1 variable which I have no idea how to set and make use of
Help required ;)

Code: Select all

#! /bin/bash

# Pwget created by Lobster with thanks to Zigbert
# for Puppy Dingo and Linux Tmxxine
# Feb 2009 GPL v5 License
# http://tmxxine.com
# wget -r --convert-links -P/your/save/directory/ http://www.example.com/

export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
 <hbox>
  <text><label>Copy and Paste URL location of required file into "Address". Add destination and click "OK"</label></text>
 </hbox>
 <hbox>
  <text><label>Address</label></text>
  <entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
 </hbox>
  <hbox>
  <text><label>Download Website</label></text>
  <entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
 </hbox>
 <hbox>
  <text><label>Destination Dir</label></text>
  <entry accept="directory"><variable>DEST</variable><input>/tmp/pm_mirror_dir</input></entry>
  <button>
   <input file icon="gtk-open"></input>
   <action type="fileselect">DEST</action>
   <action>refresh:DEST</action>
  </button>
 </hbox>
 <hbox>
  <button help>
   <action>`Xdialog --wrap --screencenter --left --title "Pwget - HELP" --msgbox "Pwget is a simple front end to the wget utility. Wget is used for downloading larger files from the internet such as ISOs. The files are verified during the download procedure. As ISO and other files are checked and downloads resumed, they do not require a md5sum check. Copy and paste the source file you wish to download. Use the file selector to choose the destination. \n\n Lobster, Jan 2008" 600x0`</action>
  </button>
  <button cancel></button>
  <text><label>Download</label></text>
  <button ok></button>
 </hbox>
</vbox>
</window>'

I=$IFS; IFS=""
for STATEMENTS in $(gtkdialog3 --program=Pwget --center); do
   eval $STATEMENTS
done
IFS=$I
if [ $EXIT = OK ]; then
  rxvt -name Xwget -bg "#F3F2DF" -e wget -c -P "$DEST" $SOURCE ,
  else if [ test=1 ]; then
      nrxvt -name Xwget -bg "#F3F2DF" -e wget -r --convert-links -P "$DEST" $SOURCE ,
  rox -d "$DEST" 
fi 
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#13 Post by aragon »

hi lobster,

try the following one. i've tested it, works for me, but please test a little more.

Code: Select all

#! /bin/bash

# Pwget created by Lobster with thanks to Zigbert
# for Puppy Dingo and Linux Tmxxine
# Jan 2008 GPL v3 License
# http://tmxxine.com

cd /root

export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
 <hbox>
  <text><label>Copy and Paste URL location of required file into "Address". Add destination and click "OK"</label></text>
 </hbox>
 <hbox>
  <text><label>Address</label></text>
  <entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
 </hbox>
 <checkbox>
 <label>Download Website</label>
 <variable>WEBSITE</variable>
 </checkbox>
 <hbox>
  <text><label>Destination Dir</label></text>
  <entry accept="directory"><variable>DEST</variable><input>/tmp/pm_mirror_dir</input></entry>
  <button>
   <input file icon="gtk-open"></input>
   <action type="fileselect">DEST</action>
   <action>refresh:DEST</action>
  </button>
 </hbox>
 <hbox>
  <button help>
   <action>`Xdialog --wrap --screencenter --left --title "Pwget - HELP" --msgbox "Pwget is a simple front end to the wget utility. Wget is used for downloading larger files from the internet such as ISOs. The files are verified during the download procedure. As ISO and other files are checked and downloads resumed, they do not require a md5sum check. Copy and paste the source file you wish to download. Use the file selector to choose the destination. \n\n Lobster, Jan 2008" 600x0`</action>
  </button>
  <button cancel></button>
  <text><label>Download</label></text>
  <button ok></button>
 </hbox>
</vbox>
</window>'

I=$IFS; IFS=""
for STATEMENTS in  $(gtkdialog3 --program=Pwget --center); do
   eval $STATEMENTS
done
IFS=$I
if [ $EXIT = OK ] 
 then
  if [ $WEBSITE = true ]
  then
  rxvt -name pwget -bg "#FAEBD7" -fg "#000000" -e wget -r --convert-links -P "$DEST" $SOURCE
  rox -d "$DEST"
  else
  rxvt -name pwget -bg "#FAEBD7" -fg "#000000" -e wget -c -P "$DEST" $SOURCE
  rox -d "$DEST"
  fi
fi 

aragon
Attachments
pwget2.png
(13 KiB) Downloaded 2551 times

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#14 Post by Lobster »

Thanks aragon

Have made changes to the help file and included your mods

Rename the enclosed file to pwget
and place in user/local/Pwget
Attachments
pwget.zip
(2 KiB) Downloaded 1397 times
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

User avatar
dejan555
Posts: 2798
Joined: Sun 30 Nov 2008, 11:57
Location: Montenegro
Contact:

#15 Post by dejan555 »

Yaaay! That's great guys, that was my example. :)
I don't have to do it from terminal anymore. :) Wait... actually I do, but it's still great! U see I never download the whole website, for example, if I want only pictures from some location or webpage, I do this:

Code: Select all

wget -r -l1 --no-parent -A.jpg -P/your/save/directory/
http://www.example.com/images/
There are lots of wget command line options, see here and here.
puppy.b0x.me stuff mirrored [url=https://drive.google.com/open?id=0B_Mb589v0iCXNnhSZWRwd3R2UWs]HERE[/url] or [url=http://archive.org/details/Puppy_Linux_puppy.b0x.me_mirror]HERE[/url]

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#16 Post by Lobster »

dejan555 wrote:Yaaay! That's great guys, that was my example. :) .
Thanks dejan555 :)
The code is open, any upgrades welcome :)
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#17 Post by aragon »

hi dejan,

yes there are lot's of options with wget. but i think the beauty of the actual pwget is it's absolute simplicity.

but maybe a nice approach would be (like in pfind):

- pwget starts with the actual (simple) gui
- it has a new button 'Advanced'
- 'Advanced' closes (simple) gui and opens (advanced) gui
- (advanced) gui has lot's of additional options and of course a 'Simple' button to return to (simple) gui

in this way pwget would cover both requirements.

aragon

User avatar
Lobster
Official Crustacean
Posts: 15522
Joined: Wed 04 May 2005, 06:06
Location: Paradox Realm
Contact:

#18 Post by Lobster »

Sounds good Aragon if you want to have a go . . .

The download website could be added to the advanced page along with download only certain file types from a site (for example jpg as has been mentioned

Any other commands that could be added?
Puppy Raspup 8.2Final 8)
Puppy Links Page http://www.smokey01.com/bruceb/puppy.html :D

aragon
Posts: 1698
Joined: Mon 15 Oct 2007, 12:18
Location: Germany

#19 Post by aragon »

additional commands will take some time: http://www.gnu.org/software/wget/manual/wget.html :wink:

but from what i remember (for websites)

- filetypes
- --level=depth
- include-dirs
- exclude-dirs

as i wanted to extend my script/gtkdialog-knowledge, i will give a try.

but i think for now, pwget is nice as it is, a simple tool for (most) users. the advanced user uses wget directly.

aragon

Caneri
Posts: 1513
Joined: Tue 04 Sep 2007, 13:23
Location: Canada

#20 Post by Caneri »

Hey Lobster...I like pwget...please don't get too many functions as it's perfect for me as is....Thanks for pwget..I use it all the time as I'm such a slow typist with the command line.

Copy and paste into pwget/wget is a real time saver here.
Eric
[color=darkred][i]Be not afraid to grow slowly, only be afraid of standing still.[/i]
Chinese Proverb[/color]

Post Reply