Pfetch secure web resource downloader. Ver: 0.9.3 released

Browsers, email, chat, etc.
Post Reply
Message
Author
mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Pfetch secure web resource downloader. Ver: 0.9.3 released

#1 Post by mcewanw »

NOTE: To a large extent this program has been superceded by newer program DoMyFile, which you can get here:
http://www.murga-linux.com/puppy/viewtopic.php?t=94909

The commandlist provided in Pfetch, may be usefully adapted for use in DoMyFile, however. The only thing you would need to change is that variable TD has been rename to variable D. Note also that Pfetch is still perfectly usable in its own right and with its own provided command list.
----- mcewanw July 2014

Program: Pfetch. Tested on Slacko-5.3.3 and Wary 5.3
license GPLv3
----

0.9.3 Changes: Fixed help text and entry box TD for internationalisation.

Please find Pfetch at foot of this post. By default its interface is in English but it is an option to also install any provided language translations dotpets for your locale.

Once installed, you can start Pfetch from:

JWM menu Start -> Internet -> Pfetch

Pfetch is a GUI front end to commandline clients such as wget and curl, though it is versatile enough to be able to used as a front end to many commandline utilities. It thus depends for functionality on the underlying commandline client being installed. Some of the provided combobox commandlines depend on Xdialog, rxvt, or sometimes the system text editor for outputs.

With the provided resource download list (which can be expanded by the user) it provides, as a starter, for:

Secure and also anonymous file download,
Single webpage download, as well as
full website mirroring (ctrl-C on opened console to cancel).
Fetching unread messages (headers only as it stands) from a user's Gmail account.
Fetching http headers for a webpage url.
Testing user's connection speed to a webpage url.
Finding age (last modified date) of a webpage.
Loading webpages into the user's default browser.
Searching WordNet online english dictionary for word meanings.

On pressing the "play" button, Pfetch operates just as if the displayed command was typed into a console window and the "Enter key pressed", but it brings the following advantages of a GUI environment:

* A dropdown list of pre-saved commands, which can be edited (modified, deleted, or appended to) in your system's default text editor by pressing the Edit button on the righthand side of the dropdown list.

* Entry boxes (variables) for remote Computer URL address (A), remote login User name (U), remote login Password (P), and local Target Directory (TD). The dropdown command can refer to these using standard bash shell syntax (i.e. $A, $U, $P, $TD).

* Entry data can be input manually, or via drag and drop, or cut and paste.

* Pfetch also provides brief tool-tip text over most elements of its GUI, which becomes visible when the mouse is hovered over each element.

More generally, Pfetch provides an editable, floating commandline (with a dropdown list of pre-stored commandlines) which can be any commandline at all as long as it is valid bash syntax. Pretty much any bash commandline including quote marks and \ can be entered.
----

Commandline Usage

In a console enter command: pfetch --help
for brief commandline usage.
----

Tips:

To keep pfetch as the top window, right-click on its window bar, and select Layer -> Top
----

mcewanw, Sep 2012
Attachments
pfetch-0.9.3.pet
Pfetch internet resource downloader
(5.01 KiB) Downloaded 646 times
MoManager-de_DE-pfetch-0.9.2.pet
Pfetch German translation dotpet (fixed for Pfetch 0.9.2: thanks L18L).
(2.16 KiB) Downloaded 627 times
Last edited by mcewanw on Wed 23 Jul 2014, 04:20, edited 10 times in total.
github mcewanw

Jasper

#2 Post by Jasper »

Hi mcewanw,

Thank you very much for pfetch which seems to work well in Slacko 5.3.1

The screenshot below is hopefully self-explanatory, but I do not understand the output of the speed test because SeaMonkey is my default browser and it takes about 4 seconds to load from scratch (although instantaneous if reloaded when minimised to my tray - which was not the current case) and SeaMonkey didn't load, so neither did this Forum.

Assuming my attempt at this speed test was basically valid, would you please be so kind as to explain what I should have entered and/or how I should interpret the output?

My regards
Attachments
pfetch.jpg
(73.79 KiB) Downloaded 1020 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#3 Post by mcewanw »

Jasper wrote: Assuming my attempt at this speed test was basically valid, would you please be so kind as to explain what I should have entered and/or how I should interpret the output?
Yes, you just need to enter the url as you did.

