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 Mon 20 Oct 2014, 09:07
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 3 of 5 [72 Posts]   Goto page: Previous 1, 2, 3, 4, 5 Next
Author Message
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Tue 23 Sep 2008, 18:32    Post subject:  

Quote:
Maybe one thing to consider could be saving the output as a stand alone file
Yes, I was thinking about doing that too. I probably would have already, but I had planed to do the bulk of the work on Sunday afternoon. After fiddling with my network settings around noon I had to wait a while before being able to access the campus network, so I thought I'd play a quick game of Nethack. Wound up being anything but quick. Five hours or so later I finally died, after accumulating a score six times higher than my previous high score. What ultimately led to my demise was accidentally reading a scroll of Destroy Armor, which ruined my +4 robe, thus slashing my defenses and killing my ability to use magic. Sad Then the day was nearly over.

I'll clean stuff up and set it to output a file tonight, add some formatting to the fancy view, and add a third mode to output the data from the fancy view in a more usable form in case we ever want to set up something like that attachment->repo thing we talked about earlier. Then I'll upload it all to my website so you can play with it and make sure it works.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Pizzasgood


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Wed 24 Sep 2008, 01:17    Post subject:  

Test forum with info typed when I wasn't half sleeping over here:
http://www.browserloadofcoolness.com/puppy/viewtopic.php?t=3

Needs testing and examination before I email it to John.

Notice that the ?view parameter has been renamed ?mode.

This version is also CLI compatible. It can take the mode as a normal parameter, so that it can be used with Cron properly.

Added an option to output to a file. Disabled by default when viewed through the web, but enabled (and always enabled) when run from CLI.

Go ahead and upload as much as you want over there to test it. I'm gonna delete it all when we get done so spam away.

Let me know if there's anything you think needs tweaking. Preferably over here.

Now I go to enjoy sleep time. 'night.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

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: Thu 25 Sep 2008, 16:53    Post subject:  

@lluamco:
Quote:
When you see this
[ 1] - puppylinux.ca | puppyfiles | cups-1.1.23-1.pet (1606782)
this file is exactly the same on dotpups.de.

That's true. And yes, MU is still in the process of making package lists for all his directories.

@pizzasgood: Well, it all looks fantastic. I uploaded a new attachment (petch-0.3.pet as it happens), copied the package list over to puppylinux.org and now
Code:
petch petch
returns

Quote:
# petch petch
searching ...

SOURCE | DIRECTORY | FILENAME (size)
[ 1] - browserloadofcoolness.com | | petch_03.pet (1811)
[ 2] - puppylinux.ca | tpp | petch-0.3.pet (1811)
Please type the number of the package you would like to fetch:


Obviously I'll tidy up the formatting -- browserloadofcoolness,com breaks the nice neat columns! Also maybe you could put something useful in that second path entry bit, maybe the thread title or the contributors forum name? That info would fit into the DIRECTORY field.

So what about the HTML fancy view? I imagine the list is going to be gigantomungous (ie long) on the murga forum. Perhaps too long to show on a single page -- i,e. endless page-loading? Maybe the HTML view should require an extra search query argument to filter things down a bit? I guess the XML view is fine as it's not for human eyes.

I wouldn't be surprised though that some unforeseen shenanigans arise once plugged in here at the murga forum, maybe keep it low key for a couple of days testing?

On an aside, one day there will only be petget right? It'll contain petch's code and other goodies that have accumulated over the years in the forum. And we'll take repository organisation and searching into account when re-coding dir2pet, therefore asking who put the pet together, what version of Puppy is it for, and so on. Basically I mean, one day, we're all gonna get together and come up with a complete package management solution, aren't we? Yes Smile

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


Joined: 04 May 2005
Posts: 6270
Location: Knoxville, TN, USA

PostPosted: Sat 27 Sep 2008, 17:10    Post subject:  

