Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 21 Oct 2014, 06:50
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
Petch-0.3.pet -- CLI Puppy repository search and install
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Author Message
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: Sat 13 Sep 2008, 10:11    Post subject:  Petch-0.3.pet -- CLI Puppy repository search and install
Subject description: 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.
petch-0.3.pet
Description 
pet

 Download 
Filename  petch-0.3.pet 
Filesize  1.77 KB 
Downloaded  1668 Time(s) 

_________________
Colour-Memories Database

Last edited by tombh on Tue 16 Sep 2008, 09:40; edited 6 times in total
Back to top
View user's profile Send private message Visit poster's website 
trapster


Joined: 28 Nov 2005
Posts: 2006
Location: Maine, USA

PostPosted: 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 Slacko AND lupu52 w/ fluxbox
Back to top
View user's profile Send private message Visit poster's website 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: 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
View user's profile Send private message 
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: Sat 13 Sep 2008, 13:17    Post subject:  

@trapster: Great, glad you like and glad it works Smile 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
View user's profile Send private message Visit poster's website 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: 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
fetch.tar.gz
Description 
gz

 Download 
Filename  fetch.tar.gz 
Filesize  5.86 KB 
Downloaded  779 Time(s) 

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

Back to top
View user's profile Send private message 
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: Mon 15 Sep 2008, 04:07    Post subject:  

Hey thanks Eric Smile Fixed now -- let me know if it works now...
_________________
Colour-Memories Database
Back to top
View user's profile Send private message Visit poster's website 
HairyWill


Joined: 26 May 2006
Posts: 2949
Location: Southampton, UK

PostPosted: Mon 15 Sep 2008, 07:04    Post subject:  

nice one tomh
_________________
Will
contribute: community website, screenshots, puplets, wiki, rss
Back to top
View user's profile Send private message 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: 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
View user's profile Send private message 
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: 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 Smile

_________________
Colour-Memories Database
Back to top
View user's profile Send private message Visit poster's website 
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: Tue 16 Sep 2008, 06:21    Post subject:  

Petch updated to version 0.3
_________________
Colour-Memories Database
Back to top
View user's profile Send private message Visit poster's website 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: Tue 16 Sep 2008, 07:43    Post subject:  

Hooray!!
Petch provides pets perfectly....woof woof

Eric
Petch-0.3.jpg
 Description   
 Filesize   44.77 KB
 Viewed   3658 Time(s)

Petch-0.3.jpg


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

Back to top
View user's profile Send private message 
ndujoe1

Joined: 04 Dec 2005
Posts: 699

PostPosted: 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
View user's profile Send private message 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: 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
View user's profile Send private message 
tombh


Joined: 12 Jan 2007
Posts: 422
Location: Bristol, UK

PostPosted: 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
View user's profile Send private message Visit poster's website 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: 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 Wink

Best,
Eric
Petch-petch.jpg
 Description   
 Filesize   7.33 KB
 Viewed   3652 Time(s)

Petch-petch.jpg


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

Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 5 [72 Posts]   Goto page: 1, 2, 3, 4, 5 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0773s ][ Queries: 13 (0.0065s) ][ GZIP on ]