GithubHelp home page GithubHelp logo

nomeata / arbtt Goto Github PK

View Code? Open in Web Editor NEW
284.0 9.0 35.0 1.21 MB

arbtt, the automatic rule-based time-tracker

Home Page: http://arbtt.nomeata.de/

License: GNU General Public License v2.0

Haskell 89.38% CSS 0.85% HTML 5.71% JavaScript 0.30% Inno Setup 3.52% Nix 0.25%

arbtt's Introduction

arbtt, the Automatic Rule-Based Time Tracker

© 2009 Joachim Breitner [email protected]

The Automatic Rule-Based Time Tracker is a desktop daemon that runs in the background and, every minute, records what windows are open on your desktop, what their titles are, which one is active. The accompanied statistics program lets you derive information from this log file, i.e. what how much of your time have you been spending with e-mail, or what projects are your largest time wasters. The mapping from the raw window titles to sensible "tags" is done by a configuration file with an powerful syntax.

Installation

See http://arbtt.nomeata.de/#install

You also need to make sure that arbtt-capture is started with your X session:

  • If you use GNOME or KDE, you can copy the file arbtt-capture.desktop to ~/.config/autostart/. You might need to put the full path to arbtt-capture in the Exec line there, if you did not do a system wide installation.

  • If you use macOS, you can use launchd for this. Create a .plist file like the following (with the path changed to match where arbtt-capture is located in your system):

    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
    <plist version="1.0">
        <dict>
            <key>Label</key>
            <string>de.nomeata.arbtt</string>
            <key>Program</key>
            <string>/path/to/arbtt-capture</string>
            <key>RunAtLoad</key>
            <true/>
            <key>KeepAlive</key>
            <true/>
        </dict>
    </plist>

    and place it in ~/Library/LaunchAgents/de.nomeata.arbtt.plist. This will ensure arbtt-capture is started whenever you log in. To start the service without needing a new login, you can run launchctl load ~/Library/LaunchAgents/de.nomeata.arbtt.plist.

If you want to record samples at a different rate than one per minute, you will have to pass the --sample-rate parameter to arbtt-capture.

Documentation

Full documentation is now provided in the user manual in the doc/ directory. If you have the docbook xsl toolchain installed, you can generate the HTML documentation by entering "make" in that directory. Otherwise, you can use the online version of the User’s Guide. Beware that this will also reflect the latest development version.

Development

You are very welcome to help the development of arbtt. You can find the latest source at the git repository at https://github.com/nomeata/arbtt.

The issue tracker is hosted on GitHub: https://github.com/nomeata/arbtt/issues

User and Developer discussion happens on the arbtt mailing list, [email protected]. To subscribe to the list, visit http://lists.nomeata.de/mailman/listinfo/arbtt.

Some of my plans or ideas include:

  • A graphical viewer that allows you to explore the tags in an appealing, interactive way. Possibly based on the Charts haskell library.
  • Looking forward and backwards in time when writing rules. (Information is already passed to the categorizing function, but not exposed to the syntax).
  • $total_idle time, which is the maximum idle time until it is reset. This would allow the user to catch the idle times more exactly.
  • Rules based on time of day, to create tags for worktime, weekend, late at night. (Partially done)
  • Storing the current timezone in the tags, for the previous entry to be more to be more useful.
  • Storing the hostname, in case a user has several.
  • Statistics based on time, to visualize trends.
  • Possibly more data sources?

Any help cleaning, documenting or testing the current code is appreciated as well.

Creating the Windows Installer

The file setup.iss contains an installer script for Inno Setup and can be used to create the windows installer for arbtt. It can be used under wine. To build arbtt under Windows, you need to install the Haskell Platform. Because the Haskell Platform ships an older version of the w32api package from mingw, you also need to download w32api-3.14-mingw32-dev.tar.gz and copy at least the files include/psapi.h and lib/libpsapi.a over the files installed by the Haskell Platform. For the pcre-light package, you need to install the pcre library. Unless you run a German version of Windows, you’ll need to adjust the path to the pcre3.dll file in setup.iss. Install Inno Setup. Create the documentation (make -C doc) and configure arbtt with the --with-ISCC-flag:

$ wine runhaskell Setup.hs configure --with-ISCC='C:\Programme\Inno Setup 5\ISCC.exe'

again adjusting the path if you do not have a German version of Windows. This will put the version name into setup.iss and create the output file as dist/arbtt-setup-<version>.exe.

Download links:

arbtt's People

Contributors

al-maisan avatar astanin avatar bgamari avatar blaisorblade avatar ccoenen avatar cdepillabout avatar chandrahas77 avatar gwern avatar isovector avatar liskin avatar markus1189 avatar mkiefel avatar muneson avatar nomeata avatar pranitsh avatar privong avatar rejuvyesh avatar robertseaton avatar rvl avatar skraelings avatar sorki avatar tmiasko avatar vekhir avatar vitamintk avatar vrasneur avatar waldyrious avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

arbtt's Issues

Lock-Screen and machine off / standby

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


I would love to detect the debian lock-screen somehow. The problem is, i can't find it in the arbtt-dump. Inactivity nice, but i like the expliciitness and immediacy of "i have locked my screen".