If you look at the commandline for the speed test, you will see that one of the curl utility options it uses is "speed_download".

To find out what that means you are best to look at the curl manpage at http://curl.haxx.se/docs/manpage.html where if you search for the term "speed_download" using your browser's find function you will find the definition:

"speed_download The average download speed that curl measured for the complete download. Bytes per second. "

Similarly, you can search for the other curl options used: time_namelookup, time_connect, time_total, size_download.

I found the command at http://www.commandlinefu.com/ but can't remember exactly where there... I have no idea how accurate or otherwise the command is likely to be, but curl is a well-known utility so I imagine it is fairly accurate.

Best wishes, mcewanw
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#4 Post by mcewanw »

Jasper wrote:Hi mcewanw,

Thank you very much for pfetch which seems to work well in Slacko 5.3.1

The screenshot below is hopefully self-explanatory, but I do not understand the output of the speed test because SeaMonkey is my default browser and it takes about 4 seconds to load from scratch (although instantaneous if reloaded when minimised to my tray - which was not the current case) and SeaMonkey didn't load,
Sorry, didn't answer that part of your question (I was on the way to bed at the time I sent my last post). The speed test has nothing to do with how fast your browser loads. It is an internet connection speed test: the time it takes to look up a web url address and make the connection and download a resource. It doesn't start up Seamonkey for the test, the underlying testing application "curl" does all the work involved in the test. The speed test basically measures how fast your internet connection is, not how fast applications load on your local machine. Hope that helps clarify matters.
github mcewanw

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#5 Post by 01micko »

Hello mcewanw

This is a nice offering. Working fine for me in the latest slacko development version.

I just have one question, which really doesn't matter. Is there any reason you made the configuration template a hidden directory in /etc? I'm just curious.

Cheers
Puppy Linux Blog - contact me for access

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#6 Post by mcewanw »

01micko wrote:Hello mcewanw

This is a nice offering. Working fine for me in the latest slacko development version.

I just have one question, which really doesn't matter. Is there any reason you made the configuration template a hidden directory in /etc? I'm just curious.

Cheers
I just followed a relatively common practice of making config directories hidden with a dot in front. I guess that is just to keep no option 'ls' listings of /etc not so cluttered with visible program conifigs, making system configs more easily found visually. It easy enough to use ls -a when required (or Rox : show hidden files). Lots of programs adopt the same practice: firefox/seamonkey with .mozilla for example and wine with .wine, though their config files are so large they tend not to be stored in /etc. Also, since there is an edit button in pfetch to allow quick editing of the combobox, it being otherwise "invisible" shouldn't matter. Not many, if any other user-created programs storing configs in /etc, but for those that do I personally prefer the hidden folder/less clutter aspect, especially since more programs may be added, which also store their config files in /etc. Still, maybe hidden is more normal outside of /etc. I'll leave it as it is though unless there is a good reason to change it.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

#7 Post by mcewanw »

On second thoughts, I maybe should make the /etc config directory visible (but leave the $HOME config hidden). What do you think? Not a big job to change for the next update.
github mcewanw

User avatar
01micko
Posts: 8741
Joined: Sat 11 Oct 2008, 13:39
Location: qld
Contact:

#8 Post by 01micko »

The only other hidden file I have in /etc is .XLOADED, a marker file for xorg/xwin.

I think there is no need to hide it, but like I said it doesn't matter.
Puppy Linux Blog - contact me for access

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Pfetch secure web resource downloader

#9 Post by L18L »

Hi mcevanw,

pfetch is working very nice in precise 5.2.93 too.

Attached is german translation
Translation was made using momanager so there is no need to include pfetch.pot as this is created automatically by momanager.

1 small issue:
messages in other languages are always longer than the english ones.
So increasing width of the GUI should be in next update
Attachments
pfetch_translated.png
(54.21 KiB) Downloaded 955 times
MoManager-de_DE-pfetch-0.9.1.tar.gz
german translation
packed by momanager
(2.06 KiB) Downloaded 588 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Pfetch secure web resource downloader

#10 Post by mcewanw »

