Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Elogviewer, a python/gtk graphical elog viewer
View unanswered posts
View posts from last 24 hours

Goto page 1, 2, 3  Next  
Reply to topic    Gentoo Forums Forum Index Unsupported Software
View previous topic :: View next topic  
Author Message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Thu May 25, 2006 9:38 pm    Post subject: Elogviewer, a python/gtk graphical elog viewer Reply with quote

I started from an idea of nmbrthry in here

Last updated Tue Oct 10 01:16:55 JST 2006 v. 0.4.1

Abstract This program (python/pygtk) parses the elogs (portage 2.1) in a graphical environment.
Features:
    graphical elog viewer
    filters the output on demand
    button to delete elog(s)
    keyboard shortcuts


Usage: elogviewer or PORT_LOGDIR=/path/to/elogs/.. elogviewer

License: GPL2 or later

installation from the official overlay sunrise (thank you V-Li):
emerge layman
layman -f
layman -a sunrise
emerge elogviewer


"Official" site with a screenshot http://sourceforge.net/projects/elogviewer.
_________________
Compress portage tree
Elog viewer
Autodetect swap


Last edited by synss on Thu Oct 26, 2006 2:19 pm; edited 11 times in total
Back to top
View user's profile Send private message
nmbrthry
Tux's lil' helper
Tux's lil' helper


Joined: 21 Jun 2005
Posts: 80
Location: Urbana-Champaign, IL

PostPosted: Fri Jun 02, 2006 3:50 am    Post subject: Reply with quote

Wow, this is really coming together nicely. I'm glad you were able to take my idea and run with it.
Back to top
View user's profile Send private message
maxima
Apprentice
Apprentice


Joined: 01 Oct 2004
Posts: 150

PostPosted: Sun Jun 11, 2006 10:45 am    Post subject: Reply with quote

thank you very much, it works perfectly here. I have some minor annoyances though
- the outer border is too wide, I want it looks like the other GNOME apps
- can you supress the error message when you're trying to tick/untick the textboxes where nothing is selected

Anyway good job. I suggest you submit this to bugzilla, request for portage inclusion.
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Sun Jun 11, 2006 5:51 pm    Post subject: Reply with quote

Thank you for your feedback, maxima. I updated the code to take your suggestions into account. I would love to have that prog in the official tree!
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
maxima
Apprentice
Apprentice


Joined: 01 Oct 2004
Posts: 150

PostPosted: Mon Jun 12, 2006 12:41 am    Post subject: Reply with quote

Thank you, that was fast. I have one more suggestion, it would be nice if you could use gtk treeview or gtk expander in the viewing area. Sorry if I'm asking to much. I want to learn python myself but haven't got time to do it. I read from the other thread that you don't know python, that wasn't true right?
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Mon Jun 12, 2006 5:42 pm    Post subject: Reply with quote

Thank you! I will see what I can do.

maxima wrote:
I read from the other thread that you don't know python, that wasn't true right?

:) No, that (wa)s true. But I have experience in more difficult programming using c/c++, fortran, even some MS Visual C# (research, science), so that going for another language of the same type is not very difficult. And it is also true that I do not like GUI that much, do not use it that much and do not like to design it that much either. I like writing code, that's my fun! Although for the elogs, "less" was definitely not optimal! So I rewrote nmbrthry's prog (is not that the FOSS philosophy after all?) and pygtk is really nice and easy! The ppl who have made that are definitely good at making things effective.

Enough with my CV...

If I have time this week and feel like so, I will try using the gtk.expander.

I also submitted it to bugzilla, so maybe elogviewer will make it to app-portage! For those who want to make it the gentoo way, I have written (very fast I must say) an ebuild. Go get it from bugzy to be sure you have the latest version http://bugs.gentoo.org/show_bug.cgi?id=136496

But thank you for your support maxima, I really appreciate.
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
FLP
n00b
n00b


Joined: 18 May 2005
Posts: 16
Location: Hannover

PostPosted: Mon Jun 12, 2006 6:19 pm    Post subject: Reply with quote

Works really nice, no problems at all. Good work. :)
Back to top
View user's profile Send private message
unz
l33t
l33t


Joined: 28 Jul 2004
Posts: 819
Location: Roma, Italia

PostPosted: Mon Jun 12, 2006 10:13 pm    Post subject: Reply with quote

great prog!!! it needs an icon and a .desktop entry ;)
_________________
Ma che c'hai là? Sulla spalla!!!! http://lascimmia.it/
Back to top
View user's profile Send private message
maxima
Apprentice
Apprentice


