| Author |
Message |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Sat 13 Sep 2008, 10:11 Post_subject:
Petch-0.3.pet -- CLI Puppy repository search and install Sub_title: CLI script that searches the various Puppy repositories |
|
I wrote this little script in Perl. When run like so,
| Code: | | fetch some_package_name |
it searches packages from puppylinux.ca, dotpups.de and ibiblio. It then generates a list of matches and asks you which one you want to download, then it asks you whether you want to install it.
There was talk some time ago about creating a more formalised and rigorous package management system. This is not really an attempt to go down that path, it's just a quick script that makes use of all the existing search code and precedents that MU (PSI), prit and I have developed over time at dotpups.de, puppylinux.ca and puppylinux.org. But hopefully this is a taster of what a complete package management tool might be like.
At the moment it just searches for pets, unlike the proper web-based searches at puppylinux.org and puppylinux.ca (which are BTW pretty much exactly the same now).
Also, if you didn't know, there is a now a feed of the latest packages that arrive at pupplinux.ca. Eric, the admin there, also mirrors some other servers, so the feed is a good general indicator of new packages.
All feedback is kindly welcomed.
Change log:
0.2:
* Changed name from Fetch to Petch
* Sent colour codes manually rather than using the Term::ANSI module as the module is not available in all Puppies.
0.3:
* Removed Switch module dependency. Petch now exclusively makes use of internal Perl functions. So hopefully it will work on *all* versions of Puppy now.
 |
| Description |
|

Download |
| Filename |
petch-0.3.pet |
| Filesize |
1.77 KB |
| Downloaded |
1522 Time(s) |
_________________ Colour-Memories Database
Edited_times_total
|
|
Back to top
|
|
 |
trapster

Joined: 28 Nov 2005 Posts: 1966 Location: Maine, USA
|
Posted: Sat 13 Sep 2008, 12:33 Post_subject:
|
|
Very nice, very simple.
I typed in fetch conky and away it went.
It found two choices.
Cool!!
Because I save files outside of my pup_save, possible to have choice on where to save?
Maybe the title of this post should be CLI .pet installer (?).
Now...."unfetch" (or fetch -u some.pet)would be nice to uninstall???????
Also, FYI
| Code: | Fetch
A Macintosh program by Jim Matthews for transferring files using File Transfer Protocol (FTP). Fetch requires a Mac 512KE, System 4.1, and either KSP 1.03 or MacTCP.
Current version: 2.1.2.
Fetch is Copyright 1992, Trustees of Dartmouth College.
(ftp://ftp.Dartmouth.edu/pub/mac/Fetch_2.1.2.sit.hqx). (ftp://src.doc.ic.ac.uk/computing/systems/mac/info-mac/comm/tcp).
(1994-11-30)
The Free On-line Dictionary of Computing, © 1993-2007 Denis Howe |
_________________ 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
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Sat 13 Sep 2008, 12:55 Post_subject:
|
|
Ok...I'll bite. What perl.pet/module do I need in Dingo and which one for v3.01.
This will be helpful for us less than guru guys/gals..lol
Best,
Eric
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Sat 13 Sep 2008, 13:17 Post_subject:
|
|
@trapster: Great, glad you like and glad it works It downloads the pet to where ever you run the script from so you can control the destination like that. Well I guess 'unfetching' is already handled by petget isn't it, though not through the command line I suspect. Does the existing Mac Fetch app mean I can't use the name? Hey! I'll call it Petch! Sounds weird but not only does it begin with a "P", like all Puppy apps should, but it has the word "pet" in it too!
@Caneri: Oh, does it not work "out of the box" for you? I thought Perl already comes with Puppy.
_________________ Colour-Memories Database
|
|
Back to top
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Sat 13 Sep 2008, 16:46 Post_subject:
|
|
Hi Tom,
After looking deeper perl is here on Dingo Alpha 5
I attached the error I get for you to see.
Best,
Eric
| Description |
|

Download |
| Filename |
fetch.tar.gz |
| Filesize |
5.86 KB |
| Downloaded |
646 Time(s) |
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Mon 15 Sep 2008, 04:07 Post_subject:
|
|
Hey thanks Eric Fixed now -- let me know if it works now...
_________________ Colour-Memories Database
|
|
Back to top
|
|
 |
HairyWill

Joined: 26 May 2006 Posts: 2949 Location: Southampton, UK
|
Posted: Mon 15 Sep 2008, 07:04 Post_subject:
|
|
nice one tomh
_________________ Will
contribute: community website, screenshots, puplets, wiki, rss
|
|
Back to top
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Mon 15 Sep 2008, 08:16 Post_subject:
|
|
Hi Tom,
Sorry to be a pain but now petch fails for me at line 11
It can't locate Switch.pm in @INC
Is it just dingo alpha5, as I'll move up soon to final or the beta.
Best,
Eric
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Mon 15 Sep 2008, 08:23 Post_subject:
|
|
Doh! Right, basically I can't use any external Perl modules then! Not to worry, the modules are just a way of making coding shorter, easier and less time-consuming, so I'll just have to code my own "Switch" routine, or provide the pet with the switch module, which is probably bad practice.
Hey ho, I'll get the new version up soon then...
Thanks Eric
_________________ Colour-Memories Database
|
|
Back to top
|
|
 |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Tue 16 Sep 2008, 06:21 Post_subject:
|
|
Petch updated to version 0.3
_________________ Colour-Memories Database
|
|
Back to top
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Tue 16 Sep 2008, 07:43 Post_subject:
|
|
Hooray!!
Petch provides pets perfectly....woof woof
Eric
| Description |
|
| Filesize |
44.77 KB |
| Viewed |
3416 Time(s) |

|
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
ndujoe1
Joined: 04 Dec 2005 Posts: 620
|
Posted: Tue 16 Sep 2008, 09:23 Post_subject:
Petch-0.2.pet |
|
Another example of the ingenuity of Puppy user to fashion and extend the useful nature of Puppy Linux. Nice work
|
|
Back to top
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Tue 16 Sep 2008, 09:24 Post_subject:
|
|
Hi Tom,
Well after looking at Petch for a bit this morning I think this is one of those little programs that should be in all releases from now on.
This is very handy..Well Done!!
Best,
Eric
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
tombh

Joined: 12 Jan 2007 Posts: 422 Location: Bristol, UK
|
Posted: Tue 16 Sep 2008, 09:39 Post_subject:
|
|
I'd love it if Barry put it in 4.1 -- I've never had anything in Puppy before!
If Barry's tempted, I'm happy to declare Petch non-beta and well it's only 1.7k!
_________________ Colour-Memories Database
|
|
Back to top
|
|
 |
Caneri
Joined: 04 Sep 2007 Posts: 1567 Location: Canada
|
Posted: Tue 16 Sep 2008, 10:06 Post_subject:
|
|
There's one thing that needs to be fixed. Petch can't find Petch...lol..or is this the chicken and egg thing
Best,
Eric
| Description |
|
| Filesize |
7.33 KB |
| Viewed |
3394 Time(s) |

|
_________________ Be not afraid to grow slowly, only be afraid of standing still.
Chinese Proverb
|
|
Back to top
|
|
 |
|