]> git.itanic.dy.fi Git - emerge-timer/log
emerge-timer
12 years agoDon't print anything if a package hasn't been emerged
Esko Kokkonen [Wed, 24 Aug 2011 09:03:44 +0000 (12:03 +0300)]
Don't print anything if a package hasn't been emerged

12 years agoUse \t to line up the times in the printout
Esko Kokkonen [Sun, 21 Aug 2011 14:23:03 +0000 (17:23 +0300)]
Use \t to line up the times in the printout

12 years agoRemove the time writing function
Esko Kokkonen [Sat, 20 Aug 2011 11:45:10 +0000 (14:45 +0300)]
Remove the time writing function

Don't write the emerge times into a file

12 years agoDon't print time to finish if there is no average time
Esko Kokkonen [Sat, 20 Aug 2011 11:36:40 +0000 (14:36 +0300)]
Don't print time to finish if there is no average time

Drop the whole finish time section out if there is no average
time. Also don't print negative finish times. Change the newline
commands a bit.

12 years agoGet absolute value for the time to finish
Esko Kokkonen [Sat, 20 Aug 2011 09:04:33 +0000 (12:04 +0300)]
Get absolute value for the time to finish

12 years agoMerge branch 'master' of itanic.dy.fi:/home/git/emerge-timer
Esko Kokkonen [Sat, 20 Aug 2011 08:56:07 +0000 (11:56 +0300)]
Merge branch 'master' of itanic.dy.fi:/home/git/emerge-timer

12 years agoPrin time to finish in current emerge times
Esko Kokkonen [Sat, 20 Aug 2011 08:48:04 +0000 (11:48 +0300)]
Prin time to finish in current emerge times

Have to also fiddle around with the newline printing since they're
scattered in different functions. This might need some revising to
make the output prettier.

12 years agoReset the times -list in the beginning of the main_loop function.
Esko Kokkonen [Sat, 20 Aug 2011 08:30:23 +0000 (11:30 +0300)]
Reset the times -list in the beginning of the main_loop function.

If this list is not emptied, it would have kept adding emerge times
into it, even if the times would belong to another package.

12 years agobegin rewrite
Esko Kokkonen [Fri, 19 Aug 2011 15:48:49 +0000 (18:48 +0300)]
begin rewrite

12 years agoDelete plotting.gpl
Esko Kokkonen [Fri, 19 Aug 2011 10:47:23 +0000 (13:47 +0300)]
Delete plotting.gpl

12 years agoMerge branch 'master' of /home/git/emerge-timer
Esko Kokkonen [Thu, 18 Aug 2011 15:26:46 +0000 (18:26 +0300)]
Merge branch 'master' of /home/git/emerge-timer

12 years agoRemove useless variable
Esko Kokkonen [Thu, 18 Aug 2011 14:49:19 +0000 (17:49 +0300)]
Remove useless variable

emerge_number is not needed because the length of the list 'times'
posesses the same information.

12 years agoRemove useless variable
Esko Kokkonen [Thu, 18 Aug 2011 14:49:19 +0000 (17:49 +0300)]
Remove useless variable

emerge_number is not needed because the length of the list 'times'
posesses the same information.

12 years agoUse correct spacing in printouts
Esko Kokkonen [Thu, 18 Aug 2011 14:29:31 +0000 (17:29 +0300)]
Use correct spacing in printouts

Easier to read a long list of packages when the spacing is the same on
each line.

12 years agoPrint how many packages there are in pretended emerge list
Esko Kokkonen [Thu, 18 Aug 2011 14:24:33 +0000 (17:24 +0300)]
Print how many packages there are in pretended emerge list

12 years agoAdd help screen
Esko Kokkonen [Thu, 18 Aug 2011 14:12:42 +0000 (17:12 +0300)]
Add help screen

The help screen can be accessed with the flags -h or --help

12 years agoIf only one emerge, return that emerge time
Esko Kokkonen [Wed, 17 Aug 2011 10:16:37 +0000 (13:16 +0300)]
If only one emerge, return that emerge time

Need to return even single emerge times so that they can be summed to
the total emerge time