Joined: 01 Oct 2004
Posts: 150

PostPosted: Wed Jun 14, 2006 5:11 am    Post subject: Reply with quote

I've just noticed the delete function doesn't work even it's run as root. And the log files have a permission 644 owned by root, is there any way to change the default permission ?
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Wed Jun 14, 2006 8:04 am    Post subject: Reply with quote

@maxima, it works here, if you downloaded the update yesterday, I had made a mistake and uploaded a "debug" version where I print the filename at the console instead of deleting it, although it should not have been hosted very long. Is it what is happening (is thefilename printed at the console?) in which case getting the file from the forum here should solve it. If not, I need more info...

It is also becoming complicated to update on my computer, the forum link and bugzilla, you seem more familiar than me about all these things, do you know of a simpler way of updating/sharing the source? I am not sure opening a sourceforge or similar account is really worth it, but I don't know... And my computer is a laptop so I cannot share the files from here via subversion or ftp or whatever.
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
maxima
Apprentice
Apprentice


Joined: 01 Oct 2004
Posts: 150

PostPosted: Wed Jun 14, 2006 10:21 am    Post subject: Reply with quote

oh I downloaded it from bugzilla, ok I'll try the one from here but I can't test it now my log is empty. And yes the one I have prints the filename to the console.

about the sharing I'm not too sure either, I think you can just put a link in the bugzilla & forum and make the link point to the parent where you store all the tarballs. So you don't have to upload everytime you're making a new release.
Back to top
View user's profile Send private message
theoakwise
n00b
n00b


Joined: 15 May 2004
Posts: 37

PostPosted: Sat Jun 17, 2006 11:52 pm    Post subject: ignore me. Reply with quote

[EDIT]Nuts. When will I learn patience? If I'd've just waited for the ebuild to finish, I'd've seen the solution. SORRY![/EDIT]

I'm having a problem where my portage seems not to create the elog subidir of the directory in the PORT_LOGDIR variable. I fiddled with the elogviewer code to make it work, but I'm wondering if I'm doing something wrong?

Relevant make.conf section (I made elogviewer just take the PORT_LOGDIR variable as is, rather than trying to change to the elog subdir):

Code:

PORT_LOGDIR=/var/log/portage/elog
PORTAGE_ELOG_CLASSES="warn error info log"
PORTAGE_ELOG_SYSTEM="save"


make.conf.example has this to say:
Code:

# PORTAGE_ELOG_SYSTEM: selects the module(s) to process the log messages. Modules
#                      included in portage are (empty means logging is disabled):
#                          save (saves one log per package in $PORT_LOGDIR/elog,
#                                /var/log/portage/elog if $PORT_LOGDIR is unset)

Which is certainly not how things are going. I get all the log files in the PORT_LOGDIR directory.
Back to top
View user's profile Send private message
Jeremy_Z
l33t
l33t


Joined: 05 Apr 2004
Posts: 671
Location: Shanghai

PostPosted: Thu Jun 22, 2006 4:41 am    Post subject: Reply with quote

Hi all, nice work synss.

I ported your app to PyKDE for those who can't use gtk in their kde environment. I am looking for some web space to put the file in for now, synss maybe you can host it on your website ?

Edit : Ok i found something, you can get it at Kelogviewer
_________________
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Back to top
View user's profile Send private message
TehCaster
n00b
n00b


Joined: 28 Jun 2006
Posts: 3

PostPosted: Wed Jun 28, 2006 11:02 am    Post subject: Reply with quote

Jeremy_Z wrote:
Hi all, nice work synss.
Edit : Ok i found something, you can get it at Kelogviewer


This URL gives me 403...

synss: good app, but:
- you are missing "prerm" and "postrm" phases, they need to be added to class Filter: filter = { ... } (those were not elogged in earlier 2.1 versions by mistake but it's fixed now)
- after deleting last log it gives some exception (not fatal :)
- I would like a keyboard shortcut (Del would be great :) for deleting log, clicking mouse is bothering me :)

Keep up the good work!
Back to top
View user's profile Send private message
Jeremy_Z
l33t
l33t


Joined: 05 Apr 2004
Posts: 671
Location: Shanghai

PostPosted: Wed Jun 28, 2006 3:27 pm    Post subject: Reply with quote

Yes, that provider is crap ... and i managed to screw things with their "admin interface" were deleted files are style listed but no more accessible so i cannot even re-create an "index.php".

