gtimelog-0.10.0/ 0000775 0001750 0001750 00000000000 12602442050 012424 5 ustar mg mg 0000000 0000000 gtimelog-0.10.0/TODO.rst 0000644 0001750 0001750 00000001160 12247566771 013745 0 ustar mg mg 0000000 0000000 - [ ] Update documentation
- [ ] Shorter README
- what is it
- how it looks
- how to install and run
- where to find documentation
- where to report bugs
- where to find source code
- [ ] Newer screenshots
- [ ] Create a man page with rst2man
- [ ] Fix icon in .desktop file for the Debian package
- [ ] Release 0.9.0 to PyPI and the Ubuntu PPA
- [ ] 'Edit config file' menu entry
- [ ] Weekly summary in the main GUI window (or sidebar)
- [ ] Keep all the data in memory please
- [ ] Python 3 port
- [ ] I18n
- [ ] Usability:
- [ ] Internal reporting
- [ ] Preferences dialog
gtimelog-0.10.0/CONTRIBUTORS.rst 0000664 0001750 0001750 00000001565 12602441226 015126 0 ustar mg mg 0000000 0000000 Contributors
============
In alphabetic order:
- "ijk"
- Adomas Paltanavičius
- Barry Warsaw
- Chris Beaven
- Christian Theune
- Dafydd Harries
- Daniel Kraft
- Danielle Madeley
- Eduardo Habkost
- Emanuele Aina
- Gaute Amundsen
- Gintautas Miliauskas
- Harald Friessnegger
- Ignas Mikalajūnas
- Jamu Kakar
- Jean Jordaan
- Jeroen Langeveld
- Jonatan Cloutier
- Kees Cook
- Lars Wirzenius
- Laurynas Speičys
- Martin Pitt
- Michael Vogt
- Olivier Crête
- Patrick Gerken
- Radek Muzatko
- Rodrigo Daunoravicius
- Rohan Mitchell
- Thom May
- Tomaz Canabrava
- Živilė Gedminaitė
Their contributions include patches (including those that didn't make it into
the mainline), helpful suggestions, icons, configuration tips for integration
with other software, offers for co-maintainership.
Apologies to anyone I may have omitted. If you drop me a note, I'll correct
the omission.
gtimelog-0.10.0/COPYING 0000644 0001750 0001750 00000043152 12247604142 013471 0 ustar mg mg 0000000 0000000 GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.,
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
Preamble
The licenses for most software are designed to take away your
freedom to share and change it. By contrast, the GNU General Public
License is intended to guarantee your freedom to share and change free
software--to make sure the software is free for all its users. This
General Public License applies to most of the Free Software
Foundation's software and to any other program whose authors commit to
using it. (Some other Free Software Foundation software is covered by
the GNU Lesser General Public License instead.) You can apply it to
your programs, too.
When we speak of free software, we are referring to freedom, not
price. Our General Public Licenses are designed to make sure that you
have the freedom to distribute copies of free software (and charge for
this service if you wish), that you receive source code or can get it
if you want it, that you can change the software or use pieces of it
in new free programs; and that you know you can do these things.
To protect your rights, we need to make restrictions that forbid
anyone to deny you these rights or to ask you to surrender the rights.
These restrictions translate to certain responsibilities for you if you
distribute copies of the software, or if you modify it.
For example, if you distribute copies of such a program, whether
gratis or for a fee, you must give the recipients all the rights that
you have. You must make sure that they, too, receive or can get the
source code. And you must show them these terms so they know their
rights.
We protect your rights with two steps: (1) copyright the software, and
(2) offer you this license which gives you legal permission to copy,
distribute and/or modify the software.
Also, for each author's protection and ours, we want to make certain
that everyone understands that there is no warranty for this free
software. If the software is modified by someone else and passed on, we
want its recipients to know that what they have is not the original, so
that any problems introduced by others will not reflect on the original
authors' reputations.
Finally, any free program is threatened constantly by software
patents. We wish to avoid the danger that redistributors of a free
program will individually obtain patent licenses, in effect making the
program proprietary. To prevent this, we have made it clear that any
patent must be licensed for everyone's free use or not licensed at all.
The precise terms and conditions for copying, distribution and
modification follow.
GNU GENERAL PUBLIC LICENSE
TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
0. This License applies to any program or other work which contains
a notice placed by the copyright holder saying it may be distributed
under the terms of this General Public License. The "Program", below,
refers to any such program or work, and a "work based on the Program"
means either the Program or any derivative work under copyright law:
that is to say, a work containing the Program or a portion of it,
either verbatim or with modifications and/or translated into another
language. (Hereinafter, translation is included without limitation in
the term "modification".) Each licensee is addressed as "you".
Activities other than copying, distribution and modification are not
covered by this License; they are outside its scope. The act of
running the Program is not restricted, and the output from the Program
is covered only if its contents constitute a work based on the
Program (independent of having been made by running the Program).
Whether that is true depends on what the Program does.
1. You may copy and distribute verbatim copies of the Program's
source code as you receive it, in any medium, provided that you
conspicuously and appropriately publish on each copy an appropriate
copyright notice and disclaimer of warranty; keep intact all the
notices that refer to this License and to the absence of any warranty;
and give any other recipients of the Program a copy of this License
along with the Program.
You may charge a fee for the physical act of transferring a copy, and
you may at your option offer warranty protection in exchange for a fee.
2. You may modify your copy or copies of the Program or any portion
of it, thus forming a work based on the Program, and copy and
distribute such modifications or work under the terms of Section 1
above, provided that you also meet all of these conditions:
a) You must cause the modified files to carry prominent notices
stating that you changed the files and the date of any change.
b) You must cause any work that you distribute or publish, that in
whole or in part contains or is derived from the Program or any
part thereof, to be licensed as a whole at no charge to all third
parties under the terms of this License.
c) If the modified program normally reads commands interactively
when run, you must cause it, when started running for such
interactive use in the most ordinary way, to print or display an
announcement including an appropriate copyright notice and a
notice that there is no warranty (or else, saying that you provide
a warranty) and that users may redistribute the program under
these conditions, and telling the user how to view a copy of this
License. (Exception: if the Program itself is interactive but
does not normally print such an announcement, your work based on
the Program is not required to print an announcement.)
These requirements apply to the modified work as a whole. If
identifiable sections of that work are not derived from the Program,
and can be reasonably considered independent and separate works in
themselves, then this License, and its terms, do not apply to those
sections when you distribute them as separate works. But when you
distribute the same sections as part of a whole which is a work based
on the Program, the distribution of the whole must be on the terms of
this License, whose permissions for other licensees extend to the
entire whole, and thus to each and every part regardless of who wrote it.
Thus, it is not the intent of this section to claim rights or contest
your rights to work written entirely by you; rather, the intent is to
exercise the right to control the distribution of derivative or
collective works based on the Program.
In addition, mere aggregation of another work not based on the Program
with the Program (or with a work based on the Program) on a volume of
a storage or distribution medium does not bring the other work under
the scope of this License.
3. You may copy and distribute the Program (or a work based on it,
under Section 2) in object code or executable form under the terms of
Sections 1 and 2 above provided that you also do one of the following:
a) Accompany it with the complete corresponding machine-readable
source code, which must be distributed under the terms of Sections
1 and 2 above on a medium customarily used for software interchange; or,
b) Accompany it with a written offer, valid for at least three
years, to give any third party, for a charge no more than your
cost of physically performing source distribution, a complete
machine-readable copy of the corresponding source code, to be
distributed under the terms of Sections 1 and 2 above on a medium
customarily used for software interchange; or,
c) Accompany it with the information you received as to the offer
to distribute corresponding source code. (This alternative is
allowed only for noncommercial distribution and only if you
received the program in object code or executable form with such
an offer, in accord with Subsection b above.)
The source code for a work means the preferred form of the work for
making modifications to it. For an executable work, complete source
code means all the source code for all modules it contains, plus any
associated interface definition files, plus the scripts used to
control compilation and installation of the executable. However, as a
special exception, the source code distributed need not include
anything that is normally distributed (in either source or binary
form) with the major components (compiler, kernel, and so on) of the
operating system on which the executable runs, unless that component
itself accompanies the executable.
If distribution of executable or object code is made by offering
access to copy from a designated place, then offering equivalent
access to copy the source code from the same place counts as
distribution of the source code, even though third parties are not
compelled to copy the source along with the object code.
4. You may not copy, modify, sublicense, or distribute the Program
except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
5. You are not required to accept this License, since you have not
signed it. However, nothing else grants you permission to modify or
distribute the Program or its derivative works. These actions are
prohibited by law if you do not accept this License. Therefore, by
modifying or distributing the Program (or any work based on the
Program), you indicate your acceptance of this License to do so, and
all its terms and conditions for copying, distributing or modifying
the Program or works based on it.
6. Each time you redistribute the Program (or any work based on the
Program), the recipient automatically receives a license from the
original licensor to copy, distribute or modify the Program subject to
these terms and conditions. You may not impose any further
restrictions on the recipients' exercise of the rights granted herein.
You are not responsible for enforcing compliance by third parties to
this License.
7. If, as a consequence of a court judgment or allegation of patent
infringement or for any other reason (not limited to patent issues),
conditions are imposed on you (whether by court order, agreement or
otherwise) that contradict the conditions of this License, they do not
excuse you from the conditions of this License. If you cannot
distribute so as to satisfy simultaneously your obligations under this
License and any other pertinent obligations, then as a consequence you
may not distribute the Program at all. For example, if a patent
license would not permit royalty-free redistribution of the Program by
all those who receive copies directly or indirectly through you, then
the only way you could satisfy both it and this License would be to
refrain entirely from distribution of the Program.
If any portion of this section is held invalid or unenforceable under
any particular circumstance, the balance of the section is intended to
apply and the section as a whole is intended to apply in other
circumstances.
It is not the purpose of this section to induce you to infringe any
patents or other property right claims or to contest validity of any
such claims; this section has the sole purpose of protecting the
integrity of the free software distribution system, which is
implemented by public license practices. Many people have made
generous contributions to the wide range of software distributed
through that system in reliance on consistent application of that
system; it is up to the author/donor to decide if he or she is willing
to distribute software through any other system and a licensee cannot
impose that choice.
This section is intended to make thoroughly clear what is believed to
be a consequence of the rest of this License.
8. If the distribution and/or use of the Program is restricted in
certain countries either by patents or by copyrighted interfaces, the
original copyright holder who places the Program under this License
may add an explicit geographical distribution limitation excluding
those countries, so that distribution is permitted only in or among
countries not thus excluded. In such case, this License incorporates
the limitation as if written in the body of this License.
9. The Free Software Foundation may publish revised and/or new versions
of the General Public License from time to time. Such new versions will
be similar in spirit to the present version, but may differ in detail to
address new problems or concerns.
Each version is given a distinguishing version number. If the Program
specifies a version number of this License which applies to it and "any
later version", you have the option of following the terms and conditions
either of that version or of any later version published by the Free
Software Foundation. If the Program does not specify a version number of
this License, you may choose any version ever published by the Free Software
Foundation.
10. If you wish to incorporate parts of the Program into other free
programs whose distribution conditions are different, write to the author
to ask for permission. For software which is copyrighted by the Free
Software Foundation, write to the Free Software Foundation; we sometimes
make exceptions for this. Our decision will be guided by the two goals
of preserving the free status of all derivatives of our free software and
of promoting the sharing and reuse of software generally.
NO WARRANTY
11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN
OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS
TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE
PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
REPAIR OR CORRECTION.
12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
POSSIBILITY OF SUCH DAMAGES.
END OF TERMS AND CONDITIONS
How to Apply These Terms to Your New Programs
If you develop a new program, and you want it to be of the greatest
possible use to the public, the best way to achieve this is to make it
free software which everyone can redistribute and change under these terms.
To do so, attach the following notices to the program. It is safest
to attach them to the start of each source file to most effectively
convey the exclusion of warranty; and each file should have at least
the "copyright" line and a pointer to where the full notice is found.
{description}
Copyright (C) {year} {fullname}
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 Street, Fifth Floor, Boston, MA 02110-1301 USA.
Also add information on how to contact you by electronic and paper mail.
If the program is interactive, make it output a short notice like this
when it starts in an interactive mode:
Gnomovision version 69, Copyright (C) year name of author
Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
This is free software, and you are welcome to redistribute it
under certain conditions; type `show c' for details.
The hypothetical commands `show w' and `show c' should show the appropriate
parts of the General Public License. Of course, the commands you use may
be called something other than `show w' and `show c'; they could even be
mouse-clicks or menu items--whatever suits your program.
You should also get your employer (if you work as a programmer) or your
school, if any, to sign a "copyright disclaimer" for the program, if
necessary. Here is a sample; alter the names:
Yoyodyne, Inc., hereby disclaims all copyright interest in the program
`Gnomovision' (which makes passes at compilers) written by James Hacker.
{signature of Ty Coon}, 1 April 1989
Ty Coon, President of Vice
This General Public License does not permit incorporating your program into
proprietary programs. If your program is a subroutine library, you may
consider it more useful to permit linking proprietary applications with the
library. If this is what you want to do, use the GNU Lesser General
Public License instead of this License.
gtimelog-0.10.0/gtimelog 0000775 0001750 0001750 00000000355 12576732114 014201 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
"""
Script to run GTimeLog from the source checkout without installing
"""
import os
import sys
pkgdir = os.path.join(os.path.dirname(__file__), 'src')
sys.path.insert(0, pkgdir)
from gtimelog.main import main
main()
gtimelog-0.10.0/.coveragerc 0000664 0001750 0001750 00000000335 12602441616 014555 0 ustar mg mg 0000000 0000000 [run]
source = src/gtimelog
omit = src/gtimelog/tests.py,src/gtimelog/main.py
cover_pylib = False
[report]
exclude_lines =
pragma: nocover
if __name__ == '__main__':
except ImportError:
except NameError:
gtimelog-0.10.0/runtests 0000755 0001750 0001750 00000000347 12273163325 014254 0 ustar mg mg 0000000 0000000 #!/usr/bin/env python
"""
Script to run GTimeLog's tests from the source checkout
"""
import os
import sys
pkgdir = os.path.join(os.path.dirname(__file__), 'src')
sys.path.insert(0, pkgdir)
from gtimelog.tests import main
main()
gtimelog-0.10.0/MANIFEST.in 0000664 0001750 0001750 00000000526 12602442026 014170 0 ustar mg mg 0000000 0000000 include COPYING
include *.rst
include Makefile
include gtimelog
include gtimelog.appdata.xml
include gtimelog.desktop
include gtimelogrc.example
include runtests
include tox.ini
include .travis.yml
include .coveragerc
include .gitignore
recursive-include src *.png *.ui
recursive-include docs *.png *.rst
recursive-include scripts *.py *.rst
gtimelog-0.10.0/README.rst 0000664 0001750 0001750 00000004574 12602441616 014134 0 ustar mg mg 0000000 0000000 GTimeLog
========
GTimeLog is a simple app for keeping track of time.
.. image:: https://pypip.in/version/gtimelog/badge.svg?style=flat
:target: https://pypi.python.org/pypi/gtimelog/
:alt: latest version
.. image:: https://travis-ci.org/gtimelog/gtimelog.svg?branch=master
:target: https://travis-ci.org/gtimelog/gtimelog
:alt: build status
.. image:: https://coveralls.io/repos/gtimelog/gtimelog/badge.svg?branch=master
:target: https://coveralls.io/r/gtimelog/gtimelog?branch=master
:alt: test coverage
.. contents::
.. image:: https://raw.github.com/gtimelog/gtimelog/master/docs/gtimelog.png
:alt: screenshot
Installing
----------
GTimeLog is packaged for Debian and Ubuntu::
sudo apt-get install gtimelog
For Ubuntu, a newer version can usually be found in the PPA:
https://launchpad.net/~gtimelog-dev/+archive/ppa
You can fetch the latest released version from PyPI ::
$ pip install gtimelog
$ gtimelog
You can run it from a source checkout without an explicit installation step::
$ git clone https://github.com/gtimelog/gtimelog
$ cd gtimelog
$ ./gtimelog
System requirements:
- Python (2.7 or 3.3+)
- PyGObject
- gobject-introspection type libraries for GTK+, Pango
Documentation
-------------
This is work in progress:
- `docs/index.rst`_ contains an overview
- `docs/formats.rst`_ describes the file formats
.. _docs/index.rst: https://github.com/gtimelog/gtimelog/blob/master/docs/index.rst
.. _docs/formats.rst: https://github.com/gtimelog/gtimelog/blob/master/docs/formats.rst
Resources
---------
Website: http://mg.pov.lt/gtimelog
Mailing list: gtimelog@googlegroups.com
(archive at http://groups.google.com/group/gtimelog)
IRC: #gtimelog on irc.freenode.net
Source code: https://github.com/gtimelog/gtimelog
Report bugs at https://github.com/gtimelog/gtimelog/issues
There's an old bugtracker at https://bugs.launchpad.net/gtimelog
I sometimes also browse distribution bugs:
- Ubuntu https://bugs.launchpad.net/ubuntu/+source/gtimelog
- Debian http://bugs.debian.org/gtimelog
Credits
-------
GTimeLog was mainly written by Marius Gedminas .
Barry Warsaw stepped in as a co-maintainer when
Marius burned out. Then Barry got busy and Marius recovered.
Many excellent contributors are listed in `CONTRIBUTORS.rst`_
.. _CONTRIBUTORS.rst: https://github.com/gtimelog/gtimelog/blob/master/CONTRIBUTORS.rst
gtimelog-0.10.0/gtimelogrc.rst 0000664 0001750 0001750 00000021716 12602441616 015330 0 ustar mg mg 0000000 0000000 ==========
gtimelogrc
==========
---------------------------
gtimelog configuration file
---------------------------
:Author: Marius Gedminas
:Date: 2013-12-23
:Copyright: Marius Gedminas
:Version: 0.9.1
:Manual section: 5
DESCRIPTION
===========
This is the configuration file for **gtimelog**\ (1). It is a pretty standard
INI file as recognized by Python's ConfigParser, which means:
- it consists of sections, led by a ``[name]`` header
- values are specified as ``name = value`` (or ``name: value``)
- values can be continued across multiple lines if continuation lines
start with whitespace
- comments are lines starting with ``#`` or ``;``
- if the same value appears multiple times, new appearances override old ones
Only one section is important to gtimelog: ``[gtimelog]``. Within it you can
specify the following settings:
list-email
recipient address for activity reports
Example: ``name = activity-reports@example.com``
name
your name as it should appear in the reports
Example: ``name = Marius``
mailer
command to launch your email client.
If ``%s`` appears in the command, it will be replaced by the filename of
the draft of the email. If ``%s`` doesn't appear, it will be added to the
end of the command.
Example: ``mailer = gedit`` will just open the report in GEdit,
useful if you don't want to send it to anyone.
Example: ``mailer = x-terminal-emulator -e mutt -H %s`` (which is the
default setting) will open Mutt with the draft in a terminal.
``x-terminal-emulator`` is a Debianism.
Example: ``mailer = S='%s'; thunderbird -compose "to='$(cat $S|head -1|sed -e "s/^To: //")',subject='$(cat $S|head -2|tail -1|sed -e "s/^Subject: //")',body='$(cat $S|tail -n +4)'"``
will open Thunderbird with the draft.
editor
text editor to be used for editing timelog.txt
If ``%s`` appears in the command, it will be replaced by the filename of
the timelog.txt file. If ``%s`` doesn't appear, it will be added to the
end of the command.
Example: ``editor = xdg-open`` (the default value) opens whichever
program is associated with .txt files on your system.
spreasheet
program used to display CSV reports
If ``%s`` appears in the command, it will be replaced by the filename of
the CSV report. If ``%s`` doesn't appear, it will be added to the end of
the command.
Example: ``spreadsheet = xdg-open`` (the default value) opens whichever
program is associated with .csv files on your system.
chronological, summary_view
select the initial detail level
GTimeLog can show you one of three detail levels:
- chronological (Alt+1) shows all the entries in order
- grouped (Alt+2) shows only work entries, grouped by title
- summary (Alt+3) shows only categories of work entries, grouped
Example::
# start in chronological view
chronological = True
summary_view = False
Example ::
# start in grouped view
chronological = False
summary_view = False
Example ::
# start in summary view
summary_view = True
show_tasks
should the task pane be shown on startup?
Example: ``show_tasks = True``
enable_gtk_completion
should the input box show an autocompletion popup?
If set to ``True``, the Up and Down keys navigate the completion popup
menu.
If set to ``False``, the Up and Down keys trigger prefix-completion in the
input box.
Note that PageUp and PageDown keys always trigger prefix-completion, so
there's no good reason to ever disable this option.
Example: ``enable_gtk_completion = True``
hours
goal for the number of hours of work in a day
This is used to display the "Time left at work" estimate.
Example: ``hours = 4``
virtual_midnight
hour in the morning when it's safe to assume you're not staying up working
any more.
Any work done between midnight and "virtual midnight" will be attributed
to the previous calendar day.
Example: ``virtual_midnight = 2:00`` (the default setting)
Warning: changing this setting may mean that old reports can no longer be
correctly reconstructed from timelog.txt
task_list_url
URL for downloading the task list
If not set, tasks will be read from a local file (tasks.txt in the gtimelog
data directory)
If set, tasks will be loaded from the specified URL (but only when you
right-click and explicitly ask for a refresh). GTimeLog expects a
text/plain response with a list of tasks, one per line. At the time of
this writing GTimeLog doesn't show HTTP authentication prompts, so if you
need auth, you need to put your username and password into the URL.
This feature is mostly useless.
Example: ``task_list_url =`` (the default setting)
Example: ``task_list_url = https://wiki.example.com/Project/Tasks/raw``
edit_tasklist_cmd
command for editing the task list
Example: ``edit_tasklist_cmd =`` (the default setting) means that the
"Edit task list" command in the popup menu will be disabled.
Example: ``edit_tasklist_cmd = xdg-open ~/.local/share/gtimelog/tasks.txt``
Example: ``edit_tasklist_cmd = xdg-open https://wiki.example.com/Project/Tasks/edit``
Bug: this command should support ``%s`` for specifying the full tasks.txt
pathname, but it doesn't.
show_office_hours
whether to show "At office today: NN hours, NN minutes" in the main window
Example: ``show_office_hours = True``
show_tray_icon
whether to show a notification icon
Example: ``show_tray_icon = True``
prefer_app_indicator
what kind of tray icon do you prefer?
GTimeLog supports two kinds:
- Unity application indicator
- a standard Gtk+ status icon
Support for each is conditional on the availability of installed libraries.
Example::
# prefer Unity application indicators, then fall back to the Gtk+
# status icon.
prefer_app_indicator = True
Example::
# prefer the Gtk+ status icon, then fall back to Unity app indicator.
prefer_app_indicator = False
start_in_tray
whether GTimeLog should start minimized
This can also be achieved by running ``gtimelog --tray``, so the option is
of little use.
This option is ignored if GTimeLog is not using a tray icon (because
``show_tray_icon`` is set to ``False``, or if you're missing all the
libraries).
Example:: ``start_in_tray = False``
report_style
choose one of the available report styles for weekly and monthly reports
Example:: ``report_style = plain`` (the default)
The report looks like this::
cat1: entry1 N h N min
cat1: entry2 N h N min
cat2: entry1 N h N min
Total work done this week: N hours N min
By category:
cat1: N hours N min
cat2: N hours N min
Example:: ``report_style = categorized``
The report looks like this::
category 1:
entry1 MM
entry2 HH:MM
------------------------------------------------
HH:MM
category 2:
entry1 MM
entry2 HH:MM
------------------------------------------------
HH:MM
Total work done this week: HH:MM
Categories by time spent:
category 1 HH:MM
category 2 HH:MM
EXAMPLE
=======
Example of ``~/.config/gtimelog/gtimelogrc``::
[gtimelog]
# Be sure to change these if you want to email the reports somewhere
name = Anonymous
list-email = activity@example.com
# Don't want email? Just look at reports in a text editor
mailer = gedit %s
# Set a goal for 7 hours and 30 minutes of work per day
hours = 7.5
# I'll never stay up working this late
virtual_midnight = 06:00
# Disable the tray icon
show_tray_icon = no
# Hide the Tasks pane on startup
show_tasks = no
BUGS
====
The config file should not be necessary. GTimeLog should figure out the
right programs by looking at your desktop preferences; it should remember
the view options from a previous invocation; and it should have a GUI way
for specifying things such as your name or the report mailing list.
FILES
=====
| **~/.gtimelog/gtimelogrc**
| **~/.config/gtimelog/gtimelogrc**
Configuration file.
GTimeLog determines the location for the config file as follows:
1. If the environment variable ``GTIMELOG_HOME`` is set, use
``$GTIMELOG_HOME/gtimelogrc``.
2. If ``~/.gtimelog/`` exists, use ``~/.gtimelog/gtimelogrc``.
3. If the environment variable ``XDG_CONFIG_HOME`` is set, use
``$XDG_CONFIG_HOME/gtimelog/gtimelogrc``.
4. Use ``~/.config/gtimelog/gtimelogrc``.
SEE ALSO
========
**gtimelog**\ (1)
gtimelog-0.10.0/tox.ini 0000664 0001750 0001750 00000000654 12602441641 013751 0 ustar mg mg 0000000 0000000 [tox]
envlist =
py27,py33,py34,py35
[testenv]
setenv =
LC_ALL=C
deps =
freezegun
mock
commands =
python setup.py -q test
[testenv:coverage]
usedevelop = true
deps =
{[testenv]deps}
coverage
commands =
coverage run {posargs} -m gtimelog.tests
[testenv:coverage3]
basepython = python3
usedevelop = true
deps =
{[testenv:coverage]deps}
commands =
coverage run {posargs} -m gtimelog.tests
gtimelog-0.10.0/setup.py 0000775 0001750 0001750 00000003706 12602441652 014156 0 ustar mg mg 0000000 0000000 #!/usr/bin/env python
import os
import re
import io
from setuptools import setup
here = os.path.dirname(__file__)
def read(filename):
with io.open(os.path.join(here, filename), 'r', encoding='utf-8') as f:
return f.read()
metadata = dict(
(k, eval(v)) for k, v in
re.findall('^(__version__|__author__|__url__|__licence__) = (.*)$',
read('src/gtimelog/__init__.py'), flags=re.MULTILINE)
)
version = metadata['__version__']
changes = read('NEWS.rst').split('\n\n\n')
changes_in_latest_versions = '\n\n\n'.join(changes[:3])
older_changes = '''
Older versions
~~~~~~~~~~~~~~
See the `full changelog`_.
.. _full changelog: https://github.com/gtimelog/gtimelog/blob/master/NEWS.rst
'''
short_description = 'A Gtk+ time tracking application'
long_description = (
read('README.rst') +
'\n\n' +
changes_in_latest_versions +
'\n\n' +
older_changes
)
setup(
name='gtimelog',
version=version,
author='Marius Gedminas',
author_email='marius@gedmin.as',
url='http://mg.pov.lt/gtimelog/',
description=short_description,
long_description=long_description,
license='GPL',
classifiers=[
'Development Status :: 4 - Beta',
'Environment :: X11 Applications :: GTK',
'License :: OSI Approved :: GNU General Public License (GPL)',
'Programming Language :: Python :: 2.7',
'Programming Language :: Python :: 3.3',
'Programming Language :: Python :: 3.4',
'Programming Language :: Python :: 3.5',
'Topic :: Office/Business',
],
packages=['gtimelog'],
package_dir={'': 'src'},
package_data={'gtimelog': ['*.ui', '*.png']},
test_suite='gtimelog.tests',
tests_require=['freezegun', 'mock'],
zip_safe=False,
entry_points="""
[gui_scripts]
gtimelog = gtimelog.main:main
""",
# This is true, but pointless, because PyGObject cannot be installed via
# setuptools/distutils
# install_requires=['PyGObject'],
)
gtimelog-0.10.0/setup.cfg 0000664 0001750 0001750 00000000443 12602442050 014246 0 ustar mg mg 0000000 0000000 [flake8]
doctests = yes
[pytest]
norecursedirs = .* *.egg-info dist build tmp scripts
python_files = tests.py
python_functions = !test_suite
addopts = --doctest-modules --ignore=setup.py
doctest_optionflags = NORMALIZE_WHITESPACE
[egg_info]
tag_build =
tag_date = 0
tag_svn_revision = 0
gtimelog-0.10.0/PKG-INFO 0000664 0001750 0001750 00000014305 12602442050 013524 0 ustar mg mg 0000000 0000000 Metadata-Version: 1.1
Name: gtimelog
Version: 0.10.0
Summary: A Gtk+ time tracking application
Home-page: http://mg.pov.lt/gtimelog/
Author: Marius Gedminas
Author-email: marius@gedmin.as
License: GPL
Description: GTimeLog
========
GTimeLog is a simple app for keeping track of time.
.. image:: https://pypip.in/version/gtimelog/badge.svg?style=flat
:target: https://pypi.python.org/pypi/gtimelog/
:alt: latest version
.. image:: https://travis-ci.org/gtimelog/gtimelog.svg?branch=master
:target: https://travis-ci.org/gtimelog/gtimelog
:alt: build status
.. image:: https://coveralls.io/repos/gtimelog/gtimelog/badge.svg?branch=master
:target: https://coveralls.io/r/gtimelog/gtimelog?branch=master
:alt: test coverage
.. contents::
.. image:: https://raw.github.com/gtimelog/gtimelog/master/docs/gtimelog.png
:alt: screenshot
Installing
----------
GTimeLog is packaged for Debian and Ubuntu::
sudo apt-get install gtimelog
For Ubuntu, a newer version can usually be found in the PPA:
https://launchpad.net/~gtimelog-dev/+archive/ppa
You can fetch the latest released version from PyPI ::
$ pip install gtimelog
$ gtimelog
You can run it from a source checkout without an explicit installation step::
$ git clone https://github.com/gtimelog/gtimelog
$ cd gtimelog
$ ./gtimelog
System requirements:
- Python (2.7 or 3.3+)
- PyGObject
- gobject-introspection type libraries for GTK+, Pango
Documentation
-------------
This is work in progress:
- `docs/index.rst`_ contains an overview
- `docs/formats.rst`_ describes the file formats
.. _docs/index.rst: https://github.com/gtimelog/gtimelog/blob/master/docs/index.rst
.. _docs/formats.rst: https://github.com/gtimelog/gtimelog/blob/master/docs/formats.rst
Resources
---------
Website: http://mg.pov.lt/gtimelog
Mailing list: gtimelog@googlegroups.com
(archive at http://groups.google.com/group/gtimelog)
IRC: #gtimelog on irc.freenode.net
Source code: https://github.com/gtimelog/gtimelog
Report bugs at https://github.com/gtimelog/gtimelog/issues
There's an old bugtracker at https://bugs.launchpad.net/gtimelog
I sometimes also browse distribution bugs:
- Ubuntu https://bugs.launchpad.net/ubuntu/+source/gtimelog
- Debian http://bugs.debian.org/gtimelog
Credits
-------
GTimeLog was mainly written by Marius Gedminas .
Barry Warsaw stepped in as a co-maintainer when
Marius burned out. Then Barry got busy and Marius recovered.
Many excellent contributors are listed in `CONTRIBUTORS.rst`_
.. _CONTRIBUTORS.rst: https://github.com/gtimelog/gtimelog/blob/master/CONTRIBUTORS.rst
Changelog
---------
0.10.0 (2015-09-29)
~~~~~~~~~~~~~~~~~~~
* Use Tango colors in the main text buffer (GH: #13).
* Allow tagging entries (GH: #19)
- The syntax is ``category: text -- tag1 tag2``
- Per-tag summaries show up in reports
* Use GtkApplication instead of own DBus server for enforcing single-instance.
- Drop --replace, --ignore-dbus command-line options because of this.
- Require glib and gio to be version 2.40 or newer for sane
GtkApplication-based command line parsing
(check with ``pkg-config --modversion glib-2.0 gio-2.0``).
* Remove obsolete code:
- Drop support for Python 2.6 (PyGObject dropped support for it long ago).
- Drop PyGtk/Gtk+ 2 support code (it didn't work since 0.9.1 anyway).
- Drop EggTrayIcon support (it was for Gtk+ 2 only anyway).
- Drop the --prefer-pygtk command-line option.
* Disable tray icon by default for new users (existing gtimelogrc files will be
untouched).
* Improve tray icon selection logic for best contrast (GH: #29).
0.9.3 (2015-09-29)
~~~~~~~~~~~~~~~~~~
* Adding new entries didn't update total weekly numbers (GH: #28).
0.9.2 (2014-09-28)
~~~~~~~~~~~~~~~~~~
* Note that Gtk+ 2.x is no longer supported (this regressed somewhere between
0.9.0 and 0.9.1, but I didn't notice because I have no access to a system
that has Gtk+ 2.x).
* Fix setup.py to work on Python 3 when your locale is not UTF-8 (LP: #1263772).
* Fix two Gtk-CRITICAL warnings on startup (GH: #14).
* Fix Unicode warning when adding entries (GH: #20).
* Speed up entry addition (GH: #21).
* Fix Unicode error when navigating history with PageUp/PageDown (GH: #22).
* Update current task time when autoreloading (GH: #23).
* Fix 'LocaleError: unknown encoding:' on Mac OS X (GH: #25).
* Fix 'TypeError: unorderable types: NoneType() < str()' in summary view
on Python 3 (GH: #26).
Older versions
~~~~~~~~~~~~~~
See the `full changelog`_.
.. _full changelog: https://github.com/gtimelog/gtimelog/blob/master/NEWS.rst
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: X11 Applications :: GTK
Classifier: License :: OSI Approved :: GNU General Public License (GPL)
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Topic :: Office/Business
gtimelog-0.10.0/scripts/ 0000775 0001750 0001750 00000000000 12602442050 014113 5 ustar mg mg 0000000 0000000 gtimelog-0.10.0/scripts/today.py 0000755 0001750 0001750 00000010175 12245325640 015622 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
import re
import os
import sys
import getopt
import datetime
def read_timelog(filename):
return file(filename)
def todays_entries(today, lines):
# assume "day turnover" at 2 am
min = datetime.datetime.combine(today, datetime.time(2, 0))
max = min + datetime.timedelta(1)
for line in lines:
time = line.split(': ', 1)[0]
try:
time = parse_datetime(time)
except ValueError:
pass
else:
if min <= time < max:
yield line
def parse_date(dt):
m = re.match(r'^(\d+)-(\d+)-(\d+)$', dt)
if not m:
raise ValueError('bad date: ', dt)
year, month, day = map(int, m.groups())
return datetime.date(year, month, day)
def parse_datetime(dt):
m = re.match(r'^(\d+)-(\d+)-(\d+) (\d+):(\d+)$', dt)
if not m:
raise ValueError('bad date time: ', dt)
year, month, day, hour, min = map(int, m.groups())
return datetime.datetime(year, month, day, hour, min)
def calculate_diffs(lines):
last_time = None
for line in lines:
time, action = line.split(': ', 1)
time = parse_datetime(time)
if last_time is None:
delta = None
else:
delta = time - last_time
yield last_time, time, delta, action.strip()
last_time = time
def format_time(t):
h, m = divmod(t, 60)
if h and m:
return '%d hour%s %d min' % (h, h != 1 and "s" or "", m)
elif h:
return '%d hour%s' % (h, h != 1 and "s" or "")
else:
return '%d min' % m
def print_diff(last_time, time, delta, action):
time = time.strftime('%H:%M')
if delta is None:
delta = ""
else:
delta = format_time(delta.seconds / 60)
# format 1
## print "%s%15s %s" % (time, delta, action)
# format 2
action = action[:1].title() + action[1:]
if not delta:
print "%s at %s\n" % (action, time)
else:
print "%-62s %s" % (action, delta)
def print_diffs(iter):
first_time = None
time = None
total_time = total_slack = datetime.timedelta(0)
for last_time, time, delta, action in iter:
if first_time is None:
first_time = time
print_diff(last_time, time, delta, action)
if delta is not None:
if '**' in action:
total_slack += delta
else:
total_time += delta
return first_time, time, total_time, total_slack
def main(argv=sys.argv):
filename = 'timelog.txt'
opts, args = getopt.getopt(argv[1:], 'hf:', ['help'])
for k, v in opts:
if k == '-f':
filename = v
if len(args) > 1:
print >> sys.stderr, "too many arguments"
elif len(args) == 1:
if args[0] == 'yesterday':
today = datetime.date.today() - datetime.timedelta(1)
else:
today = parse_date(args[0])
else:
if os.path.basename(argv[0]).replace('.py', '') == 'yesterday':
today = datetime.date.today() - datetime.timedelta(1)
else:
today = datetime.date.today()
title = "Today, %s" % today.strftime('%Y-%m-%d')
print title
print "-" * len(title)
chain = read_timelog(filename)
chain = todays_entries(today, chain)
chain = calculate_diffs(chain)
first_time, last_time, total_time, total_slack = print_diffs(chain)
now = datetime.datetime.now()
print ""
print "Total work done: %s" % format_time(total_time.seconds / 60)
print "Time spent slacking: %s" % format_time(total_slack.seconds / 60)
print ""
print "Time now: %s" % now.strftime('%H:%M')
if last_time is not None:
delta = now - last_time
print "Time since last entry: %s" % format_time(delta.seconds / 60)
delta = now - first_time
print "Time since first entry: %s" % format_time(delta.seconds / 60)
est_end_of_work = last_time + datetime.timedelta(hours=8) - total_time
delta = est_end_of_work - now
print "Time left at work: %s (til %s)" % (
format_time(delta.seconds / 60),
est_end_of_work.strftime("%H:%M"))
if __name__ == '__main__':
main()
gtimelog-0.10.0/scripts/sum.py 0000755 0001750 0001750 00000001471 12245325640 015305 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
import sys
import re
time_rx = re.compile(r'(\d+) hours?,? (\d+) min$'
r'|(\d+) hours?$'
r'|(\d+) min$')
def parse_time(s):
m = time_rx.match(s)
if not m:
return None
h1, m1, h2, m2 = m.groups()
return int(h1 or h2 or '0') * 60 + int(m1 or m2 or '0')
def format_time(t):
h, m = divmod(t, 60)
if h and m:
return '%d hour%s, %d min' % (h, h != 1 and "s" or "", m)
elif h:
return '%d hour%s' % (h, h != 1 and "s" or "")
else:
return '%d min' % m
total = 0
for line in sys.stdin:
if ' ' not in line:
continue
time = parse_time(line.split(' ')[-1].strip())
if time is None:
continue
print line.rstrip()
total += time
print "** Total: %s" % format_time(total)
gtimelog-0.10.0/scripts/README.rst 0000644 0001750 0001750 00000002477 12247576321 015630 0 ustar mg mg 0000000 0000000 Old scripts
===========
These old scripts are kept for sentimental value.
timelog.py is an earlier, less powerful text-mode version of gtimelog. You
type in activity names, and timelog writes them down into timelog.txt with
timestamps prepended.
today.py can generate a daily report from timelog.txt. It does not group
activities with the same name, and it does not spawn a mail client.
You can also specify the date on the command line -- generating reports for
earlier days is not yet possible with GTimeLog.
sum.py can help you consolidate daily reports. It is designed to work as a
filter: it reads lines from the standard input, extracts durations from
those lines (formatted as "N hours, M min" at the end of the line, and
separated by at least two spaces from other text), sums them and prints the
total. If you use vim for editing daily reports, you can select a bunch of
lines and pipe them through sum.py.
difftime.py is a hacky interactive calculator that I used to generate daily
reports from timelog.txt before today.py and gtimelog.py could automate the
task. The biggest feature of difftime.py (it's raison d'etre if you will)
is the ability to calculate the duration between two timestamps.
export-my-calendar.py uses the gtimelog internal APIs to produce an iCalendar
file of the log. It has some hardcoded dates.
gtimelog-0.10.0/scripts/difftime.py 0000755 0001750 0001750 00000001320 12245325640 016261 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
import readline
def parse_time(s):
h, m = map(int, s.strip().split(':'))
return h * 60 + m
def fmt_delta(mins):
sign = mins < 0 and "-" or ""
mins = abs(mins)
if mins >= 60:
h = mins / 60
m = mins % 60
return "%s%d min (%d hr, %d min)" % (sign, mins, h, m)
else:
return "%s%d min" % (sign, mins)
while True:
try:
what = raw_input("start, end> ")
except EOFError:
print
break
try:
if ',' in what:
t1, t2 = map(parse_time, what.split(','))
else:
t1, t2 = map(parse_time, what.split())
print fmt_delta(t2 - t1)
except ValueError:
print eval(what)
gtimelog-0.10.0/scripts/timelog.py 0000755 0001750 0001750 00000000633 12245325640 016140 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
import datetime
import readline # make raw_input() friendlier
f = open("timelog.txt", "a")
print >> f
f.close()
while True:
try:
what = raw_input("> ")
except EOFError:
print
break
ts = datetime.datetime.now()
line = "%s: %s" % (ts.strftime("%Y-%m-%d %H:%M"), what)
print line
f = open("timelog.txt", "a")
print >> f, line
f.close()
gtimelog-0.10.0/scripts/workdays.py 0000755 0001750 0001750 00000002664 12245325640 016351 0 ustar mg mg 0000000 0000000 #!/usr/bin/python
"""
Given a constraint to do at least 7 hours of work per day, how many actual
days of work you did in a given week?
"""
import fileinput
import re
time_rx = re.compile(r'(\d+) hours?,? (\d+) min$'
r'|(\d+) hours?$'
r'|(\d+) min$')
def parse_time(s):
m = time_rx.match(s)
if not m:
return None
h1, m1, h2, m2 = m.groups()
return int(h1 or h2 or '0') * 60 + int(m1 or m2 or '0')
def format_time(t):
h, m = divmod(t, 60)
if h and m:
return '%d hour%s, %d min' % (h, h != 1 and "s" or "", m)
elif h:
return '%d hour%s' % (h, h != 1 and "s" or "")
else:
return '%d min' % m
def main():
for line in fileinput.input():
if line.startswith('Total work done this week:'):
work_in_minutes = parse_time(line.split(':', 1)[1].strip())
assert work_in_minutes is not None
print line,
break
else:
return
work_days = 5.0
days_off = 0
while True:
avg_day_len = work_in_minutes / work_days
if avg_day_len >= 6 * 60 + 50:
break
days_off += 0.5
work_days -= 0.5
def fmt(f):
return ("%.1f" % f).replace(".0", "")
print " Days off: %s" % fmt(days_off)
print " Work days: %s" % fmt(work_days)
print " Average day length: %s" % format_time(avg_day_len)
if __name__ == '__main__':
main()
gtimelog-0.10.0/scripts/export-my-calendar.py 0000644 0001750 0001750 00000001232 12245325640 020204 0 ustar mg mg 0000000 0000000 #!/usr/bin/python2.3
"""
Experimental script to export GTimeLog data to iCalendar file.
"""
import os
import datetime
import gtimelog
# Hardcoded date range and output file
d1 = datetime.datetime(2005, 2, 1)
d2 = datetime.datetime.now()
outputfile = 'calendar.ics'
settings = gtimelog.Settings()
configdir = settings.get_config_dir()
datadir = settings.get_data_dir()
settings_file = settings.get_config_file()
if os.path.exists(settings_file):
settings.load(settings_file)
timelog = gtimelog.TimeLog(settings.get_timelog_file(),
settings.virtual_midnight)
window = timelog.window_for(d1, d2)
window.icalendar(open(outputfile, 'w'))
gtimelog-0.10.0/gtimelog.appdata.xml 0000664 0001750 0001750 00000001327 12602441616 016400 0 ustar mg mg 0000000 0000000
gtimelog.desktopCC0-1.0GPL-2.0GTimeLogUnobtrusively keep track of your time
GTimeLog is a small GTK+ app for keeping track of your time. Its main goal is to be as unobtrusive as possible.
https://mg.pov.lt/gtimelog/gtimelog-gtk3.pnghttps://mg.pov.lt/gtimelog/marius@gedmin.as
gtimelog-0.10.0/gtimelog.rst 0000664 0001750 0001750 00000010703 12602441616 014775 0 ustar mg mg 0000000 0000000 ========
gtimelog
========
--------------------------------
minimal time logging application
--------------------------------
:Author: Marius Gedminas
:Date: 2014-03-19
:Copyright: Marius Gedminas
:Version: 0.10
:Manual section: 1
SYNOPSYS
========
**gtimelog** [options]
DESCRIPTION
===========
``gtimelog`` provides a time tracking application to allow the user to
track what they work on during the day and how long they spend doing it.
Here's how it works: every day, when you arrive to work, start up ``gtimelog``
and type "arrived". Then start doing some activity (e.g. reading mail, or
working on a task). Whenever you stop doing an activity (either when you have
finished it, or when you switch to working on something else), type the name
of the activity into the ``gtimelog`` prompt. Try to use the same text if you
make several entries for an activity (history helps here — just use the up and
down arrow keys). The key principle is to name the activity after you've
stopped working on it, and not when you've started. Of course you can type
the activity name upfront, and just delay pressing the Enter key until you're
done.
There are two broad categories of activities: ones that count as work (coding,
planning, writing proposals or reports, answering work-related email), and
ones that don't (browsing the web for fun, reading personal email, chatting
with a friend on the phone for two hours, going out for a lunch break). To
indicate which activities are not work related add two asterisks to the
activity name::
lunch **
browsing slashdot **
napping on the couch **
If you want some activity (or non-activity) to be completely omitted from the
reports, use three asterisks::
break ***
``gtimelog`` displays all the things you've done today, calculates the total
time you spent working, and the total time you spent "slacking". It also
advises you how much time you still have to work today to get 8 hours of work
done. There are two basic views: one shows all the activities in
chronological order, with starting and ending times, while another groups all
entries with the same into one activity and just shows the total duration.
At the end of the day you can send off a daily report by choosing ``Report ->
Daily Report``. A mail program (Mutt in a terminal, unless you have changed
it in ``~/.gtimelog/gtimelogrc`` or ``~/.config/gtimelog/gtimelogrc``) will be
started with all the activities listed in it.
If you make a mistake and type in the wrong activity name, or just forget to
enter an activity, don't worry. ``gtimelog`` stores the time log in a simple
plain text file ``~/.gtimelog/timelog.txt`` (or
``~/.local/share/gtimelog/timelog.txt``). Every line contains a timestamp and
the name of the activity that was finished at the time. All other lines are
ignored, so you can add comments if you want to — just make sure no comment
begins with a timestamp. You do not have to worry about ``gtimelog``
overwriting your changes — ``gtimelog`` always appends entries at the end of
the file, and does not keep the log file open all the time. You do have to
worry about overwriting changes made by ``gtimelog`` with your editor — make
sure you do not enter any activities in ``gtimelog`` while you have
``timelog.txt`` open in a text editor.
OPTIONS
=======
--version
Show program's version number and exit.
-h, --help
Show this help message and exit.
--tray
Start minimized.
--sample-config
Write a sample configuration file to 'gtimelogrc.sample'.
--debug
Show debug information.
FILES
=====
| **~/.gtimelog/gtimelogrc**
| **~/.config/gtimelog/gtimelogrc**
Configuration file, see **gtimelogrc**\ (5).
| **~/.gtimelog/timelog.txt**
| **~/.local/share/gtimelog/timelog.txt**
Activity log file. Each line contains an ISO-8601 timestamp
(YYYY-MM-DD HH:MM:SS) followed by a ":" and a space, followed by the
activity name. Lines are sorted chronologically. Blank lines
separate days. Lines starting with ``#`` are comments.
| **~/.gtimelog/tasks.txt**
| **~/.local/share/gtimelog/tasks.txt**
Tasks to be shown in the task pane. Each line is either "task name"
or "category: task name", lines starting with a ``#`` are comments.
| **~/.gtimelog/remote-tasks.txt**
| **~/.local/share/gtimelog/remote-tasks.txt**
Tasks to be shown in the task pane, when ``remote_task_url`` is set.
Contains a downloaded copy of whatever is at that URL.
SEE ALSO
========
**gtimelogrc**\ (5)
gtimelog-0.10.0/docs/ 0000775 0001750 0001750 00000000000 12602442050 013354 5 ustar mg mg 0000000 0000000 gtimelog-0.10.0/docs/formats.rst 0000664 0001750 0001750 00000005204 12602441226 015566 0 ustar mg mg 0000000 0000000 Data Formats
============
These tools were designed for easy interoperability. There are two data
formats: one is used for timelog.txt, another is used for daily reports.
They are both human and machine readable, easy to edit, easy to parse.
timelog.txt
-----------
Here is a formal grammar::
file ::= (entry|day-separator|comment|old-style-comment)*
entry ::= timestamp ":" SPACE title NEWLINE
day-separator ::= NEWLINE
comment ::= "#" anything* NEWLINE
old-style-comment ::= anything* NEWLINE
title ::= anything*
*timestamp* is ``YYYY-MM-DD HH:MM`` with a single space between the date and
the time.
*anything* is any character except a newline.
*NEWLINE* is whatever Python considers it to be (i.e. CR LF or just LF).
GTimeLog adds a blank line between days. It ignores them when loading, but
this is likely to change in the future.
GTimeLog considers any lines not starting with a valid timestamp to be
comments. This is likely to change in the future, so please use '#' to
indicate real comments if you find you need them.
All lines should be sorted by time. Currently GTimeLog won't complain if
they're not, and it will sort them to compensate (but there are probably bugs
lurking with the computation of ``earliest_timestamp``).
GTimeLog doesn't re-write the file, it only appends to it.
Bugs:
- There's no place for timezones. If you want to track your travel times
with GTimeLog, you're gonna have a bad time.
- If you work late at night and change the value of ``virtual_midnight``,
old historical entries can be misinterpreted.
tasks.txt
---------
Task list is a text file, with one task per line. Empty lines and lines
starting with a '#' are ignored. Task names should consist of a group name
(project name, XP-style story, whatever), a colon, and a task name. Tasks will
be grouped. If there is no colon on a line, the task will be grouped under
"Other".
Daily reports
-------------
Daily reports look like this::
random text
random text
Entry title Duration
Entry title Duration
random text
Entry title Duration
Entry title Duration
random text
Formal grammar::
report ::= (entry|comment)*
entry ::= title space space duration newline
comment ::= anything* newline
title ::= anything*
duration ::= hours "," space minutes
| hours space minutes
| hours
| minutes
hours ::= number space "hour"
| number space "hours"
minutes ::= number space "min"
There is a convention that entries that include two asterisks in their titles
indicate slacking or pauses between work activities.
gtimelog-0.10.0/docs/index.rst 0000664 0001750 0001750 00000015143 12602441616 015230 0 ustar mg mg 0000000 0000000 GTimeLog Documentation
======================
Overview
========
Here's how it works: every day, when you arrive to work, start up
gtimelog and type "arrived \*\*". Then start doing some activity (e.g.
reading mail, or working on a task). Whenever you stop doing an activity
(either when you have finished it, or when you switch to working on
something else), type the name of the activity into the gtimelog prompt.
Try to use the same text if you make several entries for an activity.
History helps here -- type a prefix and then use the
Up/Down/PageUp/PageDown keys to choose the appropriate task.
They key principle here is to name the activity after you've
stopped working on it, and not when you've started. Of course you can
type the activity name upfront, and just delay pressing the Enter key
until you're done.
Work and rest
=============
There are two kinds of activities: ones that count as billable work
(coding, planning, writing proposals or reports, answering work-related
email), and ones that don't (browsing the web for fun, reading personal
email, chatting with a friend on the phone for two hours, going out for a
lunch break). To indicate which activities are not work related add two
asterisks to the activity name::
lunch **
browsing slashdot **
napping on the couch **
If you want some activity (or non-activity) to be completely omitted from
the reports, use three asterisks::
break ***
Categories
==========
Work activities can also include a category name, e.g.::
project1: fixing bug #1234
project1: refactoring tessts
project2: fixing buildbot
sysadmining: upgrading work laptop
The tasks are grouped by category in the reports.
Each entry may be additionally labelled with multiple
(space-separated) tags, e.g.::
project3: upgrade webserver -- sysadmin www front-end
project3: restart mail server -- sysadmin mail
Reports will then include an additional breakdown by tag: for each
tag, the total time spent in entries marked with that tag is shown.
Note that these times will (likely) not add up to the total reporting
time, as each entry may be marked with several tags.
Tags must be separated from the rest of the entry by `` -- ``, i.e.,
double-dash surrounded by spaces. Tags will *not* be shown in the
main UI pane.
Tasks Pane
==========
There's a Tasks pane that lists common tasks. Click on a task to transfer
it to the input box at the bottom. Saves typing.
Right-click anywhere in the task list and you'll get an option to edit the
tasks file.
Tasks are kept in a file named **tasks.txt** in the GTimeLog data
directory (**~/.local/share/gtimelog/** or, for backwards compatibility,
**~/.gtimelog/**). Feel free to edit it with any text editor of your
choice. GTimeLog will watch the modification time and reload it
automatically.
There's a hidden option in the config file for fetching the task list from
an Internet URL. This way you can use a wiki or something to keep a
shared task list. The downloaded task list is cached so you can work
offline. The right-click menu contains an option to fetch an updated version.
Display
=======
GTimeLog displays all the things you've done today, and calculates the
total time you spent working, the total time you spent "slacking", and the
sum total for convenience. It also advises you how much time you still
have to work today to get 8 hours of work done, and how much time is left
just to have spent a workday at the office (the number of hours in a day
is configurable in the config file).
There are three basic views: one shows all the activities in chronological
order, with starting and ending times; another groups all entries with the
same title into one activity and just shows the total duration; and a
third one groups all entries from the same categories into one line with
the total duration.
You can use the toolbar buttons or Alt+Left/Right to see what you did on
any previous day. Hit the Home button (or Alt+Home) to return to today's
view. Adding a new entry also automatically switches you back to today's
view.
Reports
=======
At the end of the day you can send off a daily report by choosing Report
-> Daily Report. A mail program (Mutt in a terminal, unless you have
changed it in the config file) will be started with all the activities
listed in it. My Mutt configuration lets me edit the report before
sending it.
Correcting mistakes
===================
If you forget to enter an activity, you can enter it after the fact by
prefixing it with a full time ("09:30 morning meeting") or a minute-offset
("-10 morning meeting"). Note that the new activity must still be after
the last entered event, or things will become confusing!
If you make a mistake and type in the wrong activity name, don't worry.
GTimeLog stores the time log in a simple plain text file. You can edit it
by choosing File -> Edit timelog.txt (or pressing Ctrl-E).
Every line contains a timestamp and the name of the activity that was
finished at the time. All other lines are ignored, so you can add comments
if you want to -- just make sure no comment begins with a timestamp. You do
not have to worry about GTimeLog overwriting your changes -- GTimeLog always
appends entries at the end of the file, and does not keep the log file open
all the time. You do have to worry about overwriting changes made by
GTimeLog with your editor -- make sure you do not enter any activities in
GTimeLog while you have timelog.txt open in a text editor.
GTimeLog watches the modification time and automatically reloads timelog.txt
if it notices you changed it.
Spreadsheets
============
If you want a more visual idea of how you spend your time you can export the
"Work/Slacking stats" to a spreadsheet and graph them. You get 4 values per
line: the date, how long after midnight you started work, and how long you
spent working and slacking that day, all times in fractional hours. Starting
from midnight makes it easy to read the graph scale as the time of day. Try
a bargraph with stacked values and both first row and column as labels.
Configuration
=============
You can change the configuration directory (**~/.config/gtimelog**) by
setting the environment variable **$GTIMELOG_HOME** to a non-empty string
naming the directory you want to use.
For backwards compatibility, **~/.gtimelog**, if it exists, is used instead
of the more standard **~/.config/gtimelog**.
Syncing
=======
GTimeLog has no built-in sync between multiple machines. You can put its
files into Dropbox and create a symlink.
Future plans
============
* A Preferences dialog
* Built-in reporting (i.e. remove rependency on Mutt)
* Better history browsing
* Internationalization
I've no specific time frame for these.
gtimelog-0.10.0/docs/gtimelog.png 0000664 0001750 0001750 00000137466 12602441226 015716 0 ustar mg mg 0000000 0000000 PNG
IHDR " -EK sBIT|d tEXtSoftware gnome-screenshot> IDATx|V{ !;62d L{L[6#@$!!{⦅