Also, it would be amazing if "no data" or "the machine is turned off" could be exported somehow.

Doesn't seem to work well on OS X

I've been having some trouble using arbtt on OS X. I've installed it and set it for running on startup, but I suspect the sleep-wakeup cycles mess up with the program, resulting in data not being properly recorded. Here's the output of arbtt-dump:

$ arbtt-dump -l 10
2016-07-17 15:29:58 (964ms inactive):
2016-07-17 15:30:58 (3713ms inactive):
2016-07-17 15:31:59 (51ms inactive):
2016-07-17 15:32:59 (2ms inactive):
2016-07-17 15:33:59 (76ms inactive):
2016-07-17 16:02:32 (28294ms inactive):
2016-07-17 16:56:48 (88623ms inactive):
2016-07-17 17:51:03 (148952ms inactive):
2016-07-17 18:33:49 (12ms inactive):
2016-07-17 18:34:49 (68ms inactive):

@vrasneur any hints?

Track active workspace name.

Original report by nomeata (Bitbucket: nomeata, GitHub: nomeata).


Currently, I get

$ wmctrl -d
0  - DG: N/A  VP: N/A  WA: N/A  1
1  - DG: N/A  VP: N/A  WA: N/A  2
2  * DG: N/A  VP: N/A  WA: N/A  3
3  - DG: N/A  VP: N/A  WA: N/A  4
4  - DG: N/A  VP: N/A  WA: N/A  5
5  - DG: N/A  VP: N/A  WA: N/A  6

In that case, the variable $workspace should evaluate to 3 (other users have more informative names there).

Implementation: Add a field to CaptureData, change the serializaion in a backward-compatible manner and expose it as $workspace.

Encoding of arbtt-stats

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


Is the encoding of arbtt-stats output guaranteed? I am currently testing with the 0.6.1 version on windows, and i get some weird encoding errors when the window titles contain german umlauts (ä ü ö ß). I'm processing the output with another tool as you'll probably have guessed by now.

If the encoding is not specified, i'd like to request a mode where arbtt-stats always outputs a predictable encoding, for example utf-8.

If this has been changed between 0.6 and 0.9, please disregard this ticket.

improve time categorization directives

Original report by nomeata (Bitbucket: nomeata, GitHub: nomeata).


Felipe Sateler writes at http://bugs.debian.org/751280:

A very useful function would be that arbtt could tell me what I did
today, this week and this month. Unfortunately, this is not possible,
since categorize.cfg does not know about the current date. Moreover, the
TimeDiff type can only deal with spans of 99 hours long.

So, for full flexibility I think the following is necessary:

  1. Add a $now variable that represents the Date arbtt-stats is being
    run.
  2. Add a "week of month" function to Date.
  3. extend the TimeDiff spec to allow unlimited number of digits before
    the ':'.

Saludos

Semi-automatic tasks tracking?

Original report by Ilya Portnov (Bitbucket: iportnov, ).


It is not always possible to understand on which particular task I was working by data in arbtt log. For example, if i'm switching between several Jira issues, and I want to track how much time I spent on each of them. So the proposition is:

  • Add at least one new field into log format, smth like "task"; maybe it worth add some more, "project" or smth like that.
  • Add corresponding constructions to rules syntax, to analyze that new fields.
  • Add a way for artbtt-capture to be contacted by other programs and receive messages about current task. The simplest way is maybe that arbtt-capture should read some atom (say, ARBTT_TASK) set on the root window by other program. Or maybe dbus api. Or whatever.

arbtt-stats --intervals UTC?

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


It appears that the --intervals flag outputs UTC rather than local timezone. This in itself isn't a problem, but it should be documented if it is intended like this.

For example, i just ran the command:

> arbtt-stats --intervals Program:firefox
Program:firefox | 08/30/15 11:54:23 | 08/30/15 12:06:23 |   13m00s
Program:firefox | 08/30/15 12:51:24 | 08/30/15 12:54:24 |    4m00s    
Program:firefox | 08/30/15 12:58:42 | 08/30/15 12:59:42 |    2m00s

my local time is 15:01 (13:01 UTC +02:00 CEST) right now, and those are the intervals from just a few minutes ago.

Again: is this intentional or could it be related to something in my setup?

idle: undefined variable

Original report by Andrew Graham (Bitbucket: houdinifxtd, ).


for the last step in the install process, creating the .cfg file I run into an error when I run-

#!haskell

echo "{\$idle > 60 ==> tag inactive}" > ~/.arbtt/categorize.cfg

I get:
idle: Undefined variable.

I'm using a tcsh shell in Kubuntu 16

Exclude overlapping tag

Original report by Timothy (Bitbucket: timthelion, GitHub: timthelion).


Hello, I have an overlapping tag problem, I want to have a misc category Web, and then categories like News, VCS_Web, subuser_web (my personal homepage). I'd like these categories to not be counted as web, but when I tried to define Web with something like && ! tag =~ News I didn't get anywhere.

So what I want to be able to do is to create a group of tags that take precidence over a more general pattern. For example, if I have:

current window $title =~ [/GitHub.*/,/.*Bitbucket -.*/] ==> tag VCS_Web,
current window $title =~ [/.*Zprávy Google.*/,/.*Google News.*/,/.*CNN.*/,/.*News.*/,/.*New York Times.*/,/.*Business Insider.*/] ==> tag News,

I want to be able to then create a patern that matches this:

current window $title =~ [/.*Chromium/,/.*Mozilla Firefox.*/] ==> tag Web,

but not any of the previous patterns defined.

Add non-computer tasks to log?

Original report by Ken Mankoff (Bitbucket: mankoff, GitHub: mankoff).


Is it possible to add non-computer tasks to the log? For example, after a phone call run a command to say "the last 30minutes were spent on the phone"? This would allow me to us arbtt to track where I work on the computer, but also meetings and phone calls, etc.

Tags for today, this week, this month, and this year

Original report by utapyngo (Bitbucket: utapyngo, GitHub: utapyngo).


I want to be able to see how much time I have spent today, since midnight.

Currently I am using

#!haskell

$sampleage <= 13:00 ==> tag Today,

but it is not since midnight.

What I want is the $today variable:

#!haskell

$date == $today => tag Today,
week $date == week $today => tag This-week,
month $date == month $today => tag This-month,
year $date == year $today => tag This-year,

Windows compatibility lost

Original report by nomeata (Bitbucket: nomeata, GitHub: nomeata).


As noted in https://bitbucket.org/nomeata/arbtt/issues/26#comment-21960873, the latest version of arbtt does not compile on windows, as it uses the unix library in a few places, namely:

  • In src/stats-main.hs to get the size of the logfile (fileSize <$> getFileStatus (optLogFile flags))
  • In src/TimeLog.hs, to make sure the log file is readable only by the current user.
  • In tests/test.hs to set TZ=UTC so that the tests run with a determined timezone.

For these we need to decide whether

  • there is a portable way to do it, or
  • they can simply be skipped on windows (e.g. using CPP), or
  • they can be implemented differently on windows, and the right code to be selected with CPP.

Windows version crashes, whenever an elevated window is open

Original report by Anonymous.