So i've wisely chosen to drop them for something with an ftp access.

You can get it there : http://jeremywick.phpnet.us/kelogviewer.tgz
_________________
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Thu Jun 29, 2006 12:08 am    Post subject: Reply with quote

Jeremy_Z: nice you also make it kde-friendly.

If somebody is interested in programming, it would probably be very helpful for people without X/on ssh, to have an ncurse version too. I have kept all GUI-related stuff separated from the rest, so it should not be a major effort to anyone knowing a bit of ncurses.

TehCaster: "prerm" and "postrm" phases are added on the version linked from the top of the forum + the archive fetched by the ebuild.

"after deleting last log it gives some exception" i found that too, I though I had gotten rid of it, though... but it is still there. Pain.
"I would like a keyboard shortcut..." me too :)



Anyway, the program will be on standby for a couple of months as I am going on voluntary unemployement. I do need holidays! I have no idea how much time I'll spend on my computer during that time and what access to the internet I'll have. Probably not much :D (makes me happy, there are other things in life almost as enjoyable as python)
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
Jeremy_Z
l33t
l33t


Joined: 05 Apr 2004
Posts: 671
Location: Shanghai

PostPosted: Thu Jun 29, 2006 3:08 am    Post subject: Reply with quote

Back here, i put the so wished for shortcut :D and corrected some details. I do not have much time to spend on it neither, but i might take a look on ncurses because i never used it in dev before (well just like python or QT, so why not).
_________________
"Because two groups of consumers drive the absolute high end of home computing: the gamers and the porn surfers." /.
My gentoo projects, Kelogviewer and a QT4 gui for etc-proposals
Back to top
View user's profile Send private message
dberkholz
Developer
Developer


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Tue Aug 01, 2006 5:41 am    Post subject: Reply with quote

FWIW I wrote a CLI-based tool for this ages ago -- http://dev.gentoo.org/~dberkholz/scripts/eread -- maybe some of you can use it.
Back to top
View user's profile Send private message
uweklosa
Tux's lil' helper
Tux's lil' helper


Joined: 18 Feb 2005
Posts: 105

PostPosted: Sat Aug 05, 2006 4:51 pm    Post subject: Reply with quote

I updated the script of dbberkholz

Code:

#!/bin/bash

# This is a script to read portage log items from einfo, ewarn etc, new in the
# portage-2.1 series.
#
# Author: Donnie Berkholz <spyderous@gentoo.org>
# Updated by: Uwe Klosa <uwe.klosa@gmail.com>

# Set ELOGDIR
ELOGDIR=/var/log/portage/elog/

# Set up select prompt
PS3="Choice? "

select_loop() {
        ANY_FILES=$(/usr/bin/find ${ELOGDIR} -type f)

        if [[ -z ${ANY_FILES} ]]; then
                echo "No log items to read"
                break
        fi

        echo
        echo "This is a list of portage log items. Choose a number to view that file or type q to quit."
        echo

        # Pick which file to read
        select FILE in ${ANY_FILES}; do
                case ${REPLY} in
                        q)
                                echo "Quitting"
                                QUIT="yes"
                                break
                                ;;
                        *)
                                /usr/bin/less ${FILE}
                                read -p "Delete file? [y/N] " DELETE
                                case ${DELETE} in
                                        q)
                                                echo "Quitting"
                                                QUIT="yes"
                                                break
                                                ;;
                                        y|Y)
                                                /usr/bin/rm -f ${FILE}
                                                SUCCESS=$?
                                                if [[ ${SUCCESS} = 0 ]]; then
                                                        echo "Deleted ${FILE}"
                                                else
                                                        echo "Unable to delete ${FILE}"
                                                fi
                                                ;;
                                        # Empty string defaults to N (save file)
                                        n|N|"")
                                                echo "Saving ${FILE}"
                                                ;;
                                        *)
                                                echo "Invalid response. Saving ${FILE}"
                                                ;;
                                esac
                                ;;
                esac
                break
        done
}

until [[ -n ${QUIT} ]]; do
        select_loop
done
Back to top
View user's profile Send private message
dberkholz
Developer
Developer


Joined: 18 Mar 2003
Posts: 1008
Location: Minneapolis, MN, USA

PostPosted: Sat Aug 05, 2006 8:06 pm    Post subject: Reply with quote

uweklosa wrote:
I updated the script of dbberkholz

