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


Post Reply 
 
Thread Rating:
  • 1 Votes - 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.)
Post: #1
[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

Rationale
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. ;]
Find all posts by this user
Quote this message in a reply
03-14-2014, 05:34 PM
Post: #2
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
03-14-2014, 05:38 PM
Post: #3
RE: [Feature Req] Expose stats via command line
Ahh, very nice. Will (ab)use this for my needs. Thanks :]
Find all posts by this user
Quote this message in a reply
03-24-2014, 04:45 AM
Post: #4
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.
Find all posts by this user
Quote this message in a reply
03-24-2014, 10:54 AM
Post: #5
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. ;-)
Visit this user's website Find all posts by this user
Quote this message in a reply
03-24-2014, 05:03 PM (This post was last modified: 03-24-2014 07:11 PM by montythefish.)
Post: #6
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?
Find all posts by this user
Quote this message in a reply
03-25-2014, 12:37 PM
Post: #7
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.
Visit this user's website Find all posts by this user
Quote this message in a reply
Post Reply 


Possibly Related Threads...
Thread: Author Replies: Views: Last Post
  Recording feature Creator13 1 1,115 06-12-2015 05:05 AM
Last Post: Inquizitor
  More Geek Window stats Robby250 0 1,244 02-03-2015 03:22 PM
Last Post: Robby250
  Keys per Second Feature AzraeL1337 3 4,850 09-10-2014 11:21 AM
Last Post: smitmartijn
  Live stats text output Staiain 2 4,851 04-26-2014 06:34 AM
Last Post: Staiain
  Count stats when not logged in Redirect Left 8 6,410 03-01-2014 09:15 PM
Last Post: abpop
  Stats progress andromea 3 3,902 12-13-2013 05:41 PM
Last Post: Tozzi
Thumbs Up System Tray Stats Xander641 3 4,585 11-18-2013 02:42 PM
Last Post: SearchBuzz
  Whatpulse 2.0.1 old stats AzoraX 3 6,153 01-01-2013 12:30 PM
Last Post: smitmartijn
  Local stats backup/restore Pichu0102 1 3,668 12-30-2012 10:02 AM
Last Post: smitmartijn
  Geek Window stats 2.0 WOWVern 2 4,771 12-23-2012 12:58 AM
Last Post: WOWVern

Forum Jump:


User(s) browsing this thread: 1 Guest(s)