12 years agoTake into account if there aren't any emerges for pretended package
Esko Kokkonen [Tue, 16 Aug 2011 17:52:33 +0000 (20:52 +0300)]
Take into account if there aren't any emerges for pretended package

Don't print the total time if there aren't any emerges for a pretended
package. Also if there is only one emerge.

12 years agolist_pretended: Print total time
Esko Kokkonen [Tue, 16 Aug 2011 17:29:46 +0000 (20:29 +0300)]
list_pretended: Print total time

Print the total emerge time of all the packages in the end

12 years agolist_pretended: Abort if there are no packages
Esko Kokkonen [Tue, 16 Aug 2011 16:59:34 +0000 (19:59 +0300)]
list_pretended: Abort if there are no packages

Exit the program if no usable packages are found

12 years agoAdd support for emerges pretended packages
Esko Kokkonen [Tue, 16 Aug 2011 16:35:49 +0000 (19:35 +0300)]
Add support for emerges pretended packages

By piping "emerge -p <packages>" to emerge-timer with the flag '-p'
you can now see their average emerge times.

12 years agoFix bug with packages with a special character in them
Esko Kokkonen [Tue, 16 Aug 2011 16:24:47 +0000 (19:24 +0300)]
Fix bug with packages with a special character in them

If a package had a '-' character in them, you weren't able to get a
current emerge time for it. This now fixes that using the list_all_packages()
function.

12 years agoCreate a function that list all packages in portage
Esko Kokkonen [Tue, 16 Aug 2011 15:51:03 +0000 (18:51 +0300)]
Create a function that list all packages in portage

12 years agoRename date_printer function to get_date
Esko Kokkonen [Sun, 14 Aug 2011 16:14:06 +0000 (19:14 +0300)]
Rename date_printer function to get_date

Rename this because the function doesn't actually print anything
anymore. It only converts the time its given in seconds to a date
string.

12 years agoMake a new function that has all the current emerge printing stuff
Esko Kokkonen [Sun, 14 Aug 2011 16:10:18 +0000 (19:10 +0300)]
Make a new function that has all the current emerge printing stuff

Keep the calculation stuff in the list_emerge_processes function but
make a new function with all the printing it used to do. Also the
packages list now is in the form [package, emerge-time]. Pass this
list to the printing function so it can print the emerge time aswell.

12 years agoRemove the maximum emerge time restriction
Esko Kokkonen [Sun, 14 Aug 2011 14:42:00 +0000 (17:42 +0300)]
Remove the maximum emerge time restriction

This is no longer needed when we see the current package from
the emerge process

12 years agoImprove code readability
Esko Kokkonen [Sat, 13 Aug 2011 16:12:50 +0000 (19:12 +0300)]
Improve code readability

Add spaces, comments, functions definitions and other improvements to
make the code more readable by human eyes.

12 years agoMove the current emerge check
Esko Kokkonen [Sat, 13 Aug 2011 16:07:47 +0000 (19:07 +0300)]
Move the current emerge check

Check if there are current emerges going on
earlier in the code and exit the function then.

12 years agoopen_log: Change how the error message is presented
Esko Kokkonen [Sat, 13 Aug 2011 15:58:09 +0000 (18:58 +0300)]
open_log: Change how the error message is presented

As it turns out, giving "permission denied" on IOError isn't actually
the way to go.

12 years agodate_printer: Remove useless variables from function parameter list
Esko Kokkonen [Sat, 13 Aug 2011 15:45:25 +0000 (18:45 +0300)]
date_printer: Remove useless variables from function parameter list

12 years agoPrint message if there is no current emerge process
Esko Kokkonen [Sat, 13 Aug 2011 15:42:40 +0000 (18:42 +0300)]
Print message if there is no current emerge process

12 years agoImprove if-block structure
Esko Kokkonen [Sat, 13 Aug 2011 15:30:22 +0000 (18:30 +0300)]
Improve if-block structure

By looking for the emerge startups earlier with if structures we can
simplify the process of searching the correct package in the log a
bit.

12 years agoImprove current emerge-time process
Esko Kokkonen [Sat, 13 Aug 2011 13:07:51 +0000 (16:07 +0300)]
Improve current emerge-time process

