| Author |
Message |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sun 06 Jan 2008, 02:38 Post_subject:
Pwget for Dingo (Lobster attempts to program) Sub_title: Help! |
|
Pwget is a simple front end to the wget utility
for Dingo (Puppy 4).
Well it would be if I could program.
Sadly I have all the programming prowess
of a bag of soggy chips, without the bag
Pwget is used for downloading larger files from the internet such as ISOs using the wget bash command. The files are verified during the download procedure. As ISO and other files are checked, they do not require a md5sum check
basically this is the command
| Code: | | wget -c -P$DEST $SOURCE |
and this is the front end
| Code: | #! /bin/bash
# Pwget created by Lobster Jan 2008 for Puppy Dingo and Linux Tmxxine GPL v3 License
# http://tmxxine.com
export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
<hbox>
<text><label>Source URL</label></text>
<entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
<button>
<input file icon="gtk-paste"></input>
<action type="fileselect">SOURCE</action>
<action>refresh:SOURCE</action>
</button>
</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, they do not require a md5sum check. \n\n Lobster, Jan 2008" 600x0`</action>
</button>
<button cancel></button>
<button ok></button>
</hbox>
</vbox>
</window>'
gtkdialog3 --program Pwget
unset Pwget
wget -c -P$DEST $SOURCE |
How do I get this working?
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5292 Location: Valåmoen, Norway
|
Posted: Sun 06 Jan 2008, 05:40 Post_subject:
|
|
Would this help
| Code: |
#! /bin/bash
# Pwget created by Lobster Jan 2008 for Puppy Dingo and Linux Tmxxine GPL v3 License
# http://tmxxine.com
export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
<hbox>
<text><label>Source URL</label></text>
<entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
<button>
<input file icon="gtk-paste"></input>
<action type="fileselect">SOURCE</action>
<action>refresh:SOURCE</action>
</button>
</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, they do not require a md5sum check. \n\n Lobster, Jan 2008" 600x0`</action>
</button>
<button cancel></button>
<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
wget -c -P"$DEST $SOURCE"
fi
|
Now it only executes if user press OK-button.
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Sun 06 Jan 2008, 08:33 Post_subject:
|
|
Many thanks Zigbert
This bit of code (near the bottom works - yours did not
but the rest of it is great
| Code: | | exec wget -c -P $DEST $SOURCE |
. . . so it works
I just hacked your pmirror util to get the code incidentally . . .
The only other thing to get working (or remove)
is the paste button? Any thoughts on that?
So the code stands as
| Code: | #! /bin/bash
# Pwget GUI front end for Wget created by Lobster and Zigbert Jan 2008 for Puppy Dingo and Linux Tmxxine GPL v3 License
# http://tmxxine.com
export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
<hbox>
<text><label>Source URL</label></text>
<entry accept="directory"><variable>SOURCE</variable><input>/tmp/pm_source_dir</input></entry>
<button>
<input file icon="gtk-paste"></input>
<action type="fileselect">SOURCE</action>
<action>refresh:SOURCE</action>
</button>
</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, 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. \n\n Lobster, Jan 2008" 600x0`</action>
</button>
<button cancel></button>
<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
exec wget -c -P $DEST $SOURCE
fi
|
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
zigbert

Joined: 29 Mar 2006 Posts: 5292 Location: Valåmoen, Norway
|
Posted: Sun 06 Jan 2008, 08:53 Post_subject:
|
|
Paste: What should be pasted. You can copy whatever, and paste it into url-field by ctrl+c. Maybe a better question is: What should happen when you press the paste-button.
| Code: | | exec wget -c -P $DEST $SOURCE | should be | Code: | | exec wget -c -P "$DEST" $SOURCE | This to accept paths with spaces in name.
Happy coding
Sigmund
_________________ Stardust resources
|
|
Back to top
|
|
 |
mcewanw
Joined: 16 Aug 2007 Posts: 1525 Location: New Zealand
|
Posted: Sun 06 Jan 2008, 18:31 Post_subject:
Make it voice controllable and speaking |
|
Lobster... you know my feeling on this ...
Little apps like this should be made voice controllable (e.g. cvoicecontrol) and able to speak (e.g espeak) as well as having a good GUI and/or CUI. It is easier to build such facility into an app at the design stage. Your first non-working version is basically just a GUI, but your last version is already getting a bit more complex. I challenge you to make it work better for the visually impaired as well as for those with good vision!
I'm sure you know how I'd do it if I were you, but my challenge is just a challenge: do it anyway you like!
The world of computing for the visually impaired would be a better place if their needs were taken into account at the design stage. It is very difficult to make, say Open Office or Microsoft Office friendly for the visually impaired; such apps have been designed for those who have good eyesight and coordination (icon/mouse-based interfaces with windows and written text).
I do realise that Dingo is unlikely to come with, for example, cvoicecontrol or espeak or similar by default, but these can be added as dotpets.
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1966 Location: Maine, USA
|
Posted: Sun 06 Jan 2008, 19:00 Post_subject:
|
|
Go Lobster go !!!!!!
FYI
Xwget can be found in puppy under the "internet" menu.
_________________ trapster
Maine, USA
Asus eeepc 1005HA PU1X-BK
Frugal install:Puppeee4.31 + 1.0, Puppy4.10 + Lupu52
Currently using Puppeee-1.0 AND lupu52 w/ fluxbox
|
|
Back to top
|
|
 |
BarryK
Puppy Master

Joined: 09 May 2005 Posts: 6874 Location: Perth, Western Australia
|
Posted: Mon 07 Jan 2008, 03:34 Post_subject:
|
|
Lobster,
I'm curious about one thing. Did you try 'gCurl' in Dingo? This is a file downloader that uses libcurl. I've haven't tried it myself, just stuck it in Dingo as didn't have any other downloader.
_________________ http://bkhome.org/blog2/
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Mon 07 Jan 2008, 20:28 Post_subject:
|
|
| Quote: | | Go Lobster go !!!!!! |
| Quote: | | Did you try 'gCurl' in Dingo? |
Ah - I knew you had added an installer but could not remember what . . .
No I have not tried it.
Basically I was in Dingo, needed to download a recent PcLinuxOS to see if the wireless would work on my laptop (it did not incidentally)
Could not find the downloader (written in tcl by Ian) and rather than use the command line (a fate worse than death ) thought it would be easier to rewrite the util for Dingo.
Also works on Puppy 2.17 using the latest pwget version now. Here is the code if you want to tweak and include in Dingo
| Code: | #! /bin/bash
# Pwget created by Lobster with thanks to Zigbert
# for Puppy Dingo and Linux Tmxxine
# Jan 2008 GPL v3 License
# http://tmxxine.com
export Pwget='
<window title="Pwget - File downloader utility">
<vbox>
<hbox>
<text><label>Cut 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>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. Cut 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
exec rxvt -name Xwget -bg "#F3F2DF" -e wget -c -P "$DEST" $SOURCE
fi |
_________________ Puppy WIKI
Edited_time_total
|
|
Back to top
|
|
 |
cb88

Joined: 28 Jan 2007 Posts: 1160 Location: USA
|
Posted: Mon 07 Jan 2008, 23:05 Post_subject:
|
|
how about adding a mirror function? with several option like to only download if a newer version is avaliable....
i have done that before with wget but i forget the options always just use wget --help
GO Lobster!!!!
_________________ Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
BeOS Max-Vectorgamma: Tyan thund 2 512 ram 2x PII 300
Vectorsigma (laptop): Gentoo Athlon II X2 2Ghz 4Gb ram radeon 4200 mesa-git
|
|
Back to top
|
|
 |
Lobster
Official Crustacean

Joined: 04 May 2005 Posts: 15109 Location: Paradox Realm
|
Posted: Tue 08 Jan 2008, 04:04 Post_subject:
|
|
| cb88 wrote: | | how about adding a mirror function? |
m m m . . .
here is me combing my whiskers in front of the mirror . . .
Not what you meant?
. . . well maybe if someone turns this into a dotpet (and posts on additional software) I will consider that for a future update
(I know it is easy but could not find any info - there is some sort of "dir2pet" command) maybe it is not in 2.17 that I am using . . .
_________________ Puppy WIKI
|
|
Back to top
|
|
 |
cb88

Joined: 28 Jan 2007 Posts: 1160 Location: USA
|
Posted: Tue 08 Jan 2008, 08:45 Post_subject:
|
|
what i mean is there is a command line option to mirror a site
say dotpups.de/dotpups/Multimedia/
just that i forget which option it is right now...
it would download all the files at that address and with another option active it would ONLY update the downloaded files if needed
it mirrors a specifyed depth on the site or just one link deep if not specified i think would have to actually use it to be sure an i have linux incompatable modems
_________________ Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
BeOS Max-Vectorgamma: Tyan thund 2 512 ram 2x PII 300
Vectorsigma (laptop): Gentoo Athlon II X2 2Ghz 4Gb ram radeon 4200 mesa-git
|
|
Back to top
|
|
 |
Dingo

Joined: 11 Dec 2007 Posts: 1398 Location: somewhere at the end of rainbow...
|
Posted: Tue 08 Jan 2008, 09:27 Post_subject:
|
|
works fine for me on Puppy 3.01
|
|
Back to top
|
|
 |
jcoder24

Joined: 06 May 2005 Posts: 601 Location: Barbados
|
Posted: Tue 08 Jan 2008, 09:40 Post_subject:
|
|
| cb88 wrote: | | what i mean is there is a command line option to mirror a site |
wget -m or wget --mirror
| cb88 wrote: | | mirrors a specifyed depth on the site or just one link deep if not specified |
wget -N -r -l number_of_levels
where number_of_levels is a number 0 or greater. 0 = infinite which is the same as mirror all.
|
|
Back to top
|
|
 |
cb88

Joined: 28 Jan 2007 Posts: 1160 Location: USA
|
Posted: Tue 08 Jan 2008, 13:49 Post_subject:
|
|
thanks jcoder24 that is exactly what i meant
_________________ Taking Puppy Linux to the limit of perfection. meanwhile try "puppy pfix=duct_tape" kernel parem eater.
BeOS Max-Vectorgamma: Tyan thund 2 512 ram 2x PII 300
Vectorsigma (laptop): Gentoo Athlon II X2 2Ghz 4Gb ram radeon 4200 mesa-git
|
|
Back to top
|
|
 |
MU

Joined: 24 Aug 2005 Posts: 13642 Location: Karlsruhe, Germany
|
Posted: Wed 16 Jan 2008, 06:56 Post_subject:
|
|
Dotpup:
http://dotpups.de/dotpups/Internet/Pwget.pup
mirror:
http://puppyfiles.ca/dotpupsde/dotpups/Internet/Pwget.pup
I made one change:
after the download, Rox-filer opens with the download-folder.
Lobster:
If you update, just drag /usr/local/bin/Pwget again on the dotpup-wizard.
Mark
| Description |
screenshot |
| Filesize |
50.29 KB |
| Viewed |
1752 Time(s) |

|
|
|
Back to top
|
|
 |
|