L18L wrote: 1 small issue:
messages in other languages are always longer than the english ones.
So increasing width of the GUI should be in next update
Hi L18L. Thanks for the german translation file for Pfetch. I'll collect these together in the first post of this thread.

Okay about the width. I originally designed it, as per Precord, such that it would fit on smaller computer screens of 640 width, but times have moved on so it seems reasonable to up that a bit. Still want to use as little screen real estate as possible though.

What width would people like? I don't want to go much wider than about 736 px. I'll test how that works with your german translation.

EDIT: I've uploaded the german language translation file you provided to the first post of this thread (made it into a dotpet). However, there is a mistake in it: Whilst it is fine to change the english text, you cannot change the entry box variable assignment names. So A has to be left as A, U as U, P as P and TD as TD since these are internal program variable names. You changed the TD to ZO, which will not work in the combobox commandlines. Could you kindly please upload another de translation but this time leaving TD for the entry box name?
Last edited by mcewanw on Sat 15 Sep 2012, 00:59, edited 3 times in total.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Pfetch 0.9.2 released

#11 Post by mcewanw »

Pfetch 0.9.2 released

Principal change is wider interface per L18L's request.

A few under-the-hood alterations per 01micko's comment.

Functionality otherwise unchanged.

Note that if you ever accidentally delete or corrupt the config files for pfetch under $HOME, simply re-run the program and it will automatically rebuild the default config file entries in $HOME/.pfetch
github mcewanw

User avatar
L18L
Posts: 3479
Joined: Sat 19 Jun 2010, 18:56
Location: www.eussenheim.de/

Re: Pfetch secure web resource downloader

#12 Post by L18L »

mcewanw wrote: EDIT: I've uploaded the german language translation file you provided to the first post of this thread (made it into a dotpet). However, there is a mistake in it: Whilst it is fine to change the english text, you cannot change the entry box variable assignment names. So A has to be left as A, U as U, P as P and TD as TD since these are internal program variable names. You changed the TD to ZO, which will not work in the combobox commandlines. Could you kindly please upload another de translation but this time leaving TD for the entry box name?
I understand: I must not translate TD
In order to generally disable translations of TD I suggest you change line 218 from
<text><label>$(gettext 'TD')</label></text>
to
<text><label>TD</label></text> :wink:

Updated translation attached

Not sure how this shall work
#: pfetch.sh:280
msgid "In created .po translate helptxt msgstr to target lang"
msgstr ""
Attachments
MoManager-de_DE-pfetch-0.9.2.tar.gz
updated translation
(2.04 KiB) Downloaded 583 times

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Re: Pfetch secure web resource downloader

#13 Post by mcewanw »

L18L wrote: In order to generally disable translations of TD I suggest you change line 218 from
<text><label>$(gettext 'TD')</label></text>
to
<text><label>TD</label></text> :wink:
Very true, I missed that. :-)
I should never have used gettext there. I'll fix it in next version. Meanwhile I'll upload your new translation for the existing version.
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Uploaded the fixed german translation file for Pfetch.

#14 Post by mcewanw »

Uploaded the fixed german translation file for Pfetch. Thanks L18L.

Sorry for the delay. I was busy making a major upgrade to Precord and getting it working in Slacko, Lupu, and Wary again. I have still to internationise Precord, so that is yet another long-planned project...
github mcewanw

mcewanw
Posts: 3169
Joined: Thu 16 Aug 2007, 10:48
Contact:

Pfetch 0.9.3 released

#15 Post by mcewanw »

0.9.3 Changes: Fixed help text and entry box TD for internationalisation. Download from first post of this thread.

Note that if you ever accidentally delete or corrupt the config files for pfetch under $HOME, simply re-run the program and it will automatically rebuild the default config file entries in $HOME/.pfetch

With the provided resource download list (which can be expanded by the user) it provides, as a starter, for:

Secure and also anonymous file download,
Single webpage download, as well as
full website mirroring (ctrl-C on opened console to cancel).
Fetching unread messages (headers only as it stands) from a user's Gmail account.
Fetching http headers for a webpage url.
Testing user's connection speed to a webpage url.
Finding age (last modified date) of a webpage.
Loading webpages into the user's default browser.
Searching WordNet online english dictionary for word meanings.
github mcewanw

Post Reply