Instead of tediously scanning the emerge.log, look for the ebuild
process and get the package from there. Then look for the most recent
emerge startup time for that package and calculate the current emerge
time.

12 years agoFix bug with older emerge.log format handling
Esko Kokkonen [Sat, 13 Aug 2011 09:39:16 +0000 (12:39 +0300)]
Fix bug with older emerge.log format handling

Take into account if the string is shorter than it should be.

12 years agoShow the full package name
Esko Kokkonen [Wed, 13 Jul 2011 19:03:32 +0000 (22:03 +0300)]
Show the full package name

Thats with the version numbering

12 years agoLeave only one space between printouts
Esko Kokkonen [Wed, 13 Jul 2011 19:00:29 +0000 (22:00 +0300)]
Leave only one space between printouts

12 years agoCheck if there are no previous emerges for a current emerge
Esko Kokkonen [Wed, 13 Jul 2011 14:49:08 +0000 (17:49 +0300)]
Check if there are no previous emerges for a current emerge

12 years agoAdd current emerge info
Esko Kokkonen [Mon, 11 Jul 2011 18:30:35 +0000 (21:30 +0300)]
Add current emerge info

Now displays info about the current emerge including the current time
and the average emerge time the package has.

12 years agoLots of changes
Esko Kokkonen [Mon, 11 Jul 2011 16:30:33 +0000 (19:30 +0300)]
Lots of changes

- Move the current emerge and main loop into their own respective
  functions
- Change when all the pringing is done in the main loop
- Don't make 'package' a global variable, but declare it in the main
  function and pass it down to the functions that need it

12 years agoChange the text color to normal intensity
Esko Kokkonen [Tue, 5 Jul 2011 07:28:01 +0000 (10:28 +0300)]
Change the text color to normal intensity

12 years agoPrint the current emerge time
Esko Kokkonen [Sun, 3 Jul 2011 11:00:16 +0000 (14:00 +0300)]
Print the current emerge time

12 years agoList current emerges
Esko Kokkonen [Sun, 3 Jul 2011 10:40:17 +0000 (13:40 +0300)]
List current emerges

This feature is still largely unfinished and buggy as it also takes
into account those emerges that have been terminated prematurely. You
can access this feature by not giving any commandline arguments.

12 years agoCreate the python module if-thingy
Esko Kokkonen [Sun, 3 Jul 2011 07:07:53 +0000 (10:07 +0300)]
Create the python module if-thingy

12 years agoCreate a main() function which to run everytime
Esko Kokkonen [Sun, 3 Jul 2011 07:04:58 +0000 (10:04 +0300)]
Create a main() function which to run everytime

As a result get_time() and calculate_emerge_time() functions had to be
removed and merged into the main() function.

12 years agoGet commandline options in a separate function
Esko Kokkonen [Sun, 3 Jul 2011 06:55:45 +0000 (09:55 +0300)]
Get commandline options in a separate function

12 years agoOpen LOGFILE in a separate function
Esko Kokkonen [Sun, 3 Jul 2011 06:54:00 +0000 (09:54 +0300)]
Open LOGFILE in a separate function

12 years agoAdd a separate function that does the emerge time calculation
Esko Kokkonen [Sat, 2 Jul 2011 20:38:57 +0000 (23:38 +0300)]
Add a separate function that does the emerge time calculation

12 years agoFix the write function
Esko Kokkonen [Fri, 24 Jun 2011 14:07:28 +0000 (17:07 +0300)]
Fix the write function

Use the actualy variable we are calling in this function instead of
the global variable.

12 years agoAdd the number of the emerge in front of the printout
Esko Kokkonen [Fri, 24 Jun 2011 14:07:08 +0000 (17:07 +0300)]
Add the number of the emerge in front of the printout

12 years agoRemove one tab printout from the final summary printout
Esko Kokkonen [Fri, 24 Jun 2011 13:30:35 +0000 (16:30 +0300)]
Remove one tab printout from the final summary printout

12 years agoPut '.' between date numbers instead of '/'
Esko Kokkonen [Fri, 24 Jun 2011 13:30:11 +0000 (16:30 +0300)]
Put '.' between date numbers instead of '/'

