You are not logged in.

#1 2011-09-10 19:26:39

Veedrac
Member
Registered: 2011-07-19
Posts: 81

ccat: Pacnet in Python

ccat is Pacnet with more features, written in python. It has been on my computer for a small while so I thought I might as well go and throw it here.

Goals:

  • As fast or faster than Pacnet*.

  • A lot more flexible with searches and output. One thing that really bugged me with Pacnet was this inability to just list the files (a la pacman's -Sq -Ssq).

  • Ability to later add install support, so I can search and install in one short command. I haven't done this yet, but it's possible now it's written in a language I understand.

  • Further my python knowledge.

*Normally takes about four fifths the time for me [long results (like searching for '') are done in under a third the time, though].

Install it yourself**, get it from dropbox.

**Cause I don't know how making packages work yet tongue

Preemptive Q&A:
Q: Why 'ccat'?
A: It's a long story. But the short version is that is was 'seacat' for 'search (with) categories', and when I cythonized it for speed I went for the pun.

Q: Cythonized?
A: See cython.org. It's a very clever python compiler for people who like fast.

Q: Do we need Cython, then?
A: No. The .so file is precompiled. If it doesn't work, delete it and it will fall back on the python version. If it fails and you don't want to just fall back, that is when you need cython - just run "python setup.py build_ext --inplace".



No guarantees. Tell me if it fails, blows up, mutilates someone or makes any errors in any way. Or, of course, if I've done something stupid.

Last edited by Veedrac (2011-09-10 20:14:49)

Offline

#2 2011-09-10 19:33:51

karol
Archivist
Registered: 2009-05-06
Posts: 25,440

Re: ccat: Pacnet in Python

Haven't tried ccat yet, just nitpicking:

[karol@black ~]$ pacman -Sq
error: no targets specified (use -h for help)
[karol@black ~]$ pacman -Sq qt
resolving dependencies...
looking for inter-conflicts...

Targets (1): qt-4.7.4-2 [24,75 MB]

Total Download Size:    24,75 MB
Total Installed Size:   100,73 MB

Proceed with installation? [Y/n]

thus I conclude 'pacman -Sq' doesn't just list files ;P

Offline

#3 2011-09-10 19:58:09

Veedrac
Member
Registered: 2011-07-19
Posts: 81

Re: ccat: Pacnet in Python

Appologies. Actually, don't try it yet. I just found a bug with the default parser tongue
EDIT: Bug should be fixed
EDIT2: I forgot to update the fallback, I've done that now

----
EDIT  as to not bump an obviously unneeded program: If you've been using the fallback and encountered errors, it should be better now. Although the fallback is slower, anyway - so don't use it.

Last edited by Veedrac (2011-09-13 22:51:50)

Offline

Board footer

Powered by FluxBB