I am running the last version for windows, which is 0.6.1 (from http://www.joachim-breitner.de/archive/arbtt/ ).

When a window with elevated rights is open on the desktop, arbtt-capture will crash. It does so with this message:

arbtt-capture.exe
OpenProcess: permission denied (Zugriff verweigert).

This can easily be reproduced like this:

Open services.msc (the windows tool that lets you view, start and stop your services). Opening it will prompt you to give it Administrator privileges. You will do so.

Start arbtt-capture.exe (or if it is running, wait for ~1 minute until it tries to capture another sample).

It will fail with the mentioned message 100% of the time.

Arbtt Open Process Permission Denied Issue

Original report by Aparna (Bitbucket: abhat123, ).


The issue occurs in Windows 7 whenever starting a system the prompt comes up with the error message "Open Process: Permission Denied(Access denied)".
It comes once in a day very intermittent issue.
Please see the attached screenshot. Looking forward for your response.

Fedora 22 cabal-install error: "Missing C library: Xss"

Original report by Raphael Guarilha (Bitbucket: guarilha, GitHub: guarilha).


I'm trying to install arbtt with cabal-install and I'm getting this error:

$ cabal install arbtt
Resolving dependencies...
Downloading arbtt-0.9.0.4...
Configuring arbtt-0.9.0.4...
Failed to install arbtt-0.9.0.4
Last 10 lines of the build log ( /home/USER/.cabal/logs/arbtt-0.9.0.4.log ):
Configuring arbtt-0.9.0.4...
setup-Cabal-1.18.1.5-x86_64-linux-ghc-7.8.4: Missing dependency on a foreign
library:
* Missing C library: Xss
This problem can usually be solved by installing the system package that
provides this library (you may need the "-dev" version). If the library is
already installed but in a non-standard location then you can use the flags
--extra-include-dirs= and --extra-lib-dirs= to specify where it is.
cabal: Error: some packages failed to install:
arbtt-0.9.0.4 failed during the configure step. The exception was:
ExitFailure 1

System information

$ uname -or
4.0.4-301.fc22.x86_64 GNU/Linux

$ lsb_release -irc
Distributor ID:	Fedora
Release:	22
Codename:	TwentyTwo

Installed ghc packages

$ dnf list installed | grep ghc
ghc.x86_64                              7.8.4-45.fc22                    @System
ghc-Cabal.x86_64                        1.18.1.5-45.fc22                 @System
ghc-Cabal-devel.x86_64                  1.18.1.5-45.fc22                 @System
ghc-GLURaw.x86_64                       1.4.0.1-4.fc22                   @System
ghc-GLURaw-devel.x86_64                 1.4.0.1-4.fc22                   @System
ghc-GLUT.x86_64                         2.5.1.1-4.fc22                   @System
ghc-GLUT-devel.x86_64                   2.5.1.1-4.fc22                   @System
ghc-HTTP.x86_64                         4000.2.10-1.fc22                 @System
ghc-HTTP-devel.x86_64                   4000.2.10-1.fc22                 @System
ghc-HUnit.x86_64                        1.2.5.2-34.fc22                  @System
ghc-HUnit-devel.x86_64                  1.2.5.2-34.fc22                  @System
ghc-OpenGL.x86_64                       2.9.2.0-4.fc22                   @System
ghc-OpenGL-devel.x86_64                 2.9.2.0-4.fc22                   @System
ghc-OpenGLRaw.x86_64                    1.5.0.0-4.fc22                   @System
ghc-OpenGLRaw-devel.x86_64              1.5.0.0-4.fc22                   @System
ghc-QuickCheck.x86_64                   2.7.6-1.fc22                     @System
ghc-QuickCheck-devel.x86_64             2.7.6-1.fc22                     @System
ghc-array.x86_64                        0.5.0.0-45.fc22                  @System
ghc-array-devel.x86_64                  0.5.0.0-45.fc22                  @System
ghc-async.x86_64                        2.0.1.5-1.fc22                   @System
ghc-async-devel.x86_64                  2.0.1.5-1.fc22                   @System
ghc-attoparsec.x86_64                   0.11.3.4-1.fc22                  @System
ghc-attoparsec-devel.x86_64             0.11.3.4-1.fc22                  @System
ghc-base.x86_64                         4.7.0.2-45.fc22                  @System
ghc-base-devel.x86_64                   4.7.0.2-45.fc22                  @System
ghc-binary.x86_64                       0.7.1.0-45.fc22                  @System
ghc-binary-devel.x86_64                 0.7.1.0-45.fc22                  @System
ghc-bytestring.x86_64                   0.10.4.0-45.fc22                 @System
ghc-bytestring-devel.x86_64             0.10.4.0-45.fc22                 @System
ghc-case-insensitive.x86_64             1.1.0.3-1.fc22                   @System
ghc-case-insensitive-devel.x86_64       1.1.0.3-1.fc22                   @System
ghc-compiler.x86_64                     7.8.4-45.fc22                    @System
ghc-containers.x86_64                   0.5.5.1-45.fc22                  @System
ghc-containers-devel.x86_64             0.5.5.1-45.fc22                  @System
ghc-css-text.x86_64                     0.1.2.1-1.fc22                   @System
ghc-css-text-devel.x86_64               0.1.2.1-1.fc22                   @System
ghc-deepseq.x86_64                      1.3.0.2-45.fc22                  @System
ghc-deepseq-devel.x86_64                1.3.0.2-45.fc22                  @System
ghc-directory.x86_64                    1.2.1.0-45.fc22                  @System
ghc-directory-devel.x86_64              1.2.1.0-45.fc22                  @System
ghc-doc-index.x86_64                    7.8.4-45.fc22                    @System
ghc-fgl.x86_64                          5.5.0.1-4.fc22                   @System
ghc-fgl-devel.x86_64                    5.5.0.1-4.fc22                   @System
ghc-filepath.x86_64                     1.3.0.2-45.fc22                  @System
ghc-filepath-devel.x86_64               1.3.0.2-45.fc22                  @System
ghc-ghc.x86_64                          7.8.4-45.fc22                    @System
ghc-ghc-devel.x86_64                    7.8.4-45.fc22                    @System
ghc-hashable.x86_64                     1.2.2.0-1.fc22                   @System
ghc-hashable-devel.x86_64               1.2.2.0-1.fc22                   @System
ghc-haskeline.x86_64                    0.7.1.2-45.fc22                  @System
ghc-haskeline-devel.x86_64              0.7.1.2-45.fc22                  @System
ghc-haskell-platform-devel.x86_64       2014.2.0.0.2-4.fc22              @System
ghc-haskell-src.x86_64                  1.0.1.6-4.fc22                   @System
ghc-haskell-src-devel.x86_64            1.0.1.6-4.fc22                   @System
ghc-haskell2010.x86_64                  1.1.2.0-45.fc22                  @System
ghc-haskell2010-devel.x86_64            1.1.2.0-45.fc22                  @System
ghc-haskell98.x86_64                    2.0.0.3-45.fc22                  @System
ghc-haskell98-devel.x86_64              2.0.0.3-45.fc22                  @System
ghc-hoopl.x86_64                        3.10.0.1-45.fc22                 @System
ghc-hoopl-devel.x86_64                  3.10.0.1-45.fc22                 @System
ghc-hpc.x86_64                          0.6.0.1-45.fc22                  @System
ghc-hpc-devel.x86_64                    0.6.0.1-45.fc22                  @System
ghc-hscolour.x86_64                     1.20.3-11.fc22                   @System
ghc-hscolour-devel.x86_64               1.20.3-11.fc22                   @System
ghc-html.x86_64                         1.0.1.2-31.fc22                  @System
ghc-html-devel.x86_64                   1.0.1.2-31.fc22                  @System
ghc-libraries.x86_64                    7.8.4-45.fc22                    @System
ghc-mtl.x86_64                          2.1.3.1-1.fc22                   @System
ghc-mtl-devel.x86_64                    2.1.3.1-1.fc22                   @System
ghc-network.x86_64                      2.4.2.3-1.fc22                   @System
ghc-network-devel.x86_64                2.4.2.3-1.fc22                   @System
ghc-old-locale.x86_64                   1.0.0.6-45.fc22                  @System
ghc-old-locale-devel.x86_64             1.0.0.6-45.fc22                  @System
ghc-old-time.x86_64                     1.1.0.2-45.fc22                  @System
ghc-old-time-devel.x86_64               1.1.0.2-45.fc22                  @System
ghc-parallel.x86_64                     3.2.0.4-1.fc22                   @System
ghc-parallel-devel.x86_64               3.2.0.4-1.fc22                   @System
ghc-parsec.x86_64                       3.1.5-1.fc22                     @System
ghc-parsec-devel.x86_64                 3.1.5-1.fc22                     @System
ghc-pretty.x86_64                       1.1.1.1-45.fc22                  @System
ghc-pretty-devel.x86_64                 1.1.1.1-45.fc22                  @System
ghc-primitive.x86_64                    0.5.2.1-1.fc22                   @System
ghc-primitive-devel.x86_64              0.5.2.1-1.fc22                   @System
ghc-process.x86_64                      1.2.0.0-45.fc22                  @System
ghc-process-devel.x86_64                1.2.0.0-45.fc22                  @System
ghc-random.x86_64                       1.0.1.1-29.fc22                  @System
ghc-random-devel.x86_64                 1.0.1.1-29.fc22                  @System
ghc-regex-base.x86_64                   0.93.2-31.fc22                   @System
ghc-regex-base-devel.x86_64             0.93.2-31.fc22                   @System
ghc-regex-compat.x86_64                 0.95.1-37.fc22                   @System
ghc-regex-compat-devel.x86_64           0.95.1-37.fc22                   @System
ghc-regex-posix.x86_64                  0.95.2-32.fc22                   @System
ghc-regex-posix-devel.x86_64            0.95.2-32.fc22                   @System
ghc-scientific.x86_64                   0.3.3.1-1.fc22                   @System
ghc-scientific-devel.x86_64             0.3.3.1-1.fc22                   @System
ghc-split.x86_64                        0.2.2-5.fc22                     @System
ghc-split-devel.x86_64                  0.2.2-5.fc22                     @System
ghc-stm.x86_64                          2.4.2-28.fc22                    @System
ghc-stm-devel.x86_64                    2.4.2-28.fc22                    @System
ghc-syb.x86_64                          0.4.1-1.fc22                     @System
ghc-syb-devel.x86_64                    0.4.1-1.fc22                     @System
ghc-tagsoup.x86_64                      0.13.3-1.fc22                    @System
ghc-tagsoup-devel.x86_64                0.13.3-1.fc22                    @System
ghc-template-haskell.x86_64             2.9.0.0-45.fc22                  @System
ghc-template-haskell-devel.x86_64       2.9.0.0-45.fc22                  @System
ghc-terminfo.x86_64                     0.4.0.0-45.fc22                  @System
ghc-terminfo-devel.x86_64               0.4.0.0-45.fc22                  @System
ghc-text.x86_64                         1.1.1.3-1.fc22                   @System
ghc-text-devel.x86_64                   1.1.1.3-1.fc22                   @System
ghc-tf-random.x86_64                    0.5-2.fc22                       @System
ghc-tf-random-devel.x86_64              0.5-2.fc22                       @System
ghc-time.x86_64                         1.4.2-45.fc22                    @System
ghc-time-devel.x86_64                   1.4.2-45.fc22                    @System
ghc-transformers.x86_64                 0.3.0.0-45.fc22                  @System
ghc-transformers-devel.x86_64           0.3.0.0-45.fc22                  @System
ghc-unix.x86_64                         2.7.0.1-45.fc22                  @System
ghc-unix-devel.x86_64                   2.7.0.1-45.fc22                  @System
ghc-unordered-containers.x86_64         0.2.4.0-1.fc22                   @System
ghc-unordered-containers-devel.x86_64   0.2.4.0-1.fc22                   @System
ghc-utf8-string.x86_64                  0.3.8-1.fc22                     @System
ghc-utf8-string-devel.x86_64            0.3.8-1.fc22                     @System
ghc-vector.x86_64                       0.10.9.1-1.fc22                  @System
ghc-vector-devel.x86_64                 0.10.9.1-1.fc22                  @System
ghc-xhtml.x86_64                        3000.2.1-45.fc22                 @System
ghc-xhtml-devel.x86_64                  3000.2.1-45.fc22                 @System
ghc-xss-sanitize.x86_64                 0.3.5.4-1.fc22                   @System
ghc-xss-sanitize-devel.x86_64           0.3.5.4-1.fc22                   @System
ghc-zlib.x86_64                         0.5.4.1-30.fc22                  @System
ghc-zlib-devel.x86_64                   0.5.4.1-30.fc22                  @System

classification as idle should start when idle begins, not when it reaches a threshold

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


I created a demo-logfile to illustrate my point.

I'm tagging activity / idle with these three rules:

$idle > 500 ==> tag inactive,
$idle > 500 ==> tag Activity:inactive,
tag Activity:active,

the first is the "special" tag used by arbtt internally, the second and third are what i'm actually using to draw active vs. inactive bars in my visualisation.

> dist\build\arbtt-dump\arbtt-dump.exe -f idle.log
2015-10-15 12:40:03 (15ms inactive):
... a few samples ...
2015-10-15 12:45:03 (15ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start
2015-10-15 12:46:03 (78ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: *C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start

[this is when i went away]

2015-10-15 12:47:03 (50217ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start
2015-10-15 12:48:03 (110231ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start
2015-10-15 12:49:03 (170229ms inactive):
-------8<-------
time passes
-------8<-------
2015-10-15 12:54:03 (470250ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start
2015-10-15 12:55:03 (530248ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start
2015-10-15 12:56:03 (590261ms inactive):
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Program Manager
    ( ) \Device\HarddiskVolume2\Tools\cmder\vendor\conemu-maximus5\ConEmu.exe: Cmder
    (*) \Device\HarddiskVolume2\Program Files (x86)\Notepad++\notepad++.exe: C:\temp\idletest.txt - Notepad++
    ( ) \Device\HarddiskVolume2\Windows\explorer.exe: Start

arbtt-stats outputs:

C:\...> dist\build\arbtt-stats\arbtt-stats.exe --logfile idle.log --intervals "inactive" --also-inactive
Intervals for category inactive
===============================
_____Tag_|______________From_|_____________Until_|_Duration_
inactive | 10/15/15 10:55:03 | 10/15/15 11:40:03 |   45m00s


C:\...> dist\build\arbtt-stats\arbtt-stats.exe --logfile idle.log --intervals "Activity:" --also-inactive
Intervals for category "Activity"
=================================
_____Tag_|______________From_|_____________Until_|_Duration_
  active | 10/15/15 10:40:03 | 10/15/15 10:55:03 |   15m00s
inactive | 10/15/15 10:55:03 | 10/15/15 11:40:03 |   45m00s

It categorizes all samples starting from 12:55 (10:55+02:00 timezone) as inactive. This is when (as you can tell from the dump), when $idle goes above 500(,000ms).

I would like to argue, that classification as idle would have to start at 12:47:03, or - even better - at 12:46:13 (12:47:03 minus its established 50217ms of inactivity). I know that classification looks only at a sample and certainly not ahead. This would also mean, that the state of a sample's classification is in flux until the idle time has passed.

Here's a small comparison of a timeline by arbtt (top) and manictime (bottom). Manictime has a minute grid, and mt does not, so slight differences are in order. I marked six instances where the machine got idle and where arbtt will classify idle time much later than i'd like it to be. MT has the approach of reclassifiying backwards to the point when the idle started.

mt-vs-arbtt-idle.png

If there is any workaround to achieve the same thing, I'll happily use that.

arbtt-stats error

Original report by Jayesh Gupta (Bitbucket: rejuvyesh, GitHub: rejuvyesh).


I always the folowing error:

arbtt-stats: Data.Binary.Get.runGetState at position 168: demandInput: not enough bytes

I have attached my categorize.cfg as well.

I tried using arbtt-dump as well to recover, but the data seems to be corrupted.

I am just wing awesome-em without any display manager, if it helps.

Dump to JSON inverts the program and title fields

Original report by Adrien Beau (Bitbucket: adrienbeau, GitHub: adrienbeau).


Dumping the log in the JSON format inverts two fields. Example:

#!json

{
  "active": false,
  "program": "nomeata / arbtt / issues / new — Bitbucket - Mozilla Firefox",
  "title": "Navigator"
}

Second field should be title, third field should be program.

Versions tested:

  • arbtt 0.9.1 (unreleased) under Windows
  • arbtt 0.9.0.7 under Ubuntu 16.04

Steps to reproduce:

  • Have a log
  • Run arbtt-dump -t show -l 1

data recovery possible?

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


Hi!

I recently had a series of system crashes due to faulty hardware. It appears that my captus.log has been corrupted each time. When I try to run arbtt-stats on it, it will fail with these messages at some point.

I believe there should be further correct entries at the end of the log, at least I hope there are more entries after the faulty section. My problem is, that I noticed the problem a few days later, when I ran arbtt-stats. The capture itself seemed to hum along just fine.

Here's the output of arbtt-stats:

$ arbtt-stats --logfile ~/.arbtt/capture-2017-11-29.log
Processing data [==================================================>......]  89%
arbtt-stats: Unsupported TimeLogEntry version tag 0
CallStack (from HasCallStack):
  error, called at src/Data.hs:90:15 in main:Data

Buildung in Ubuntu 17.10 fails (for me?)

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


I currently can't build arbtt in ubuntu 17.10, I am not really familiar with haskell, so I can't make heads or tails out of this output. I think I caught all the required dependencies. I'm not even sure how to proceed looking for the underlying error. Here's the output from cabal install:

$ cabal clean
cleaning...
$ cabal install
Resolving dependencies...
Configuring arbtt-0.10.0.1...
Building arbtt-0.10.0.1...
Failed to install arbtt-0.10.0.1
Build log ( /home/---/.cabal/logs/arbtt-0.10.0.1.log ):
cabal: Entering directory '.'
Configuring arbtt-0.10.0.1...
Building arbtt-0.10.0.1...
Preprocessing executable 'arbtt-capture' for arbtt-0.10.0.1...

src/Data/Binary/StringRef.hs:1:77: warning:
    -XOverlappingInstances is deprecated: instead use per-instance pragmas OVERLAPPING/OVERLAPPABLE/OVERLAPS
[ 1 of 13] Compiling System.Locale.SetLocale ( dist/build/arbtt-capture/arbtt-capture-tmp/System/Locale/SetLocale.hs, dist/build/arbtt-capture/arbtt-capture-tmp/System/Locale/SetLocale.o )
[ 2 of 13] Compiling Paths_arbtt      ( dist/build/autogen/Paths_arbtt.hs, dist/build/arbtt-capture/arbtt-capture-tmp/Paths_arbtt.o )
[ 3 of 13] Compiling LockFile         ( src/LockFile.hs, dist/build/arbtt-capture/arbtt-capture-tmp/LockFile.o )
[ 4 of 13] Compiling Data.MyText      ( src/Data/MyText.hs, dist/build/arbtt-capture/arbtt-capture-tmp/Data/MyText.o )
[ 5 of 13] Compiling Data.Binary.StringRef ( src/Data/Binary/StringRef.hs, dist/build/arbtt-capture/arbtt-capture-tmp/Data/Binary/StringRef.o )
[ 6 of 13] Compiling Data             ( src/Data.hs, dist/build/arbtt-capture/arbtt-capture-tmp/Data.o )
[ 7 of 13] Compiling DumpFormat       ( src/DumpFormat.hs, dist/build/arbtt-capture/arbtt-capture-tmp/DumpFormat.o )
[ 8 of 13] Compiling TimeLog          ( src/TimeLog.hs, dist/build/arbtt-capture/arbtt-capture-tmp/TimeLog.o )

src/TimeLog.hs:75:48: warning: [-Wdeprecations]
    In the use of ‘runGetState’ (imported from Data.Binary.Get):
    Deprecated: "Use runGetIncremental instead. This function will be removed."

src/TimeLog.hs:91:48: warning: [-Wdeprecations]
    In the use of ‘runGetState’ (imported from Data.Binary.Get):
    Deprecated: "Use runGetIncremental instead. This function will be removed."

src/TimeLog.hs:120:32: warning: [-Wdeprecations]
    In the use of ‘runGetState’ (imported from Data.Binary.Get):
    Deprecated: "Use runGetIncremental instead. This function will be removed."

src/TimeLog.hs:122:31: warning: [-Wdeprecations]
    In the use of ‘runGetState’ (imported from Data.Binary.Get):
    Deprecated: "Use runGetIncremental instead. This function will be removed."
[ 9 of 13] Compiling UpgradeLog1      ( src/UpgradeLog1.hs, dist/build/arbtt-capture/arbtt-capture-tmp/UpgradeLog1.o )
[10 of 13] Compiling CommonStartup    ( src/CommonStartup.hs, dist/build/arbtt-capture/arbtt-capture-tmp/CommonStartup.o )
[11 of 13] Compiling Capture.X11      ( src/Capture/X11.hs, dist/build/arbtt-capture/arbtt-capture-tmp/Capture/X11.o )

src/Capture/X11.hs:16:35: error:
    Module ‘Graphics.X11.XScreenSaver’ does not export ‘getXIdleTime’
cabal: Leaving directory '.'
cabal: Error: some packages failed to install:
arbtt-0.10.0.1 failed during the building phase. The exception was:
ExitFailure 1

(the mentioned logfile contains the exact same output as the terminal)

arbtt requires Administrator rights under Windows

Original report by Adrien Beau (Bitbucket: adrienbeau, GitHub: adrienbeau).


When I run arbtt-setup-0.9.1.exe I get a prompt asking me for an Administrator password, which I do not have, and will not have. This often happens in large organizations (where I currently work), and is getting more and more common.

It would be nice to have some kind of portable arbtt distribution, which can be simply unzipped and run in-place. (This is how I use several other tools.) I tried using 7-zip to peek at the contents of the installer, unfortunately it fails to open this particular executable file.

Does arbtt require Administrator rights only for installation (e.g. to set up the daemon), or does it also require them to be able to capture running program data (e.g. windows titles)? Ideally, I would just need to double-click the daemon executable to start logging. I don't mind doing that every time I start the computer.

Change title with reg exp

Original report by Leonid Bond (Bitbucket: LeonidMew, GitHub: LeonidMew).


Is it possible to change title? In arbtt-stats I receive following titles, but I want to use them as tag after changing a little:

Web:RescueTime___Time_management_software_for_staying_productive_and_happy_in_the_modern_workplace_-_Mozilla_Firefox | 1m00s | 1.79

How to change __ to _ and remove _-_Mozilla_Firefox in config file?

arbtt-stats --intervals time format

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


This one is also related to he --intervals command. The output appears to be american date format "Month/Day/Year Hour:Minute:Second"

Program:firefox | 08/30/15 12:58:42 | 08/30/15 12:59:42 |    2m00s

I think there should be a way to get this info in local format or even better in iso8601 format.

"2012-04-21T18:25:43-05:00"

This has two advantages: it sorts nicely and more importantly, it also contains the timezone.

To prevent breaking existing workflows, this should probably be an option or a flag.

include command to split/rotate logs

Original report by nomeata (Bitbucket: nomeata, GitHub: nomeata).


Felipe Sateler wirtes at http://bugs.debian.org/751279:

Hi,

Arbtt log files can become relatively large, and arbtt can take some
time to parse it. I have a file containing a bit over 3 years of
samples, and it takes a while to process:

% time arbtt-stats -i --logfile capture.log.all
<snip>
arbtt-stats -i --logfile capture.log.all  20.55s user 0.06s system 100% cpu 20.610 total

Using the right invocations of arbtt-dump, arbtt-import and grep, it is
possible to split the log into multiple files, but it is cumbersome.

I'm not sure what exactly is the best way to improve this.

The simplest solution would be to provide a rotate command that (for
example) would break the log by year and store each year in a different
file, leaving the current year as the default capture file.

A (maybe) better solution would be to convert the logfile into a logdir,
where logs are stored by year-month, and then add a flag to arbtt-stats
to specify start date, so that older logs are not parsed. This would of
course mean more work.

Add left-aligned option for Tag column in arbtt-stats output

Original report by Anonymous.


Currently the Tag column is right-aligned.

Statistics for category "day"
=============================
__________Tag_|______Time_|_Percentage_
day:Wednesday | 22h13m00s |      22.16
 day:Saturday | 19h10m00s |      19.12
   day:Monday | 16h02m00s |      15.99
   day:Sunday | 12h07m00s |      12.08
 day:Thursday | 11h40m00s |      11.64
  day:Tuesday | 10h28m00s |      10.44
   day:Friday |  8h36m00s |       8.58

Is it possible to make the Tag column left-aligned?

Statistics for category "day"
=============================
__________Tag_|______Time_|_Percentage_
day:Wednesday | 22h13m00s |      22.16
day:Saturday  | 19h10m00s |      19.12
day:Monday    | 16h02m00s |      15.99
day:Sunday    | 12h07m00s |      12.08
day:Thursday  | 11h40m00s |      11.64
day:Tuesday   | 10h28m00s |      10.44
day:Friday    |  8h36m00s |       8.58

arbtt-stats output of duration

Original report by amenthes (Bitbucket: amenthes, GitHub: amenthes).


When i run arbtt-stats, i get a table like this one:

 ./dist/build/arbtt-stats/arbtt-stats --intervals Program: --logfile tests/gap-handling.log --categorizefile tests/gap-handling-withidle.cfg
Intervals for category "Program"                                                                                          
================================
__________________Tag_|______________From_|_____________Until_|__Duration_
gnome-terminal-server | 09/20/15 14:24:03 | 09/20/15 14:25:12 |     2m09s
            Navigator | 09/20/15 14:25:22 | 09/20/15 14:50:41 |    25m29s
            Navigator | 09/20/15 14:55:31 | 09/20/15 14:55:31 |       10s
gnome-terminal-server | 09/20/15 14:55:41 | 09/20/15 18:52:07 |  3h56m36s
            Navigator | 09/20/15 18:52:17 | 09/20/15 18:53:45 |     1m38s
gnome-terminal-server | 09/20/15 18:53:55 | 09/20/15 18:54:15 |       30s

The duration does not seem to fit to the interval reported. In most cases, it's 10 seconds longer (which may be intentional, this is my recording interval, and it's probably filling the "gap"). But every once in a while the output does not match at all.

The first line in the table is 24:03 to 25:12, which is 1 minute 9 seconds, or maybe 1 minute 19 seconds including the trailing piece of the sample. But it is reported as 2 minutes 09 seconds. This line is wrong in a way i don't understand. This is why i'm labeling this as a bug.

The third line is reads from same timestamp to same timestamp, but then reports a duration of 10 seconds. Now, this may be intentional, but i still think that the "until" timestamp should be displaying the estimated end in this case.

stats-main compile issue with progressbar

Original report by George C. Privon (Bitbucket: privong, GitHub: privong).


I have been experiencing failures when trying to build arbtt 0.10, that seem to be related to the progress bar:

$ cabal install arbtt
[lots of warnings about package deprecations]

src/stats-main.hs:192:13: error:
    • Couldn't match expected type ‘Integer -> String’
                  with actual type ‘[Char]’
    • The function ‘mkProgressBar’ is applied to five arguments,
      but its type ‘Label -> Label -> Integer -> Progress -> [Char]’
      has only four
      In the second argument of ‘($)’, namely
        ‘mkProgressBar
           (msg "Processing data")
           percentage
           (fromIntegral width)
           (fromIntegral b)
           (fromIntegral size)’
      In a stmt of a 'do' block:
        hPutStr stderr
          $ mkProgressBar
              (msg "Processing data")
              percentage
              (fromIntegral width)
              (fromIntegral b)
              (fromIntegral size)
    |
192 |             mkProgressBar (msg "Processing data") percentage (fromIntegral width) (fromIntegral b) (fromIntegral size)
    |             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
cabal: Leaving directory '/tmp/cabal-tmp-2696/arbtt-0.10'
cabal: Error: some packages failed to install:
arbtt-0.10-AXw5Tg7ClsH7JPA9da7BvF failed during the building phase. The
exception was:
ExitFailure 1

I this this may be related to an upstream change in the progressbar package? I noticed a seemingly related bug in the bytestring-progress package: acw/bytestring-progress#8
But I'm not sure which specific upstream package changed.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.