12 years agoAbbreviate Thursday as 'thu' instead of 'thur'
Esko Kokkonen [Mon, 20 Jun 2011 09:12:05 +0000 (12:12 +0300)]
Abbreviate Thursday as 'thu' instead of 'thur'

12 years agoChange the printouts around
Esko Kokkonen [Wed, 15 Jun 2011 20:06:48 +0000 (23:06 +0300)]
Change the printouts around

These are more visible

12 years agoPrint an error if a package has never been merged
Esko Kokkonen [Wed, 15 Jun 2011 20:06:32 +0000 (23:06 +0300)]
Print an error if a package has never been merged

12 years agoImprove the main loop
Esko Kokkonen [Wed, 15 Jun 2011 19:18:51 +0000 (22:18 +0300)]
Improve the main loop

Merge the two if blocks so we can remove one indendation

12 years agoChange how we printout the date
Esko Kokkonen [Wed, 15 Jun 2011 16:49:33 +0000 (19:49 +0300)]
Change how we printout the date

Use the string format method

12 years agoMake the file writing into its own function
Esko Kokkonen [Wed, 15 Jun 2011 16:28:46 +0000 (19:28 +0300)]
Make the file writing into its own function

12 years agoRemove the other list and use the same list also for the file print
Esko Kokkonen [Wed, 15 Jun 2011 16:13:39 +0000 (19:13 +0300)]
Remove the other list and use the same list also for the file print

12 years agoFix bug with the package version check
Esko Kokkonen [Wed, 15 Jun 2011 16:09:28 +0000 (19:09 +0300)]
Fix bug with the package version check

Somehow there can also be a full package name without the version
number in the emerge.log, so this fix takes that into account

12 years agoChange where the emerge_time is calculated
Esko Kokkonen [Wed, 15 Jun 2011 09:29:24 +0000 (12:29 +0300)]
Change where the emerge_time is calculated

Instead of it being inside the date function, get it at the main loop

12 years agoRemove a redundant error check
Esko Kokkonen [Tue, 14 Jun 2011 20:10:12 +0000 (23:10 +0300)]
Remove a redundant error check

There is another check for non-existent packages so this one isn't
needed anymore

12 years agoBe more specific on the emerge date
Esko Kokkonen [Tue, 14 Jun 2011 20:07:30 +0000 (23:07 +0300)]
Be more specific on the emerge date

Print the weekday as well as the exact time of the emerge start

12 years agoUse proper English
Esko Kokkonen [Tue, 14 Jun 2011 20:06:20 +0000 (23:06 +0300)]
Use proper English

12 years agoFux bug in time calculations
Esko Kokkonen [Tue, 14 Jun 2011 13:14:33 +0000 (16:14 +0300)]
Fux bug in time calculations

We don't want to round up any of these days, hours or minutes because
the round has been taken into account before.

12 years agoPrettify the printouts
Esko Kokkonen [Mon, 13 Jun 2011 16:38:48 +0000 (19:38 +0300)]
Prettify the printouts

12 years agoAdd the ability for the user to insert full package names
Esko Kokkonen [Mon, 13 Jun 2011 16:33:36 +0000 (19:33 +0300)]
Add the ability for the user to insert full package names

I.e. names like www-client/firefox

12 years agoBe more verbose if found more than one package with the same name
Esko Kokkonen [Mon, 13 Jun 2011 16:22:49 +0000 (19:22 +0300)]
Be more verbose if found more than one package with the same name

Try to list the possible packages the user might have intented.

12 years agoFix error in the log parsing
Esko Kokkonen [Mon, 13 Jun 2011 09:29:27 +0000 (12:29 +0300)]
Fix error in the log parsing

If the package wasnt the first one to be emerged with this exact name,
there was an error

12 years agoReplace green_stop with color_stop
Esko Kokkonen [Sat, 11 Jun 2011 13:32:13 +0000 (16:32 +0300)]
Replace green_stop with color_stop

Since it doesn't have anything to do with stopping the green color but
it works for any color.

12 years agoAdd error message if no package is found
Esko Kokkonen [Sat, 11 Jun 2011 13:27:17 +0000 (16:27 +0300)]
Add error message if no package is found