Thanks! I incorporated your changes and uploaded a new copy.
Back to top
View user's profile Send private message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Fri Aug 11, 2006 12:18 pm    Post subject: Reply with quote

I am bit confused as to which type of log file (k)elogviewer is processing. If I set my logging options like this:
Code:

PORTAGE_ELOG_CLASSES="warn error log"
PORTAGE_ELOG_SYSTEM="syslog save"
PORT_LOGDIR="/var/log/portage"

I get a whole mass of files in "/var/log/portage" which look like this:

    >>> Unpacking source...
    >>> Unpacking portage-2.1.1_pre4.tar.bz2 to /var/tmp/portage/portage-2.1.1_pre4-r2/work
    >>> Unpacking portage-2.1.1_pre4-r2.patch.bz2 to /var/tmp/portage/portage-2.1.1_pre4-r2/work
    * Applying portage-2.1.1_pre4-r2.patch ...
    [ ok ]
    * Setting portage.VERSION to 2.1.1_pre4-r2 ...
    [ ok ]
    >>> Source unpacked.
    >>> Compiling source in /var/tmp/portage/portage-2.1.1_pre4-r2/work/portage-2.1.1_pre4 ...
    >>> Source compiled.
    >>> Test phase [not enabled]: sys-apps/portage-2.1.1_pre4-r2

    >>> Install portage-2.1.1_pre4-r2 into /var/tmp/portage/portage-2.1.1_pre4-r2/image/ category sys-apps
    patching file make.conf
    >>> Completed installing portage-2.1.1_pre4-r2 into /var/tmp/portage/portage-2.1.1_pre4-r2/image/

    man:
    gzipping man page: quickpkg.1
    gzipping man page: emaint.1
    gzipping man page: emerge.1
    gzipping man page: repoman.1
    gzipping man page: env-update.1
    gzipping man page: dispatch-conf.1
    gzipping man page: ebuild.1
    gzipping man page: etc-update.1
    gzipping man page: portage.5
    gzipping man page: make.conf.5
    gzipping man page: ebuild.5
    strip: i686-pc-linux-gnu-strip --strip-unneeded
    usr/lib/portage/bin/tbz2tool
    *
    * For help with using portage please consult the Gentoo Handbook
    * at http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=3
    *

and three files in "/var/log/portage/elog" which look like this:

If I set
Code:
PORT_LOGDIR="/var/log/portage/elog"

all the files go there but elogviewer ignores them because they don't have the correct header. So what is supposed to be going on?! I am currently running portage-2.1.1_pre4-r4.
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
synss
Apprentice
Apprentice


Joined: 08 Mar 2006
Posts: 280
Location: Dijon (F) > Berlin > Tokyo > Nürnberg (D)

PostPosted: Fri Aug 11, 2006 12:31 pm    Post subject: Reply with quote

it only deals with the ones you have put under
Quote:
and three files in "/var/log/portage/elog" which look like this:
that is enotice, ewarn, etc. written in the ebuilds, not the complete log.
_________________
Compress portage tree
Elog viewer
Autodetect swap
Back to top
View user's profile Send private message
binro
Guru
Guru


Joined: 06 May 2005
Posts: 525
Location: Bangkok, Thailand

PostPosted: Fri Aug 11, 2006 12:38 pm    Post subject: Reply with quote

Ok, thanks for the clarification.
_________________
"Ship me somewheres east of Suez, where the best is like the worst,
Where there ain't no Ten Commandments an' a man can raise a thirst"
from "Mandalay" by Rudyard Kipling
Back to top
View user's profile Send private message
lateralus__
Tux's lil' helper
Tux's lil' helper


Joined: 19 May 2006
Posts: 100
Location: Belgium

PostPosted: Fri Aug 11, 2006 3:22 pm    Post subject: Reply with quote

Thank you so much for this incredible little application.
It works like a charm :wink:
_________________
There are a lot of lies going around.... and half of them are true.
-- Winston Churchill
Back to top
View user's profile Send private message
framirez
n00b
n00b


Joined: 11 Aug 2006
Posts: 11

PostPosted: Tue Aug 15, 2006 5:12 pm    Post subject: when it gonna be in portage? Reply with quote

i was wondering when we gonna have it available in portage its a really helpful tool..

also i havent been able to download it.. all i get is a bunch of text.. lot of crap from the download link http://www.rz-berlin.mpg.de/~laurin/elogviewer
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Unsupported Software All times are GMT
Goto page 1, 2, 3  Next
Page 1 of 3

 
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