• ¡Welcome to the WhatPulse Forums!
Hello There, Guest! Login Register


Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Title: [Feature Req] Expose stats via command line
Threaded Mode
#1
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. ;]
 
Reply
#2
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.
 
Reply
#3
Ahh, very nice. Will (ab)use this for my needs. Thanks :]
 
Reply
#4
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.
 
Reply
#5
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. ;-)
 
Reply
#6
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?
 
Reply
#7
(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.
 
Reply
  


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:


Browsing: 1 Guest(s)