12 years agoReplace magic strings with global definitions
Esko Kokkonen [Sat, 11 Jun 2011 13:21:26 +0000 (16:21 +0300)]
Replace magic strings with global definitions

12 years agoAdd the date for min and max emerge times
Esko Kokkonen [Sat, 11 Jun 2011 13:04:55 +0000 (16:04 +0300)]
Add the date for min and max emerge times

12 years agoTry not to include packages with similiar names
Esko Kokkonen [Sat, 11 Jun 2011 12:46:23 +0000 (15:46 +0300)]
Try not to include packages with similiar names

Check if the character after the package name is a digit or not. If it
is a digit, this is a valid package emerge, and if it's not we're
dealing with another package that has a similiar name.

12 years agoCreate a function which takes seconds and prints human readable times
Esko Kokkonen [Sat, 11 Jun 2011 12:35:27 +0000 (15:35 +0300)]
Create a function which takes seconds and prints human readable times

12 years agoAdd some color to the output texts
Esko Kokkonen [Fri, 10 Jun 2011 11:25:20 +0000 (14:25 +0300)]
Add some color to the output texts

To do this properly we had to change the print commands a bit

12 years agoShow the package version numbering in the details
Esko Kokkonen [Wed, 8 Jun 2011 12:43:53 +0000 (15:43 +0300)]
Show the package version numbering in the details

12 years agoChange the package naming function
Esko Kokkonen [Wed, 8 Jun 2011 12:42:20 +0000 (15:42 +0300)]
Change the package naming function

Use the /usr/portage/ directory structure to find out of the correct package name

12 years agoRedo the package_name function
Esko Kokkonen [Tue, 7 Jun 2011 08:59:42 +0000 (11:59 +0300)]
Redo the package_name function

This tries to find the right package name more elegantly. There are still bugs in it.

12 years agoGet the package name slightly further down the function
Esko Kokkonen [Mon, 6 Jun 2011 10:25:19 +0000 (13:25 +0300)]
Get the package name slightly further down the function

This way we get less garbage lines to go through

12 years agoDon't print max, min or average times if package has only been emerged once
Esko Kokkonen [Mon, 6 Jun 2011 10:20:01 +0000 (13:20 +0300)]
Don't print max, min or average times if package has only been emerged once

12 years agoPrint error if we can't access the logfile
Esko Kokkonen [Mon, 6 Jun 2011 10:08:56 +0000 (13:08 +0300)]
Print error if we can't access the logfile

12 years agoPrint total time spent emerging package
Esko Kokkonen [Sat, 21 May 2011 13:59:01 +0000 (16:59 +0300)]
Print total time spent emerging package

12 years agoPrint all times as integers
Esko Kokkonen [Sat, 21 May 2011 12:22:55 +0000 (15:22 +0300)]
Print all times as integers

12 years agoMake a separate function for the final printing
Esko Kokkonen [Sat, 21 May 2011 12:13:46 +0000 (15:13 +0300)]
Make a separate function for the final printing

12 years agoGet the real package name
Esko Kokkonen [Sat, 21 May 2011 12:08:38 +0000 (15:08 +0300)]
Get the real package name

12 years agoCreate some new functions to clean up code
Esko Kokkonen [Sat, 21 May 2011 11:23:48 +0000 (14:23 +0300)]
Create some new functions to clean up code

12 years agoPrint the date of the maximum and minimum emerge times
Esko Kokkonen [Sat, 21 May 2011 10:55:34 +0000 (13:55 +0300)]
Print the date of the maximum and minimum emerge times

12 years agoAsk the user for a package name
Esko Kokkonen [Sat, 21 May 2011 10:43:47 +0000 (13:43 +0300)]
Ask the user for a package name

12 years agoMove the first file close
Esko Kokkonen [Sat, 21 May 2011 10:37:17 +0000 (13:37 +0300)]
Move the first file close

12 years agoPrint maximum, minimum and average times for emerge
Esko Kokkonen [Sat, 21 May 2011 10:34:44 +0000 (13:34 +0300)]
Print maximum, minimum and average times for emerge

12 years agoInitial commit
Esko Kokkonen [Sat, 14 May 2011 13:51:58 +0000 (16:51 +0300)]
Initial commit