aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuca Marturana <lucamarturana@me.com>2013-05-04 23:23:23 +0200
committerLuca Marturana <lucamarturana@me.com>2013-05-04 23:23:23 +0200
commitb0aede5ce0c1d303d4488bc4d7e60411c34b7049 (patch)
treeb64ea15a1fc99a13376e4cb49f3b981b13450724
downloadelogv-b0aede5ce0c1d303d4488bc4d7e60411c34b7049.tar.gz
elogv-b0aede5ce0c1d303d4488bc4d7e60411c34b7049.tar.bz2
elogv-b0aede5ce0c1d303d4488bc4d7e60411c34b7049.zip
Import of elogv version 0.7.50.7.5
-rw-r--r--INSTALL3
-rw-r--r--PKG-INFO10
-rw-r--r--README41
-rwxr-xr-xelogv574
-rw-r--r--man/elogv.186
-rw-r--r--man/elogv.1.de87
-rw-r--r--man/elogv.1.es86
-rw-r--r--man/elogv.1.it89
-rw-r--r--man/elogv.1.pl87
-rw-r--r--po/de.po127
-rw-r--r--po/elogv.pot77
-rw-r--r--po/es.po105
-rw-r--r--po/it.po126
-rw-r--r--po/pl.po127
-rw-r--r--setup.py264
15 files changed, 1889 insertions, 0 deletions
diff --git a/INSTALL b/INSTALL
new file mode 100644
index 0000000..982f8e0
--- /dev/null
+++ b/INSTALL
@@ -0,0 +1,3 @@
+To install elogv run in a root shell:
+
+ # python setup.py install
diff --git a/PKG-INFO b/PKG-INFO
new file mode 100644
index 0000000..d43f37f
--- /dev/null
+++ b/PKG-INFO
@@ -0,0 +1,10 @@
+Metadata-Version: 1.0
+Name: elogv
+Version: 0.7.5
+Summary: Curses based utility to view elogs created by Portage
+Home-page: http://gechi-overlay.sourceforge.net/?page=elogv
+Author: Luca Marturana
+Author-email: lucamarturana@gmail.com
+License: GPL-2
+Description: UNKNOWN
+Platform: UNKNOWN
diff --git a/README b/README
new file mode 100644
index 0000000..79943b8
--- /dev/null
+++ b/README
@@ -0,0 +1,41 @@
+Elogv is a simple tool written in python that allow you to easy read
+portage elog files. To launch it, type on a console:
+
+$ elogv
+
+Inside the program, you can use these keys:
+
+ - Down arrow -> Scroll the list of files down by 1 unit
+ - Up arrow -> opposite of Down arrow
+ - Pag Down -> Scroll the list down by 10 unit
+ - Pag Up -> opposite of Pag Down
+ - End -> Go to the last file of the list
+ - Home -> Go to the first file of the list
+ - t -> order the list of files by date, most recent on top
+ - a -> order the list of files alphabetically
+ - r -> reverse the list of files
+ - SpaceBar -> scroll the selected file
+ - h or F1 -> show the help screen, press Page Up/Down to scroll up and down,
+ h and F1 again to hide
+ - d -> removes log files, usage is similar to vim "d" command, here are
+ same examples:
+ da -> removes all files
+ de -> removes from selected item to the end of the list
+ ds -> remove from selected item to the start of the list
+ d1d or dd -> removes selected file only
+ d4d -> removes 4 files starting from selected one
+ - q -> quit
+
+
+Note:
+
+To use this software you need the portage elog system configured on your
+/etc/make.conf, this is a simply configuration:
+
+---- /etc/make.conf
+# Logging
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+----
+
+For other details see /etc/make.conf.example
diff --git a/elogv b/elogv
new file mode 100755
index 0000000..53c37cd
--- /dev/null
+++ b/elogv
@@ -0,0 +1,574 @@
+#!/usr/bin/python
+# Author: Luca Marturana (luca89) <lucamarturana@gmail.com>
+
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+
+import os
+import sys
+import re
+from datetime import datetime
+import curses
+import curses.ascii
+import textwrap
+from portage import settings as port_settings
+from glob import glob
+import gettext
+import locale
+
+# Setup default locale
+locale.setlocale(locale.LC_ALL, '')
+
+# Setup gettext. Note that lgettext() is used instead of gettext()
+# because it always returns strings encoded with the preferred system
+# encoding, not encoded with the same codeset used in the translation
+# file
+gettext.textdomain('elogv')
+_ = gettext.lgettext
+
+# This text is used on the in-line help
+helptext = _("""
+Elogv is a portage elog viewer based on curses and python,
+you can use these keys to control the behavior of the program:
+
+ - Down arrow or j -> scroll the list of files down by 1 unit
+ - Up arrow or k -> opposite of Down arrow
+ - PageDown -> scroll the list down by 10 unit
+ - PageUp -> opposite of PageDown
+ - End -> go to the last file of the list
+ - Home -> go to the first file of the list
+ - t -> order the list of files by date, most recent on top
+ - a -> order the list of files alphabetically, the first time by category,
+ the second time (pressing the key again) by package name
+ - c -> order the list of files by log class warning level
+ - r -> reverse the list of files
+ - SpaceBar -> scroll the selected file
+ - h or F1 -> show the help screen, press Page Up/Down to scroll up and down,
+ h or F1 again to hide
+ - d -> removes selected files, usage is similar to vim "d" command,
+ here are same examples:
+ da -> removes all files
+ de -> removes from selected item to the end of the list
+ ds -> remove from selected item to the start of the list
+ d1d or dd -> removes selected file only
+ d4d -> removes 4 files starting from selected one
+ - / -> starts a search prompt, write a string and will be showed the next
+ package that contains your string, use ESC to exit
+ - q -> quit
+""")
+
+(normal, selected, einfo, elog, ewarn, eerror) = range(6)
+(PATH, CAT, PN, DATE, CLASS) = range(5)
+
+# Character used to print the class of an elog
+class_char = "*"
+list_format = "%s/%s - %s"
+date_format = "%x"
+
+# Exceptions classes
+class TermTooSmall(Exception):
+ def __init__(self):
+ pass
+
+class NoLogFiles(Exception):
+ def __init__(self):
+ pass
+
+class CannotOpenElogdir(Exception):
+ def __init__(self):
+ pass
+
+# Main class (called with curses.wrapper later)
+class ElogViewer:
+ def __init__(self, screen):
+ #curses.curs_set(0)
+ self.screen = screen
+
+ # Our color pairs
+ curses.use_default_colors()
+ curses.init_pair(selected, curses.COLOR_BLACK, curses.COLOR_WHITE)
+ curses.init_pair(einfo, curses.COLOR_GREEN, curses.COLOR_BLACK)
+ curses.init_pair(ewarn, curses.COLOR_YELLOW, curses.COLOR_BLACK)
+ curses.init_pair(eerror, curses.COLOR_RED, curses.COLOR_BLACK)
+ curses.init_pair(elog, curses.COLOR_MAGENTA, curses.COLOR_BLACK)
+
+ # This attributes are used to manage the scrolling of the list
+ # of files
+ self.pposy = 0
+ self.usel = 0
+
+ # Method used to order the list: use DATE for order by date, CAT to
+ # order by category name, PN to order by package name, CLASS to order
+ # by class second value set if the list should be reversed (True o False)
+ self.sort_method = [ DATE, False]
+
+ # Initialize screen
+ self.init_screen()
+
+ c = self.screen.getch()
+ while c not in ( ord("q"), curses.ascii.ESC):
+ ## Scrolling keys ##
+ if c in (curses.KEY_DOWN, ord("j")):
+ self.change_usel(1)
+
+ elif c in (curses.KEY_UP, ord("k")):
+ self.change_usel(-1)
+
+ elif c in (curses.KEY_NPAGE, ord("f")):
+ self.change_usel(10)
+
+ elif c in (curses.KEY_PPAGE, ord("b")):
+ self.change_usel(-10)
+
+ elif c in (curses.KEY_END, ord("G")):
+ self.change_usel(len(self.packages)-1, False)
+
+ elif c in (curses.KEY_HOME, ord("g")):
+ self.change_usel(0, False)
+ ## End Scrolling keys ##
+
+ ## Sorting the list ##
+ elif c == ord("a"):
+ if self.sort_method[0] == CAT:
+ self.sort_method[0] = PN
+ else:
+ self.sort_method[0] = CAT
+ self.fill_file_pad()
+ self.refresh_file_pad()
+
+ elif c == ord("t"):
+ self.sort_method[0] = DATE
+ self.fill_file_pad()
+ self.refresh_file_pad()
+
+ elif c == ord("c"):
+ self.sort_method[0] = CLASS
+ self.fill_file_pad()
+ self.refresh_file_pad()
+
+ elif c == ord("r"):
+ self.sort_method[1] = not self.sort_method[1]
+ self.fill_file_pad()
+ self.refresh_file_pad()
+ ## End Sorting the list ##
+
+ elif c == ord(" "):
+ # Now is used only for scrolling the text
+ self.show_log()
+
+ elif c == curses.KEY_RESIZE:
+ # Reinitialize screen
+ self.init_screen()
+
+ elif c in (curses.KEY_F1, ord("h")):
+ self.show_help()
+ # We need to reinitialize the screen
+ self.init_screen()
+
+ elif c == ord("d"):
+ subc = self.screen.getch()
+ if subc == ord("a"):
+ n = "all"
+ elif subc == ord("e"):
+ n = "end"
+ elif subc == ord("s"):
+ n = "start"
+ elif subc == ord("d"):
+ n = "1"
+ else:
+ n = ""
+ while curses.ascii.isdigit(subc):
+ n += chr(subc)
+ subc = self.screen.getch()
+ if n:
+ self.remove_file(n)
+ self.file_pad.erase()
+ self.refresh_file_pad()
+ # If the user deleted files to start, move the selection
+ # to the first item
+ if n == "start":
+ self.usel = 0
+ self.pposy = 0
+ self.fill_file_pad()
+ self.refresh_file_pad()
+ self.logf_wrap = self.wrap_logf_lines()
+ self.show_log()
+
+ elif c == ord("/"):
+ word = ""
+ self.screen.move(self.height-1,2)
+ self.screen.addstr("/")
+ subc = self.screen.getch()
+ while subc != curses.ascii.ESC:
+ if subc == ord("\n"):
+ self.search(word,1)
+ elif subc == curses.ascii.BS:
+ word = word[:-1]
+ self.screen.delch()
+ self.search(word)
+ elif curses.ascii.isalpha(subc):
+ word += chr(subc)
+ self.screen.addstr(chr(subc))
+ self.search(word)
+ subc = self.screen.getch()
+ self.screen.hline(self.height-1,2,curses.ACS_HLINE,(len(word)+1))
+ self.screen.addstr(self.height-2,2," "*20)
+
+ # Get another key from the user
+ c = self.screen.getch()
+
+ def init_screen(self):
+ """
+ Init the screen and wins, it's also used to reinizialize screen
+ after a terminal resizing
+ """
+ (self.height, self.width) = self.screen.getmaxyx()
+
+ # Check if the terminal window is too small
+ if self.height < 12 or self.width < 80:
+ raise TermTooSmall()
+
+ # Screen Look&Feel
+ self.screen.border()
+ self.screen.hline(self.height//2,1, "_", self.width-2)
+ m = _(" Press F1 or h to show the help screen ")
+ self.screen.addstr(self.height-1, self.width-len(m)-1, m)
+ self.screen.refresh()
+
+ # Initialize log file window
+ self.log_win = curses.newwin(self.height//2-2, self.width-2,
+ self.height//2+1, 1)
+
+ # Draw other window of the screen
+ self.fill_file_pad()
+ self.refresh_file_pad()
+
+ self.logf_wrap = self.wrap_logf_lines()
+ self.show_log()
+
+ def change_usel(self,n,relative=True):
+ prev_usel = self.usel
+ if not relative:
+ self.usel = n
+ elif n < 0 and self.usel+n < 0:
+ self.usel = 0
+ elif n > 0 and self.usel+n > len(self.packages)-1:
+ self.usel = len(self.packages)-1
+ else:
+ self.usel += n
+
+ prev_pkg = self.packages[prev_usel]
+ pkg = self.packages[self.usel]
+ self.file_pad.addstr(prev_usel,1,
+ class_char,
+ curses.A_BOLD + curses.color_pair(prev_pkg[CLASS]))
+ self.file_pad.addstr(prev_usel,3,
+ list_format % (prev_pkg[CAT], prev_pkg[PN], prev_pkg[DATE].strftime(date_format) ),
+ curses.color_pair(normal))
+ self.file_pad.addstr(self.usel,1,
+ class_char,
+ curses.A_BOLD + curses.color_pair(pkg[CLASS]))
+ self.file_pad.addstr(self.usel,3,
+ list_format % (pkg[CAT], pkg[PN], pkg[DATE].strftime(date_format) ),
+ curses.color_pair(selected))
+
+ first = self.pposy
+ last = (self.height / 2 - 2) + first
+
+ if self.usel < first:
+ self.pposy -= first - self.usel
+
+ if self.usel > last:
+ self.pposy += self.usel - last
+ self.refresh_file_pad()
+ self.logf.close()
+ try:
+ self.logf = open(pkg[PATH])
+ except IOError:
+ # print ("Logfile not found at '%s'. Did it get deleted somehow?"
+ # % os.path.join(elogdir,pkg[PATH]))
+ self.init_screen()
+ self.change_usel(prev_usel, False)
+ self.logf_wrap = self.wrap_logf_lines()
+ self.show_log()
+
+ def refresh_file_pad(self):
+ """
+ Redraws file pad, first half of the screen.
+ Can be used to scroll or simply update
+ """
+ self.file_pad.refresh(self.pposy,0,1,1,self.height//2-1,self.width-2)
+
+ def get_packages_key(self, k):
+ return k[self.sort_method[0]]
+
+ def fill_file_pad(self):
+ """
+ Fill the list of files, colorize the selected row and order files by
+ method specified
+ """
+ # Get the list of files
+ try:
+ file_list = glob(os.path.join(elogdir,"*:*:*.log")) + glob(os.path.join(elogdir,"*","*:*.log"))
+ except OSError:
+ raise CannotOpenElogdir()
+
+ if not file_list:
+ raise NoLogFiles()
+
+ # self.packages contains all info extracted from each file, this is the
+ # structure:
+ # [ ("filename", "category", "package name", date:datetime_obj, class:int), ... ]
+ self.packages = []
+ for filepath in file_list:
+ # This istruction splits the information about the package from the file path
+ # If the user don't use split-elog feature the format used by portage is:
+ # <elogdir>/x11-themes:haematite-xcursors-1.0:20091018-195827.log
+ # else with the split-elog feature:
+ # <elogdir>/x11-themes/haematite-xcursors-1.0:20091018-195827.log
+ # So first we remove the elogdir from the filepath to obtain
+ # x11-themes:haematite-xcursors-1.0:20091018-195827.log
+ # or
+ # x11-themes/haematite-xcursors-1.0:20091018-195827.log
+ # then we split the string using as pattern / or : to obtain in any
+ # case
+ # ( "x11-themes", "haematite-xcursors", "1.0:20091018-195827.log")
+ (cat,pn,other) = re.split(":|" + os.path.sep, filepath.replace(elogdir + os.path.sep, "") )
+ if sys.version_info[:2] >= (2, 5):
+ date = datetime.strptime(other, "%Y%m%d-%H%M%S.log")
+ else:
+ # This is for backward compatibility with older version of python
+ # it will be removed in the future
+ date_str = other[:8]
+ date = datetime(int(date_str[:4]),int(date_str[4:6]),int(date_str[6:]))
+ self.packages.append( (filepath, cat, pn, date, self.get_class(filepath)) )
+
+ # Maybe that after removing files self.usel points to a wrong index,
+ # so this will prevent a crash
+ if self.usel >= len(self.packages):
+ self.usel = len(self.packages)-1
+ # We also have to update self.pposy
+ if self.pposy > self.usel:
+ self.pposy = max(0, self.usel-10)
+
+ # Sort the list
+ if self.sort_method[0] in (DATE, CLASS):
+ self.packages.sort(key=self.get_packages_key,reverse=not self.sort_method[1])
+ else:
+ self.packages.sort(key=self.get_packages_key, reverse=self.sort_method[1])
+
+ self.file_pad = curses.newpad(len(self.packages),self.width)
+ self.file_pad.erase()
+
+ for i in range(len(self.packages)):
+ pkg = self.packages[i]
+ if i == self.usel:
+ cp = selected
+ # Maybe that the logf pointed by self.usel changed, (example
+ # when same files are removed) so reload the self.logf file
+ # pointer, this work is done here for convenience
+ try:
+ self.logf.close()
+ except AttributeError:
+ pass
+ self.logf = open(pkg[PATH])
+ else:
+ cp = normal
+
+ self.file_pad.addstr(i,1,
+ class_char,
+ curses.A_BOLD + curses.color_pair(pkg[CLASS]))
+ self.file_pad.addstr(i,3,
+ list_format % (pkg[CAT], pkg[PN], pkg[DATE].strftime(date_format) ),
+ curses.color_pair(cp))
+
+ def get_class(self,filepath):
+ """
+ Get the highest elog class in a file
+ """
+ f = file(filepath)
+
+ classes = re.findall("LOG:|INFO:|WARN:|ERROR:", f.read())
+ f.close()
+
+ if "ERROR:" in classes:
+ return eerror
+ elif "WARN:" in classes:
+ return ewarn
+ elif "LOG:" in classes:
+ return elog
+ else:
+ return einfo
+
+ def wrap_logf_lines(self):
+ """
+ Takes a file-like object and wraps long lines. Returns a list iterator.
+ """
+ result = []
+ self.logf.seek(0)
+ logf = self.logf.readlines()
+ for line in logf:
+ if not line.strip():
+ # textwrap eats newlines
+ result.append("\n")
+ else:
+ # Returns a list of new lines minus the line ending \n
+ wrapped_line = textwrap.wrap(line, width=self.width-2)
+ for l in wrapped_line:
+ l += "\n"
+ result.append(l)
+
+ return iter(result)
+
+ def show_log(self):
+ """
+ Display the selected file, if the length of the file is bigger than
+ the height of the window, interrupt the drawing and resume it when the
+ user press again the SpaceBar key
+ """
+ self.log_win.erase()
+ shown_all = False
+
+ for i in range(0,self.height//2-4):
+ try:
+ x = self.logf_wrap.next()
+ except StopIteration:
+ shown_all = True
+ # Restart the iterator
+ self.logf_wrap = self.wrap_logf_lines()
+ break
+
+ try:
+ if x.startswith('INFO:'):
+ self.log_win.addstr(x[:self.width-2],curses.color_pair(einfo))
+ elif x.startswith('WARN:'):
+ self.log_win.addstr(x[:self.width-2],curses.color_pair(ewarn))
+ elif x.startswith('ERROR:'):
+ self.log_win.addstr(x[:self.width-2],curses.color_pair(eerror))
+ elif x.startswith('LOG:'):
+ self.log_win.addstr(x[:self.width-2],curses.color_pair(elog))
+ else:
+ self.log_win.addstr(x[:self.width-2],curses.color_pair(normal))
+ except curses.error:
+ pass
+
+ if not shown_all:
+ s = _("Continue...")
+ self.log_win.addstr(self.height//2-3, self.width-len(s)-4, s,
+ curses.color_pair(normal))
+
+ self.log_win.refresh()
+
+ def remove_file(self,n):
+ """
+ Delete from the filesystem a slice of elog files
+ n can be:
+ "all" -> all files will be deleted
+ "end" -> files from selected one to the end of the list will be deleted
+ <int> -> will be deleted the selected file and the next <int>-1
+ """
+
+ if n == "all":
+ start = None
+ end = None
+ elif n == "end":
+ start = self.usel
+ end = None
+ elif n == "start":
+ start = None
+ end = self.usel
+ else:
+ start = self.usel
+ end = self.usel + int(n)
+
+ for item in self.packages[start:end]:
+ os.remove(os.path.join(elogdir,item[0]))
+
+ def show_help(self):
+ # Setup help window
+ helpwin_height = self.height / 3 * 2
+ helpwin_corner = (self.height / 6, self.width// 2 - 40)
+ helpwin = curses.newwin(helpwin_height, 80,
+ helpwin_corner[0], helpwin_corner[1])
+ helplines = helptext.splitlines()
+
+ # Setup help pad
+ row = 0
+ maxrow = len(helplines)
+ helppad = curses.newpad(maxrow,80)
+
+ # Insert helptext on the pad
+ for i in range(maxrow):
+ helppad.addstr(i,0,helplines[i])
+
+ # Loop to manage user actions
+ c = None
+ while c not in (ord("h"), curses.KEY_F1, ord("q")):
+ helpwin.erase()
+ helpwin.border()
+ helpwin.refresh()
+
+ helppad.refresh(row,0,helpwin_corner[0]+1,helpwin_corner[1]+1,
+ helpwin_height+helpwin_corner[0]-2,80+helpwin_corner[1]-2)
+
+ c = self.screen.getch()
+ if c == curses.KEY_NPAGE:
+ if row+10 <= maxrow:
+ row += 10
+ elif c == curses.KEY_PPAGE:
+ if row-10 >= 0:
+ row -= 10
+ elif c in (curses.KEY_DOWN, ord("j")):
+ if row+1 < maxrow:
+ row += 1
+ elif c in (curses.KEY_UP, ord("k")):
+ if row > 0:
+ row -= 1
+
+ def search(self, word, div=0):
+ for x in self.packages[self.usel+div:]:
+ if re.search(word, "%s/%s" % x[1:3]):
+ self.change_usel(self.packages.index(x),False)
+ break
+ else:
+ self.screen.addstr(self.height-2,2,_("Not Found!"),
+ curses.color_pair(eerror))
+
+if __name__ == "__main__":
+ if "--help" in sys.argv:
+ print helptext
+ sys.exit()
+
+ # Get the path of the elogdir
+ if port_settings['PORT_LOGDIR']:
+ elogdir = os.path.join(port_settings['PORT_LOGDIR'],"elog")
+ else:
+ elogdir = os.path.join(os.sep,port_settings['EPREFIX'],"var","log","portage","elog")
+
+ # Launch curses interface
+ try:
+ curses.wrapper(ElogViewer)
+ except TermTooSmall:
+ print _("Your terminal window is too small, try to enlarge it")
+ sys.exit(1)
+ except NoLogFiles:
+ print _("There aren't any elog files on"),elogdir
+ sys.exit(1)
+ except CannotOpenElogdir:
+ print _("Cannot open"),elogdir
+ print _("Please check if the directory exists and if it's readable by your user.")
+ sys.exit(1)
+ except KeyboardInterrupt:
+ pass
+# vim: set shiftwidth=4 tabstop=4 expandtab:
diff --git a/man/elogv.1 b/man/elogv.1
new file mode 100644
index 0000000..6ab4a3c
--- /dev/null
+++ b/man/elogv.1
@@ -0,0 +1,86 @@
+.TH ELOGV "1" "May 2008" "User Commands"
+.SH NAME
+elogv \- elog viewer
+.SH DESCRIPTION
+Elogv is a portage elog viewer based on curses and python.
+.SH USAGE
+You can use these keys to control the behavior of the program:
+.TP
+.B "Down arrow" or "j"
+Scroll the list of files down by 1 unit
+.TP
+.B "Up arrow" or "k"
+opposite of Down arrow
+.TP
+.B "PagDown"
+Scroll the list down by 10 unit
+.TP
+.B "PagUp"
+opposite of Pag Down
+.TP
+.B End
+Go to the last file of the list
+.TP
+.B Home
+Go to the first file of the list
+.TP
+.B t
+order the list of files by date, most recent on top
+.TP
+.B a
+order the list of files alphabetically, the first time by category, the second
+time (pressing the key again) by package name
+.TP
+.B c
+order the list of files by log class warning level
+.TP
+.B r
+reverse the list of files
+.TP
+.B SpaceBar
+scroll the selected file
+.TP
+.B h or F1
+show the help screen, press Page Up/Down to scroll up and down, h and F1 again to hide
+.TP
+.B d
+removes selected files, usage is similar to vim "d" command, here are same examples:
+.RS
+.TP
+.I da
+removes all files
+.TP
+.I de
+removes from selected item to the end of the list
+.TP
+.I ds
+remove from selected item to the start of the list
+.TP
+.I "d1d or dd"
+removes selected file only
+.TP
+.I d4d
+removes 4 files starting from selected one
+.RE
+.TP
+.B /
+starts a search prompt, write a string and will be showed the next package that contains your string, use ESC to exit
+.TP
+.B q
+quit
+.SH NOTES
+To use this software you need the portage elog system configured on your
+/etc/make.conf, this is a simply configuration:
+
+.nf
+# Logging
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+.TP
+For other details see /etc/make.conf.example
+.SH "REPORTING BUGS"
+Report your bugs to our sourceforge tracker:
+.P
+http://sourceforge.net/tracker/?group_id=176946
+.SH AUTHOR
+Luca Marturana (luca89) <lucamarturana@gmail.com>
diff --git a/man/elogv.1.de b/man/elogv.1.de
new file mode 100644
index 0000000..3b5f1ab
--- /dev/null
+++ b/man/elogv.1.de
@@ -0,0 +1,87 @@
+.TH ELOGV "1" "May 2008" "Benutzer-Kommandos"
+.SH NAME
+elogv \- elog-Betrachter
+.SH DESCRIPTION
+Elogv ist ein Betrachter fr Portage elog-Dateien. Er basiert auf Python
+und der Curses-Bibliothek.
+.SH USAGE
+Die Bedienung erfolgt mit folgenden Tasten:
+.TP
+.B "Pfeil runter oder j"
+in der Liste einen Eintrag nach unten rcken
+.TP
+.B "Pfeil hoch oder k"
+Gegenteil von Pfeil runter
+.TP
+.B BildAb
+in der Liste zehn Eintrge nach unten rcken
+.TP
+.B BildHoch
+Gegenteil von BildAb
+.TP
+.B Ende
+zum letzten Eintrag der Liste springen
+.TP
+.B Pos1
+zum erstem Eintrag der Liste springen
+.TP
+.B t
+Liste chronologisch sortieren, neustes oben
+.TP
+.B a
+Liste alphabetisch sortieren, nach dem ersten Bettigen nach
+Kategorie, nochmaliges Drcken nach Paketname
+.TP
+.B r
+Sortierreihenfolge umdrehen
+.TP
+.B Leertaste
+Eintrag der ausgewhlten Datei scrollen
+.TP
+.B h oder F1
+Hilfe anzeigen, BildHoch oder BildAb scrollen hoch und runter. Erneut h oder F1 schlieen die Hilfe.
+.TP
+.B d
+ausgewhlte Dateien entfernen, hnlich dem d-Kommando von Vim. Beispiele:
+.RS
+.TP
+.I da
+alle Dateien entfernen
+.TP
+.I de
+vom ausgewhlten Eintrag bis zum Ende der Liste
+.TP
+.I ds
+vom ausgewhlten Eintrag bis zum Anfang der Liste
+.TP
+.I "d1d oder dd"
+nur die ausgewhlten Dateien
+.TP
+.I d4d
+vier Eintrge ausgehend vom ausgewhlten Eintrag
+.RE
+.TP
+.B /
+eine Suchanfrage wird hiermit gestartet. Die eingetippte Zeichenfolge wird gesucht und der nchste passende Eintrag angezeigt.
+.TP
+.B q
+Schlieen
+.SH Hinweise
+Um diese Software nutzen zu knnen, mssen Sie das elog-System von
+Portage eingerichtet haben. Die Minimalkonfiguration in
+/etc/make.conf ist:
+
+.nf
+# Logging
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+.TP
+Details finden sich in /etc/make.conf.example
+.SH "REPORTING BUGS"
+Fehlerberichte (auf Englisch) bitte unter folgender URL melden:
+.P
+http://sourceforge.net/tracker/?group_id=176946
+.SH AUTHOR
+Luca Marturana (luca89) <lucamarturana@gmail.com>
+.SH BERSETZUNG
+Christian Faulhammer <opfer@gentoo.org>
diff --git a/man/elogv.1.es b/man/elogv.1.es
new file mode 100644
index 0000000..ab2060a
--- /dev/null
+++ b/man/elogv.1.es
@@ -0,0 +1,86 @@
+.TH ELOGV "1" "Mayo de 2008" "rdenes de usuario"
+.SH NAME
+elogv \- Visor de elog.
+.SH DESCRIPCIN
+Elogv es un visor de elog de Portage basado en Curses y Python.
+.SH USO
+Puede utilizar estas teclas para controlar el comportamiento del programa:
+.TP
+.B "Flecha abajo" o "j"
+Desplazar la lista de ficheros una unidad hacia abajo.
+.TP
+.B "Flecha arriba" o "k"
+Lo contrario de Flecha abajo.
+.TP
+.B "Av Pg"
+Desplazar la lista diez unidades hacia abajo.
+.TP
+.B "Re Pg"
+Lo contrario de Av Pg.
+.TP
+.B Fin
+Ir al ltimo fichero de la lista.
+.TP
+.B Inicio
+Ir al primer fichero de la lista.
+.TP
+.B t
+Ordenar la lista de ficheros por fecha, los ms recientes al principio.
+.TP
+.B a
+Ordenar la lista de ficheros alfabticamente, la primera vez por categora, la segunda vez (volviendo a presionar la tecla) por el nombre del paquete.
+.TP
+.B c
+Ordenar la lista de ficheros segn el nivel de advertencia.
+.TP
+.B r
+Invertir la lista de ficheros.
+.TP
+.B Barra espaciadora
+Desplazar el contenido del fichero seleccionado.
+.TP
+.B h o F1
+Mostrar la pantalla de ayuda: presione Re Pg/Av Pg para desplazar arriba y abajo. Pulse h o F1 de nuevo para ocultar la pantalla.
+.TP
+.B d
+Eliminar los ficheros seleccionados. Su uso es similar al del comando "d" en Vim, he aqu algunos ejemplos:
+.RS
+.TP
+.I da
+Eliminar todos los ficheros.
+.TP
+.I de
+Eliminar desde el tem seleccionado hasta el final de la lista.
+.TP
+.I ds
+Eliminar desde el tem seleccionado hasta el principio de la lista.
+.TP
+.I "d1d o dd"
+Eliminar nicamente el fichero seleccionado.
+.TP
+.I d4d
+Eliminar cuatro ficheros comenzando desde el que se halla seleccionado.
+.RE
+.TP
+.B /
+Iniciar una operacin de bsqueda. Escriba una cadena de texto y se mostrar el siguiente paquete que contiene esa cadena, use ESC para salir.
+.TP
+.B q
+Salir
+.SH NOTAS
+Para utilizar este software, usted necesita tener configurado el sistema de elog de Portage en su fichero /etc/make.conf. Esta es una configuracin sencilla:
+
+.nf
+# Logging
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+.TP
+Para otros detalles, vea el fichero /etc/make.conf.example
+.SH "INFORMANDO DE ERRORES"
+Informe de los errores en Sourceforge:
+.P
+http://sourceforge.net/tracker/?group_id=176946
+.SH AUTOR
+Luca Marturana (luca89) <lucamarturana@gmail.com>
+.SH TRADUCCIN
+Rafael Antonio Porras Samaniego <rafa@distrobit.net>
diff --git a/man/elogv.1.it b/man/elogv.1.it
new file mode 100644
index 0000000..c6027fe
--- /dev/null
+++ b/man/elogv.1.it
@@ -0,0 +1,89 @@
+.TH ELOGV "1" "May 2008" "User Commands"
+.SH NAME
+elogv \- elog viewer
+.SH DESCRIPTION
+Elogv è un visualizzatore degli elog di portage basato su curses e python
+.SH USAGE
+All'interno del programma possono essere utilizzati le seguenti combinazioni di tasti:
+.TP
+.B "Freccia giù" o "j"
+Scorre la lista dei file di una unità verso il basso"Down arrow" or "j"
+.TP
+.B "Up arrow" o "k"
+L'opposto
+.TP
+.B "PagDown"
+Scorre la lista dei file di 10 unità verso il basso
+.TP
+.B "PagUp"
+L'opposto
+.TP
+.B End
+Sposta il cursore verso l'ultimo elemento della lista
+.TP
+.B Home
+Sposta il cursore verso il primo elemento della lista
+.TP
+.B t
+Ordina la lista dei file rispetto alla data, dal più recente al più vecchio
+.TP
+.B a
+Ordina la lista dei file alfabeticamente, premendo la prima volta rispetto
+alla categoria, la seconda rispetto al nome del pacchetto
+.TP
+.B c
+Ordina la lista dei file rispetto al livello di attenzione
+.TP
+.B r
+Inverte l'ordine della lista dei file
+.TP
+.B SpaceBar
+Scorre il testo all'interno del file selezionato
+.TP
+.B h or F1
+Mostra la schermata di aiuto, premere Pag Su/Giù per scorrere, h o F1 di nuovo
+per chiudere
+.TP
+.B d
+Rimuove il file selezionati, l'utilizzo è simile al comando "d" di vim, ad
+esempio:
+.RS
+.TP
+.I da
+rimuove tutti i file
+.TP
+.I de
+rimuove tutti i file da quello selezionato alla fine della lista
+.TP
+.I ds
+rimuove tutti i file da quello selezionato al primo della lista
+.TP
+.I "d1d or dd"
+rimuove solo il file selezionato
+.TP
+.I d4d
+rimuove 4 file successivi partendo da quello selezionato
+.RE
+.TP
+.B /
+mostra il prompt di ricerca, scrivendo una stringa verrà spostato il cursore
+verso il file successivo che contiene la stringa, per uscire premere ESC
+.TP
+.B q
+Esce da elogv
+.SH NOTES
+Per usare questo software è necessario avere il sistema elog di portage
+configurato nel proprio /etc/make.conf, ecco un esempio:
+
+.nf
+# Logging
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+.TP
+Per altre informazioni dare un'occhiata a /etc/make.conf.example
+.SH "REPORTING BUGS"
+Segnalare eventuali malfunzionamenti sul tracker di sourceforge:
+.P
+http://sourceforge.net/tracker/?group_id=176946
+.SH AUTHOR
+Luca Marturana (luca89) <lucamarturana@gmail.com>
diff --git a/man/elogv.1.pl b/man/elogv.1.pl
new file mode 100644
index 0000000..4d2cd7e
--- /dev/null
+++ b/man/elogv.1.pl
@@ -0,0 +1,87 @@
+.TH ELOGV "1" "May 2008" "Polecenia użytkownika"
+.SH NAZWA
+elogv \- przeglądarka plików elog
+.SH OPIS
+Elogv jest przeglądarką plików elog opartą na curses i pythonie.
+.SH UŻYCIE
+Możesz sterować programem przy pomocy tych klawiszy:
+.TP
+.B "Strzałka w dół" lub "j"
+przewijanie listy plików w dół o 1 pozycję
+.TP
+.B "Strzałka w górę" or "k"
+przeciwieństwo strzałki w dół
+.TP
+.B "PageDown"
+przewijanie listy w dół o 10 pozycji
+.TP
+.B "PageUp"
+przeciwieństwo PageDown
+.TP
+.B End
+skok do ostatniego pliku na liście
+.TP
+.B Home
+skok do pierwszego pliku na liście
+.TP
+.B t
+uporządkowanie listy plików według dat, najnowszy na górze
+.TP
+.B a
+uporządkowanie listy plików alfabetycznie, najpierw według kategorii, potem (po ponownym wciśnięciu klawisza) według nazwy pakietu
+.TP
+.B c
+uporządkowanie listy plików według typu wiadomości
+.TP
+.B r
+odwrócenie listy plików
+.TP
+.B SpaceBar
+przewijanie wybranego pliku
+.TP
+.B h or F1
+wyświetlenie pomocy, wciśnij PageUp/PageDown, aby ją przewijać, h lub F1, aby ukryć
+.TP
+.B d
+usuwa wybrane pliki, użycie jest podobne do komendy vima "d", przykłady:
+.RS
+.TP
+.I da
+usuwa wszystkie pliki
+.TP
+.I de
+usuwa od wybranego pliku do końca listy
+.TP
+.I ds
+usuwa od wybranego pliku do początku listy
+.TP
+.I "d1d" lub "dd"
+usuwa tylko wybrany plik
+.TP
+.I d4d
+usuwa 4 pliki począwszy od wybranego
+.RE
+.TP
+.B /
+włącza tryb wyszukiwania, wpisz ciąg znaków, a zostanie wybrany następny pakiet, który go zawiera, wciśnij ESC, aby zakończyć
+.TP
+.B q
+wyjście
+.SH UWAGI
+Aby używać tego programu, musisz skonfigurować system elog w /etc/make.conf, oto przykładowa konfiguracja:
+
+.nf
+# Logowanie
+PORTAGE_ELOG_CLASSES="warn error log"
+PORTAGE_ELOG_SYSTEM="save"
+.TP
+Więcej informacji znajduje się w /etc/make.conf.example
+.SH "ZGŁASZANIE BŁĘDÓW"
+Błędy proszę zgłaszać w języku angielskim do naszego serwisu raportowania błędów:
+
+.P
+http://sourceforge.net/tracker/?group_id=176946
+.SH AUTOR
+Luca Marturana (luca89) <lucamarturana@gmail.com>
+.SH TŁUMACZENIE
+Michał Kiedrowicz <esqualante@o2.pl>
diff --git a/po/de.po b/po/de.po
new file mode 100644
index 0000000..0ffc744
--- /dev/null
+++ b/po/de.po
@@ -0,0 +1,127 @@
+# German translations for elogv package.
+#
+# Author: Luca Marturana (luca89) <lucamarturana@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# This file is distributed under the same license as the elogv package.
+#
+# Automatically generated, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-05-19 12:47+CEST\n"
+"PO-Revision-Date: 2008-05-11 21:53+0200\n"
+"Last-Translator: Christian Faulhammer <opfer@gentoo.org>\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#: ../elogv:43
+msgid ""
+"\n"
+"Elogv is a portage elog viewer based on curses and python,\n"
+"you can use these keys to control the behavior of the program:\n"
+"\n"
+" - Down arrow or j -> scroll the list of files down by 1 unit\n"
+" - Up arrow or k -> opposite of Down arrow\n"
+" - PageDown -> scroll the list down by 10 unit\n"
+" - PageUp -> opposite of PageDown\n"
+" - End -> go to the last file of the list\n"
+" - Home -> go to the first file of the list\n"
+" - t -> order the list of files by date, most recent on top\n"
+" - a -> order the list of files alphabetically, the first time by category,\n"
+" the second time (pressing the key again) by package name\n"
+" - c -> order the list of files by log class warning level\n"
+" - r -> reverse the list of files\n"
+" - SpaceBar -> scroll the selected file\n"
+" - h or F1 -> show the help screen, press Page Up/Down to scroll up and "
+"down,\n"
+" h or F1 again to hide\n"
+" - d -> removes selected files, usage is similar to vim \"d\" command,\n"
+" here are same examples:\n"
+" da -> removes all files\n"
+" de -> removes from selected item to the end of the list\n"
+" ds -> remove from selected item to the start of the list\n"
+" d1d or dd -> removes selected file only\n"
+" d4d -> removes 4 files starting from selected one\n"
+" - / -> starts a search prompt, write a string and will be showed the next\n"
+" package that contains your string, use ESC to exit\n"
+" - q -> quit\n"
+msgstr ""
+"\n"
+"Elogv ist ein Betrachter für Portage elog-Dateien. Er basiert auf Python\n"
+"und der Curses-Bibliothek. Die Bedienung erfolgt mit folgenden\n"
+"Tasten:\n"
+"\n"
+" - Pfeil runter oder j -> in der Liste einen Eintrag nach unten rücken\n"
+" - Pfeil hoch oder k -> Gegenteil von Pfeil runter\n"
+" - BildAb -> in der Liste zehn Einträge nach unten rücken\n"
+" - BildHoch -> Gegenteil von BildAb\n"
+" - Ende -> zum letzten Eintrag der Liste springen\n"
+" - Pos1 -> zum ersten Eintrag der Liste springen\n"
+" - t -> Liste chronologisch sortieren, neustes oben\n"
+" - a -> Liste alphabetisch sortieren, nach dem ersten Betätigen nach\n"
+" Kategorie, nochmaliges Drücken nach Paketname\n"
+" - r -> Sortierreihenfolge umdrehen\n"
+" - Leertaste -> Eintrag der ausgewählten Datei scrollen\n"
+" - h oder F1 -> Hilfe anzeigen, BildHoch oder BildAb scrollen hoch\n"
+" und runter. Erneut h oder F1 schließt die Hilfe.\n"
+" - d -> ausgewählte Dateien entfernen, ähnlich dem d-Kommando von Vim.\n"
+" Beispiele:\n"
+" da -> alle Dateien entfernen\n"
+" de -> vom ausgewählten Eintrag bis zum Ende der Liste\n"
+" ds -> vom ausgewählten Eintrag bis zum Anfang der Liste\n"
+" d1d oder dd -> nur die ausgewählten Dateien\n"
+" d4d -> vier Einträge ausgehend vom ausgewählten Eintrag\n"
+" - / -> eine Suchanfrage wird hiermit gestartet. Die eingetippte\n"
+" Zeichenfolge wird gesucht und der nächste passende Eintrag\n"
+" angezeigt.\n"
+" - q -> Schließen\n"
+
+#: ../elogv:243
+msgid " Press F1 or h to show the help screen "
+msgstr " F1 oder h für Hilfe"
+
+#: ../elogv:426
+msgid "Continue..."
+msgstr "Fortsetzen..."
+
+#: ../elogv:503
+msgid "Not Found!"
+msgstr "Nicht gefunden!"
+
+#: ../elogv:521
+msgid "Your terminal window is too small, try to enlarge it"
+msgstr "Ihr Terminalfenster ist zu klein, bitte versuchen Sie es zu vergrößern"
+
+#: ../elogv:524
+msgid "There aren't any elog files on"
+msgstr "Keine elog-Dateien gefunden"
+
+#: ../elogv:527
+msgid "Cannot open"
+msgstr "Kann nicht geöffnet werden: "
+
+#: ../elogv:528
+msgid "Please check if the directory exists and if it's readable by your user."
+msgstr ""
+"Bitte überprüfen Sie, ob das Verzeichnis existiert und ob Sie Leserechte "
+"besitzen."
diff --git a/po/elogv.pot b/po/elogv.pot
new file mode 100644
index 0000000..a381ce3
--- /dev/null
+++ b/po/elogv.pot
@@ -0,0 +1,77 @@
+# SOME DESCRIPTIVE TITLE.
+# Copyright (C) YEAR ORGANIZATION
+# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"POT-Creation-Date: 2008-05-19 12:47+CEST\n"
+"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
+"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=CHARSET\n"
+"Content-Transfer-Encoding: ENCODING\n"
+"Generated-By: pygettext.py 1.5\n"
+
+
+#: ../elogv:43
+msgid ""
+"\n"
+"Elogv is a portage elog viewer based on curses and python,\n"
+"you can use these keys to control the behavior of the program:\n"
+"\n"
+" - Down arrow or j -> scroll the list of files down by 1 unit\n"
+" - Up arrow or k -> opposite of Down arrow\n"
+" - PageDown -> scroll the list down by 10 unit\n"
+" - PageUp -> opposite of PageDown\n"
+" - End -> go to the last file of the list\n"
+" - Home -> go to the first file of the list\n"
+" - t -> order the list of files by date, most recent on top\n"
+" - a -> order the list of files alphabetically, the first time by category,\n"
+" the second time (pressing the key again) by package name\n"
+" - c -> order the list of files by log class warning level\n"
+" - r -> reverse the list of files\n"
+" - SpaceBar -> scroll the selected file\n"
+" - h or F1 -> show the help screen, press Page Up/Down to scroll up and down,\n"
+" h or F1 again to hide\n"
+" - d -> removes selected files, usage is similar to vim \"d\" command,\n"
+" here are same examples:\n"
+" da -> removes all files\n"
+" de -> removes from selected item to the end of the list\n"
+" ds -> remove from selected item to the start of the list\n"
+" d1d or dd -> removes selected file only\n"
+" d4d -> removes 4 files starting from selected one\n"
+" - / -> starts a search prompt, write a string and will be showed the next\n"
+" package that contains your string, use ESC to exit\n"
+" - q -> quit\n"
+msgstr ""
+
+#: ../elogv:243
+msgid " Press F1 or h to show the help screen "
+msgstr ""
+
+#: ../elogv:426
+msgid "Continue..."
+msgstr ""
+
+#: ../elogv:503
+msgid "Not Found!"
+msgstr ""
+
+#: ../elogv:521
+msgid "Your terminal window is too small, try to enlarge it"
+msgstr ""
+
+#: ../elogv:524
+msgid "There aren't any elog files on"
+msgstr ""
+
+#: ../elogv:527
+msgid "Cannot open"
+msgstr ""
+
+#: ../elogv:528
+msgid "Please check if the directory exists and if it's readable by your user."
+msgstr ""
+
diff --git a/po/es.po b/po/es.po
new file mode 100644
index 0000000..f642952
--- /dev/null
+++ b/po/es.po
@@ -0,0 +1,105 @@
+msgid ""
+msgstr ""
+"Project-Id-Version: elogv\n"
+"POT-Creation-Date: 2008-05-19 12:47+CEST\n"
+"PO-Revision-Date: \n"
+"Last-Translator: Rafael Antonio Porras Samaniego <rafa@distrobit.net>\n"
+"Language-Team: \n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../elogv:43
+msgid ""
+"\n"
+"Elogv is a portage elog viewer based on curses and python,\n"
+"you can use these keys to control the behavior of the program:\n"
+"\n"
+" - Down arrow or j -> scroll the list of files down by 1 unit\n"
+" - Up arrow or k -> opposite of Down arrow\n"
+" - PageDown -> scroll the list down by 10 unit\n"
+" - PageUp -> opposite of PageDown\n"
+" - End -> go to the last file of the list\n"
+" - Home -> go to the first file of the list\n"
+" - t -> order the list of files by date, most recent on top\n"
+" - a -> order the list of files alphabetically, the first time by category,\n"
+" the second time (pressing the key again) by package name\n"
+" - c -> order the list of files by log class warning level\n"
+" - r -> reverse the list of files\n"
+" - SpaceBar -> scroll the selected file\n"
+" - h or F1 -> show the help screen, press Page Up/Down to scroll up and down,\n"
+" h or F1 again to hide\n"
+" - d -> removes selected files, usage is similar to vim \"d\" command,\n"
+" here are same examples:\n"
+" da -> removes all files\n"
+" de -> removes from selected item to the end of the list\n"
+" ds -> remove from selected item to the start of the list\n"
+" d1d or dd -> removes selected file only\n"
+" d4d -> removes 4 files starting from selected one\n"
+" - / -> starts a search prompt, write a string and will be showed the next\n"
+" package that contains your string, use ESC to exit\n"
+" - q -> quit\n"
+msgstr ""
+"\n"
+"Elogv es un visor de elog de Portage basado en Curses y Python,\n"
+"puede utilizar estas teclas para controlar el comportamiento del programa:\n"
+"\n"
+" - Flecha abajo o j -> desplazar la lista de ficheros una unidad hacia abajo.\n"
+" - Flecha arriba o k -> lo contrario de Flecha abajo.\n"
+" - Av Pág -> desplazar la lista diez unidades hacia abajo.\n"
+" - Re Pág -> lo contrario de Av Pág.\n"
+" - Fin -> ir al último fichero de la lista.\n"
+" - Inicio -> ir al primer fichero de la lista.\n"
+" - t -> ordenar la lista de ficheros por fecha, los más recientes al principio.\n"
+" - a -> ordenar la lista de ficheros alfabéticamente, la primera vez por\n"
+" categoría, la segunda vez (volviendo a presionar la tecla) por el\n"
+" nombre del paquete.\n"
+" - c -> ordenar la lista de ficheros según el nivel de advertencia.\n"
+" - r -> invertir la lista de ficheros.\n"
+" - Barra espaciadora -> desplazar el contenido del fichero seleccionado.\n"
+" - h o F1 -> mostrar la pantalla de ayuda: presione Re Pág/Av Pág para\n"
+" desplazar arriba y abajo. Pulse h o F1 de nuevo para ocultar\n"
+" la pantalla.\n"
+" - d -> eliminar los ficheros seleccionados. Su uso es similar al del comando\n"
+" \"d\" en Vim, he aquí algunos ejemplos:\n"
+" da -> eliminar todos los ficheros.\n"
+" de -> eliminar desde el ítem seleccionado hasta el final de\n"
+" la lista.\n"
+" ds -> eliminar desde el ítem seleccionado hasta el principio de\n"
+" la lista.\n"
+" d1d o dd -> eliminar únicamente el fichero seleccionado.\n"
+" d4d -> eliminar cuatro ficheros comenzando desde el que se halla\n"
+" seleccionado.\n"
+" - / -> iniciar una operación de búsqueda. Escriba una cadena de texto y se\n"
+" mostrará el siguiente paquete que contiene esa cadena, use ESC para\n"
+" salir.\n"
+" - q -> salir.\n"
+
+#: ../elogv:243
+msgid " Press F1 or h to show the help screen "
+msgstr "Presione F1 o h para mostrar la pantalla de ayuda."
+
+#: ../elogv:426
+msgid "Continue..."
+msgstr "Continua..."
+
+#: ../elogv:503
+msgid "Not Found!"
+msgstr "¡No encontrado!"
+
+#: ../elogv:521
+msgid "Your terminal window is too small, try to enlarge it"
+msgstr "Su ventana de terminal es demasiado pequeña, intente agrandarla."
+
+#: ../elogv:524
+msgid "There aren't any elog files on"
+msgstr "No hay ningún fichero elog en"
+
+#: ../elogv:527
+msgid "Cannot open"
+msgstr "Imposible abrir"
+
+#: ../elogv:528
+msgid "Please check if the directory exists and if it's readable by your user."
+msgstr "Por favor, compruebe si el directorio existe y si es legible por su usuario."
+
diff --git a/po/it.po b/po/it.po
new file mode 100644
index 0000000..45128b6
--- /dev/null
+++ b/po/it.po
@@ -0,0 +1,126 @@
+# Author: Luca Marturana (luca89) <lucamarturana@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# This file is distributed under the same license as the elogv package.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: elogv\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-05-19 12:47+CEST\n"
+"PO-Revision-Date: 2008-05-11 20:19+0100\n"
+"Last-Translator: Luca Marturana <lucamarturana@gmail.com>\n"
+"Language-Team: LANGUAGE <LL@li.org>\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+
+#: ../elogv:43
+msgid ""
+"\n"
+"Elogv is a portage elog viewer based on curses and python,\n"
+"you can use these keys to control the behavior of the program:\n"
+"\n"
+" - Down arrow or j -> scroll the list of files down by 1 unit\n"
+" - Up arrow or k -> opposite of Down arrow\n"
+" - PageDown -> scroll the list down by 10 unit\n"
+" - PageUp -> opposite of PageDown\n"
+" - End -> go to the last file of the list\n"
+" - Home -> go to the first file of the list\n"
+" - t -> order the list of files by date, most recent on top\n"
+" - a -> order the list of files alphabetically, the first time by category,\n"
+" the second time (pressing the key again) by package name\n"
+" - c -> order the list of files by log class warning level\n"
+" - r -> reverse the list of files\n"
+" - SpaceBar -> scroll the selected file\n"
+" - h or F1 -> show the help screen, press Page Up/Down to scroll up and "
+"down,\n"
+" h or F1 again to hide\n"
+" - d -> removes selected files, usage is similar to vim \"d\" command,\n"
+" here are same examples:\n"
+" da -> removes all files\n"
+" de -> removes from selected item to the end of the list\n"
+" ds -> remove from selected item to the start of the list\n"
+" d1d or dd -> removes selected file only\n"
+" d4d -> removes 4 files starting from selected one\n"
+" - / -> starts a search prompt, write a string and will be showed the next\n"
+" package that contains your string, use ESC to exit\n"
+" - q -> quit\n"
+msgstr ""
+"\n"
+"Elogv è un visualizzatore degli elog di portage basato su curses e python, \n"
+"per controllare si possono usare questi tasti:\n"
+"\n"
+"- Freccia giù o j -> Scorre la lista dei file di una unità verso il basso\n"
+"- Freccia su o k -> L'opposto\n"
+"- Pag giù -> Scorre la lista dei file di 10 unità verso il basso\n"
+"- Pag su -> L'opposto\n"
+"- Fine -> Sposta il cursore verso l'ultimo elemento della lista\n"
+"- Home -> Sposta il cursore verso il primo elemento della lista\n"
+"- t -> Ordina la lista dei file rispetto alla data, dal più recente al più\n"
+" vecchio\n"
+"- a -> Ordina la lista dei file alfabeticamente, premendo la prima volta\n"
+" rispetto alla categoria, la seconda rispetto al nome del pacchetto\n"
+"- c -> Ordina la lista dei file rispetto al livello di attenzione\n"
+"- r -> Inverte l'ordine della lista dei file\n"
+"- SpaceBar -> Scorre il testo all'interno del file selezionato\n"
+"- h o F1 -> Mostra la schermata di aiuto, premere Pag Su/Giù per scorrere,\n"
+" h o F1 di nuovo per chiudere\n"
+"- d -> Rimuove il file selezionati, l'utilizzo è simile al comando \"d\" di\n"
+" vim, ad esempio:\n"
+" da -> rimuove tutti i file\n"
+" de -> rimuove tutti i file da quello selezionato alla fine "
+"della\n"
+" lista\n"
+" ds -> rimuove tutti i file da quello selezionato al primo "
+"della\n"
+" lista\n"
+" d1d o dd -> rimuove solo il file selezionato\n"
+" d4d -> rimuove 4 file successivi partendo da quello "
+"selezionato\n"
+"- / -> mostra il prompt di ricerca, scrivendo una stringa verrà spostato\n"
+" il cursore verso il file successivo che contiene la stringa, per "
+"uscire\n"
+" premere ESC\n"
+"- q -> Esce da elogv\n"
+
+#: ../elogv:243
+msgid " Press F1 or h to show the help screen "
+msgstr " Premi F1 o h per mostrare la schermata di aiuto "
+
+#: ../elogv:426
+msgid "Continue..."
+msgstr "Continua..."
+
+#: ../elogv:503
+msgid "Not Found!"
+msgstr "Non trovato!"
+
+#: ../elogv:521
+msgid "Your terminal window is too small, try to enlarge it"
+msgstr "La tua finestra del terminale è troppo piccola, prova ad allargarla"
+
+#: ../elogv:524
+msgid "There aren't any elog files on"
+msgstr "Non c'è alcun file di elog in"
+
+#: ../elogv:527
+msgid "Cannot open"
+msgstr "Impossibile aprire"
+
+#: ../elogv:528
+msgid "Please check if the directory exists and if it's readable by your user."
+msgstr "Controlla se la directory esiste e se è leggibile dal tuo utente"
diff --git a/po/pl.po b/po/pl.po
new file mode 100644
index 0000000..b85d5dc
--- /dev/null
+++ b/po/pl.po
@@ -0,0 +1,127 @@
+# Polish translations for elogv package.
+#
+# Author: Luca Marturana (luca89) <lucamarturana@gmail.com>
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
+#
+# This file is distributed under the same license as the elogv package.
+#
+# Automatically generated, 2008.
+#
+msgid ""
+msgstr ""
+"Project-Id-Version: PACKAGE VERSION\n"
+"Report-Msgid-Bugs-To: \n"
+"POT-Creation-Date: 2008-05-19 12:47+CEST\n"
+"PO-Revision-Date: 2008-05-11 23:50+0100\n"
+"Last-Translator: Michał Kiedrowicz <esqualante@o2.pl>\n"
+"Language-Team: none\n"
+"MIME-Version: 1.0\n"
+"Content-Type: text/plain; charset=UTF-8\n"
+"Content-Transfer-Encoding: 8bit\n"
+"Plural-Forms: nplurals=3; plural=(n==1 ? 0 : n%10>=2 && n%10<=4 && (n%100<10 "
+"|| n%100>=20) ? 1 : 2);\n"
+
+#: ../elogv:43
+msgid ""
+"\n"
+"Elogv is a portage elog viewer based on curses and python,\n"
+"you can use these keys to control the behavior of the program:\n"
+"\n"
+" - Down arrow or j -> scroll the list of files down by 1 unit\n"
+" - Up arrow or k -> opposite of Down arrow\n"
+" - PageDown -> scroll the list down by 10 unit\n"
+" - PageUp -> opposite of PageDown\n"
+" - End -> go to the last file of the list\n"
+" - Home -> go to the first file of the list\n"
+" - t -> order the list of files by date, most recent on top\n"
+" - a -> order the list of files alphabetically, the first time by category,\n"
+" the second time (pressing the key again) by package name\n"
+" - c -> order the list of files by log class warning level\n"
+" - r -> reverse the list of files\n"
+" - SpaceBar -> scroll the selected file\n"
+" - h or F1 -> show the help screen, press Page Up/Down to scroll up and "
+"down,\n"
+" h or F1 again to hide\n"
+" - d -> removes selected files, usage is similar to vim \"d\" command,\n"
+" here are same examples:\n"
+" da -> removes all files\n"
+" de -> removes from selected item to the end of the list\n"
+" ds -> remove from selected item to the start of the list\n"
+" d1d or dd -> removes selected file only\n"
+" d4d -> removes 4 files starting from selected one\n"
+" - / -> starts a search prompt, write a string and will be showed the next\n"
+" package that contains your string, use ESC to exit\n"
+" - q -> quit\n"
+msgstr ""
+"\n"
+"Elogv jest przeglądarką plików elog opartą na curses i pythonie,\n"
+"możesz używać tych klawiszy do sterowania programem:\n"
+"\n"
+" - Strzałka w dół lub j -> przewijanie listy plików w dół o 1 pozycję\n"
+" - Strzałka w górę lub k -> przeciwieństwo strzałki w dół\n"
+" - PageDown -> przewijanie listy w dół o 10 pozycji\n"
+" - PageUp -> przeciwieństwo PageDown\n"
+" - End -> skok do ostatniego pliku na liście\n"
+" - Home -> skok do pierwszego pliku na liście\n"
+" - t -> uporządkowanie listy plików według dat, najnowszy na górze\n"
+" - a -> uporządkowanie listy plików alfabetycznie, według kategorii,\n"
+" później (po ponownym wciśnięciu klawisza) według nazwy pakietu\n"
+" - c -> uporządkowanie listy plików według typu wiadomości\n"
+" - r -> odwrócenie listy plików\n"
+" - SpaceBar -> przewijanie wybranego pliku\n"
+" - h lub F1 -> wyświetlenie pomocy, wciśnij PageUp/PageDown, aby ją "
+"przewijać,\n"
+" h lub F1, aby ukryć\n"
+" - d -> usuwa wybrane pliki, użycie jest podobne do komendy vima \"d\",\n"
+" przykłady:\n"
+" da -> usuwa wszystkie pliki\n"
+" de -> usuwa od wybranego pliku do końca listy\n"
+" ds -> usuwa od wybranego pliku do początku listy\n"
+" d1d lub dd -> usuwa tylko wybrany plik\n"
+" d4d -> usuwa 4 pliki, począwszy od wybranego\n"
+" - / -> włącza tryb wyszukiwania, wpisz ciąg znaków, a zostanie wybrany\n"
+" następny pakiet, który go zawiera, wciśnij ESC, aby zakończyć\n"
+" - q -> wyjście\n"
+
+#: ../elogv:243
+msgid " Press F1 or h to show the help screen "
+msgstr " Wciśnij F1 lub h, aby wyświetlić pomoc "
+
+#: ../elogv:426
+msgid "Continue..."
+msgstr "Dalej..."
+
+#: ../elogv:503
+msgid "Not Found!"
+msgstr "Nie znaleziono!"
+
+#: ../elogv:521
+msgid "Your terminal window is too small, try to enlarge it"
+msgstr "Rozmiar konsoli jest zbyt mały, spróbuj ją powiększyć"
+
+#: ../elogv:524
+msgid "There aren't any elog files on"
+msgstr "Nie ma żadnych plików elog w"
+
+#: ../elogv:527
+msgid "Cannot open"
+msgstr "Nie można otworzyć"
+
+#: ../elogv:528
+msgid "Please check if the directory exists and if it's readable by your user."
+msgstr ""
+"Sprawdź, czy katalog istnieje i czy twój użytkownik jest uprawniony do "
+"odczytu z tego katalogu."
diff --git a/setup.py b/setup.py
new file mode 100644
index 0000000..4a9fc5c
--- /dev/null
+++ b/setup.py
@@ -0,0 +1,264 @@
+from distutils.core import setup
+from distutils import log
+from distutils.cmd import Command
+from distutils.file_util import copy_file
+from distutils.dir_util import remove_tree
+from distutils.command.build import build as _build
+from distutils.command.install import install as _install
+from distutils.command.clean import clean as _clean
+
+
+import os
+import sys
+import shutil
+from glob import glob
+
+## Snippet of code found on
+## http://developer.berlios.de/snippet/detail.php?type=snippet&id=100019
+## Useful to handle *.po files under distutils
+
+class messages(Command):
+
+ description = 'Extract messages from source files'
+
+ user_options = [('merge', 'm', 'Merge message catalogs after '
+ 'extracting template')]
+
+ boolean_options = ['merge']
+
+ def initialize_options(self):
+ self.merge = False
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ wd = os.getcwd()
+ name = self.distribution.get_name()
+ log.info('Extracting messages from %s' % name)
+ os.chdir('po')
+ os.system('pygettext -k i18n -o %s.pot ../%s' % (name, name))
+ os.chdir(wd)
+ if self.merge:
+ self.run_command('merge')
+
+class merge(Command):
+ description = 'Merge message catalogs with template'
+
+ user_options = [('lang=', 'l', 'Only merge specified language')]
+
+ def initialize_options(self):
+ self.lang = None
+
+ def finalize_options(self):
+ pass
+
+ def run(self):
+ wd = os.getcwd()
+ os.chdir('po')
+ if self.lang is not None:
+ filename = '%s.po' % self.lang
+ if os.path.exists(filename):
+ self.merge(filename)
+ else:
+ print log.error('No catalog found for language %s' % self.lang)
+ else:
+ files = glob('*.po')
+ for f in files:
+ self.merge(f)
+ os.chdir(wd)
+
+ def merge(self, f):
+ name = self.distribution.get_name()
+ log.info('Merging catalog %s' % f)
+ os.system('msgmerge %s %s.pot -o %s' % (f, name, f))
+
+
+class build_messages(Command):
+
+ description = 'Compile message catalogs'
+ user_options = [('build-dir=', 'd', 'directory to build message catalogs in')]
+
+ def initialize_options(self):
+ self.build_dir = None
+
+ def finalize_options(self):
+ self.set_undefined_options('build',
+ ('build_messages', 'build_dir'))
+
+ def run(self):
+ self.mkpath(self.build_dir)
+ po_files = os.path.join('po', '*.po')
+ po_files = glob(po_files)
+ for f in po_files:
+ base = os.path.basename(f)
+ base = os.path.splitext(base)[0]
+ out_file = os.path.join(self.build_dir, '%s.gmo' % base)
+ log.info('Building catalog %s > %s' % (f, out_file))
+ cmd = 'msgfmt -o "%s" %s' % (out_file, f)
+ os.system(cmd)
+
+class build(_build):
+ # integrate build_message
+ def has_messages(self):
+ return True
+
+ def initialize_options(self):
+ _build.initialize_options(self)
+ self.build_messages = None
+
+ def finalize_options(self):
+ _build.finalize_options(self)
+ if self.build_messages is None:
+ self.build_messages = os.path.join(self.build_base,
+ 'po')
+
+ _build.user_options.append(('build-messages=', None,
+ "build directory for messages"))
+ _build.sub_commands.append(('build_messages', has_messages))
+
+class install_messages(Command):
+
+ description = 'Installs message catalogs'
+
+ user_options = [
+ ('install-dir=', 'd', "directory to install scripts to"),
+ ('build-dir=','b', "build directory (where to install from)"),
+ ('skip-build', None, "skip the build steps"),
+ ]
+
+ boolean_options = ['skip-build']
+
+ def initialize_options(self):
+ self.install_dir = None
+ self.build_dir = None
+ self.skip_build = None
+
+ def finalize_options(self):
+ self.set_undefined_options('build', ('build_messages', 'build_dir'))
+ self.set_undefined_options('install',
+ ('install_data', 'install_dir'),
+ ('force', 'force'),
+ ('skip_build', 'skip_build'),
+ )
+ self.install_dir = os.path.join(self.install_dir, 'share', 'locale')
+
+ def run(self):
+ if not self.skip_build:
+ self.run_command('build_messages')
+ catalogs = glob(os.path.join(self.build_dir, '*.gmo'))
+ for c in catalogs:
+ base = os.path.basename(c)
+ base = os.path.splitext(base)[0]
+ out_dir = os.path.join(self.install_dir, base, 'LC_MESSAGES')
+ self.mkpath(out_dir)
+ out_file = os.path.join(out_dir, '%s.mo' % self.distribution.get_name())
+ copy_file(c, out_file)
+
+class clean(_clean):
+ _clean.user_options.append(('build-messages=', None,
+ "build directory for messages (default: 'build.build-messages')"))
+
+ def initialize_options(self):
+ _clean.initialize_options(self)
+ self.build_messages = None
+
+ def finalize_options(self):
+ self.set_undefined_options('build',
+ ('build_base', 'build_base'),
+ ('build_lib', 'build_lib'),
+ ('build_scripts', 'build_scripts'),
+ ('build_temp', 'build_temp'),
+ ('build_messages', 'build_messages'))
+ self.set_undefined_options('bdist',
+ ('bdist_base', 'bdist_base'))
+ def run(self):
+ # remove the build/temp.<plat> directory (unless it's already
+ # gone)
+ if os.path.exists(self.build_temp):
+ remove_tree(self.build_temp, dry_run=self.dry_run)
+ else:
+ log.debug("'%s' does not exist -- can't clean it",
+ self.build_temp)
+
+ if self.all:
+ # remove build directories
+ for directory in (self.build_lib,
+ self.bdist_base,
+ self.build_scripts,
+ self.build_messages):
+ if os.path.exists(directory):
+ remove_tree(directory, dry_run=self.dry_run)
+ else:
+ log.warn("'%s' does not exist -- can't clean it",
+ directory)
+
+ # just for the heck of it, try to remove the base build directory:
+ # we might have emptied it right now, but if not we don't care
+ if not self.dry_run:
+ try:
+ os.rmdir(self.build_base)
+ log.info("removing '%s'", self.build_base)
+ except OSError:
+ pass
+
+## Class modified to add manpages command
+class install(_install):
+ def has_messages(self):
+ return True
+
+ def has_manpages(self):
+ return True
+
+ _install.sub_commands.append(('install_messages', has_messages))
+ _install.sub_commands.append(('install_manpages', has_manpages))
+
+### End of snippet ###
+
+class install_manpages(Command):
+
+ description = "Install man pages"
+
+ user_options = []
+
+ def initialize_options(self):
+ self.man_pages = man_pages
+ self.install_dir = None
+ self.root = None
+
+ def finalize_options(self):
+ self.set_undefined_options('install',
+ ('install_data', 'install_dir'),
+ ('root', 'root'),
+ )
+ def run(self):
+ for f in self.man_pages:
+ attrs = f.split(".")
+ dest = os.path.join(self.install_dir,"share","man")
+ try:
+ dest = os.path.join(dest,attrs[2])
+ except IndexError:
+ pass
+ dest = os.path.join(dest,"man" + attrs[1])
+ self.mkpath(dest)
+ self.copy_file(f, dest)
+
+man_pages=glob("man/*")
+
+setup(name="elogv",
+ version="0.7.5",
+ author="Luca Marturana",
+ author_email="lucamarturana@gmail.com",
+ license="GPL-2",
+ description="Curses based utility to view elogs created by Portage",
+ url="http://gechi-overlay.sourceforge.net/?page=elogv",
+ scripts=['elogv'],
+ cmdclass={'extract_messages': messages,
+ 'merge': merge,
+ 'build_messages': build_messages,
+ 'build': build,
+ 'install_messages': install_messages,
+ 'install_manpages': install_manpages,
+ 'install': install,
+ 'clean': clean}
+)