Doh, I should have though about that. Yes, there are several thousand packages on this forum. That would be a long nasty list. In that case, I think I had better just split this thing in two. Have one to create the basic view and XML, and a separate one to do the fancy. Then it can have pagination and searching without worrying about affecting the stability and complexity of the other two modes, which should almost never need modification.

I'll split it out on Tuesday probably, then email the basic/xml version to John and see if he'll add it. I'll probably advise him to set it up so people can't trigger an update over the web to avoid the potential for attacks. I'll work on the fancy view when I get time. I have a largish project for my "Computer Arch and OS" class that I need to start working on this week.

(I'm visiting my grandma and grandpa this weekend, so no working this weekend other than my combinatorics homework, which I finished earlier today).



I'll also change that second field to the user name before I split them.




Yes, I think long-term it would be good to set up a more descriptive repository system and have petch-like functionality built into PetGet.

_________________
Between depriving a man of one hour from his life and depriving him of his life there exists only a difference of degree. --Muad'Dib

Back to top
View user's profile Send private message Visit poster's website 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Tue 30 Sep 2008, 18:22    Post subject:  

Just discovered this handy little program.
I tried to trick it by issuing.
Code:
petch *
but I got nicely
Code:
[95] - puppylinux.ca | puppyfiles     | gxmessage-2.6.2.pet (15660)
[96] - puppylinux.ca | puppyfiles     | hardinfo-0.4.2.2.pet (256334)
[97] - puppylinux.ca | puppyfiles     | hexedit-1.2.10.pet (62522)
[98] - puppylinux.ca | puppyfiles     | hv3-20070702.pet (579579)
[99] - puppylinux.ca | puppyfiles     | ical-2.3.1patched.pet (161002)
100 results reached, no more results will be shown.
Please type the number of the package you would like to fetch: ^C
#


Somebody made the remark that it would be nice to be able to indicate a save to directory, but there is no need for this.
Just open rxvt and go to the folder where you want the package to be downloaded and retrieve it.

Also a remark was made that an uninstall should be nice, but there is no need for it either as petch calls the regular puppy package manager and you can uninstall with it.

Just one thing, when a package is retrieved again, there is no checking if exists already. It's simply overwritten.
Not a disaster for small packages but a waist of time and bandwidth for large downloads. Specially when one is on a dial-up connection.
So here is room for improvement.

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
tombh


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

PostPosted: Fri 03 Oct 2008, 05:00    Post subject:  

Thanks Béèm, I'll make sure it checks for an existing copy if the petched file in future versions.
_________________
Colour-Memories Database
Back to top
View user's profile Send private message Visit poster's website 
smil99

Joined: 18 Aug 2007
Posts: 174

PostPosted: Sun 05 Oct 2008, 10:26    Post subject: Petch looks promising for puppy  

Petch looks promising for puppy. However it would be nice if it can also check dependencies and give the option to also install them in addition to the program of interest.

You may check slitaz install package - http://www.slitaz.org/en/


Cheers.
Back to top
View user's profile Send private message 
maddox

Joined: 28 Sep 2007
Posts: 453
Location: sometimes in France

PostPosted: Sun 05 Oct 2008, 16:00    Post subject:  

Hi, tombh,
just a little feedback ...
petch-0.3 pet (5 oct 21:25 french time / puppy 4.1rc-retro live-cd)

- you need to check the nber of files (sources) available and limit the selection (positive nber) to the nber of files found. (info below)

petch *
[ 1] - puppylinux.ca | puppyfiles | 915resolution-0.5.3-static.pet (19206)
[ 2] - puppylinux.ca | puppyfiles | 915resolution-0.5.2.pet (6104)
[ 3] - puppylinux.ca | puppyfiles | 915resolution-0.5.3-static.pet (19181)
[ 4] - ibiblio | pet_packages-2 | 915resolution-0.5.2.pet (6.0K)
[ 5] - ibiblio | pet_packages-4 | 915resolution-0.5.3-static.pet (19K)
[ 6] - ibiblio | pet_packages-3 | 915resolution-0.5.3-static.pet (19K)

- using zero (0) as a choice, petch exits normally (an easy exit)
- using a letter (a, c, x, !, # ) petch exits normally
- using minus one (-1) to minus six (-6) as a choice, petch really connects and downloads a package on the list !
-1 ... #http://puppylinux.ca/puppyfiles/pet_packages-3/915resolution-0.5.3-static.pet
-2 ... #http://distro.ibiblio.org/pub/linux/distributions/puppylinux/pet_packages-4/915resolution-0.5.3-static.pet
- using minus seven (-7), petch does it's thin air thing.
- using plus seven (7) as a choice (over the limits), ok, downloading... done (thin air)
- thin air thing : be really dumb and choose [i] to install ...

find: warning: you have specified the -mount option after a non-option argument -type, but options are not positional (-mount affects tests specified before it as well as those specified after it). Please specify options before other arguments.

cp: cannot stat `/root/.fvwm95rc': No such file or directory
cp: cannot stat `/tmp/fvwm95rcBACKUP': No such file or directory
/sbin/petget: line 197: 13042 Terminated yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "PETget package manager
Updating menu, please wait..."
rm: cannot remove directory `./'
/sbin/petget: line 287: 19672 Terminated yaf-splash -font "8x16" -outline 0 -margin 4 -bg orange -text "PETget package manager
Checking dependencies, please wait..."

Success ! (package thin air has been installed)

Great idea tombh, hope this helps , keep going .. Wink
.
Back to top
View user's profile Send private message 
moron

Joined: 06 Oct 2008
Posts: 25

PostPosted: Mon 06 Oct 2008, 14:17    Post subject:  

oh, does this mean the pupster doesnt update itself then,

i wuz jus gonna try it

but if youve only jus got a pkg manager i think i'll go on lookin
Back to top
View user's profile Send private message 
trapster


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

PostPosted: Mon 06 Oct 2008, 17:52    Post subject:  

moron wrote:
Quote:
oh, does this mean the pupster doesnt update itself then


No....neither will it turn your computer on as you're pulling in the driveway. Nor will it cook breakfast for you. It might clean your house for you but I haven't asked that question in the forum yet.

Good luck going on looking.

_________________
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 
moron

Joined: 06 Oct 2008
Posts: 25

PostPosted: Mon 06 Oct 2008, 18:32    Post subject:  

holey smoley trapster

wuznt expectin nun o dat neever

jus lookin fer a better os dan windas

carnt be dat hard?

praps i shud get a mac
Back to top
View user's profile Send private message 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Mon 06 Oct 2008, 18:37    Post subject:  

moron wrote:
praps i shud get a mac

Yes, do that.

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
moron

Joined: 06 Oct 2008
Posts: 25

PostPosted: Mon 06 Oct 2008, 18:45    Post subject:  

happy lot arntya - not
Back to top
View user's profile Send private message 
Caneri

Joined: 04 Sep 2007
Posts: 1580
Location: Canada

PostPosted: Mon 06 Oct 2008, 19:02    Post subject:  

Hi People,

You are being baited..let the moron rest in peace..we've seen this before.

@moron...what's your alias..you've been here before to be..well..a moron...as usual, learn to spell and goodbye. I would hope the mods delete this one as it's the same as the other one...sheesh

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 
Béèm


Joined: 21 Nov 2006
Posts: 11782
Location: Brussels IBM Thinkpad R40, 256MB, 20GB, WiFi ipw2100. Frugal Lin'N'Win

PostPosted: Mon 06 Oct 2008, 19:45    Post subject:  

You're right, Eric.
The saying is: don't feed the trolls, they will die then. Cool

_________________
Time savers:
Find packages in a snap and install using Puppy Package Manager (Menu).
Consult Wikka
Use peppyy's puppysearch
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 3 of 5 [72 Posts]   Goto page: Previous 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.0980s ][ Queries: 13 (0.0063s) ][ GZIP on ]