WhatPulse Forums » Feature requests » Client software v » [Feature Req] Expose stats via command line Welcome back, Guest.

Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
[Feature Req] Expose stats via command line
03-14-2014, 01:43 AM, (This post was last modified: 03-14-2014, 01:49 AM by SnoFox.)
[Feature Req] Expose stats via command line
Hi there,

Feature Request
Expose the geek window counts on the command line via switches in the binary

Integration with existing information display applications, such as Geektool (Mac OS X) and Conky (Linux).

Example execution
$ ./whatpulse --getstat LocalKeys
LocalKeys: 1083
$ ./whatpulse --getstat LocalKeys,TotalKeys
LocalKeys 1083
TotalKeys 39935764

Other thoughts
This basic form, or even a more basic form is all the information a Mac/Linux user would need to awk out what they want and throw it into Geektool.

Edit: Er ... Alternatively I can just hit your Web API with a little NodeJS script.

I found out that exists a few seconds ago. I'm going to leave this post here though, just because, y'know, hitting your API every few seconds for Conky sounds like a load you guys don't want. ;]
03-14-2014, 05:34 PM,
RE: [Feature Req] Expose stats via command line
Have a look at the open sqlite database the client uses. It's a bit of an underlit feature because I'm still working on some examples for developers, but the tables 'settings' and 'unpulsed_stats' will be of interest for you.

Also, querying the API is pretty useless, as 1) it has an hourly cache and 2) it only changes when you pulse.
03-14-2014, 05:38 PM,
RE: [Feature Req] Expose stats via command line
Ahh, very nice. Will (ab)use this for my needs. Thanks :]
03-24-2014, 04:45 AM,
RE: [Feature Req] Expose stats via command line
I'm trying to open whatpulse.db in ~/.local/share/data/WhatPulse/ but it is apparently either encrypted or not a database. I can, however, open whatpulse.db.backup. Is this intentional? If so, how are we supposed to access the database? I understand you probably don't want us to fake stats, but the way you said "Have a look at the open sqlite database the client uses" makes me think I'm missing something and I should be able to get current stats from the database.
03-24-2014, 10:54 AM,
RE: [Feature Req] Expose stats via command line
It's not encrypted and you should be able to open it via sqlite itself just fine. Make sure you have the whatpulse.db file, not the whatpulse.wpw file.

whatpulse.wpw is the encrypted file in which the pulse stats reside. Any stats you're going to 'fake' inside the whatpulse.db are local only...so if you want to have fun that way, go ahead. ;-)
03-24-2014, 05:03 PM, (This post was last modified: 03-24-2014, 07:11 PM by montythefish.)
RE: [Feature Req] Expose stats via command line
Alright I got this figured out for the most part. How often does whatpulse update the whatpulse.db? I'd like to check it as often as possible, but it doesn't seem to change more often than every 60 seconds. Can I force whatpulse to update the database more often?
03-25-2014, 12:37 PM,
RE: [Feature Req] Expose stats via command line
(03-24-2014, 05:03 PM)montythefish Wrote: Can I force whatpulse to update the database more often?

Nope. That has to do with caching and database operations, which we've limited to spare disk operations.

Possibly Related Threads…
Thread Author Replies Views Last Post
  Recording feature Creator13 1 2,611 06-12-2015, 05:05 AM
Last Post: Inquizitor
  More Geek Window stats Robby250 0 2,626 02-03-2015, 03:22 PM
Last Post: Robby250
  Keys per Second Feature AzraeL1337 3 7,329 09-10-2014, 11:21 AM
Last Post: smitmartijn
  Live stats text output Staiain 2 7,310 04-26-2014, 06:34 AM
Last Post: Staiain
  Count stats when not logged in Redirect Left 8 11,346 03-01-2014, 09:15 PM
Last Post: abpop
  Stats progress andromea 3 6,225 12-13-2013, 05:41 PM
Last Post: Tozzi
Thumbs Up System Tray Stats Xander641 3 7,168 11-18-2013, 02:42 PM
Last Post: SearchBuzz
  Whatpulse 2.0.1 old stats AzoraX 3 8,882 01-01-2013, 12:30 PM
Last Post: smitmartijn
  Local stats backup/restore Pichu0102 1 5,441 12-30-2012, 10:02 AM
Last Post: smitmartijn
  Geek Window stats 2.0 WOWVern 2 6,761 12-23-2012, 12:58 AM
Last Post: WOWVern

Forum Jump:

Users browsing this thread: 2 Guest(s)