Bitcoin Forum

Bitcoin => Project Development => Topic started by: Eremite on July 28, 2012, 10:21:20 AM



Title: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: Eremite on July 28, 2012, 10:21:20 AM
I have a simple AutoIt script that generates a flat HTML file for checking on your status at deepbit.net without having to log in.  I prefer not having to type my password in on public computers, plus if you have people helping you mine, they can see their status without having to log into your account.

Source is below, no precompiled executables.

The AutoIt Code:  http://pastebin.com/W2Yw4jNv (http://pastebin.com/W2Yw4jNv)
The CSS Code: http://pastebin.com/9QHTNu84 (http://pastebin.com/9QHTNu84)
The Table-Sorting Javascript: http://pastebin.com/UNmPaniW (http://pastebin.com/UNmPaniW)
miner.gif file: http://wastelot.tk/dl/stats/miner.gif (http://wastelot.tk/dl/stats/miner.gif)

This will generate a flat HTML page with a sortable table.
Here's a sample: http://wastelot.tk/dl/stats/miners.htm (http://wastelot.tk/dl/stats/miners.htm)
Sample's not live, just shows the layout.

Needs to be compiled with AutoIt : http://www.autoitscript.com/site/ (http://www.autoitscript.com/site/)
-edit- to fix the URL.  Link to the download page was shown as suspicious. :D

  • Edit the .au3 file's settings at the very top with your output file, deepbit.net email address, and JSON API key.
  • Change the update/refresh delays if you want.
  • Compile with AutoIt and leave it running. :D

I put the .exe in a dropbox folder, then have it output to a 'stats' folder within that folder.  I put the sorttable.js, miner.gif and miners.css files in there.  Then, I make the 'stats' folder public, so I can load the page via Dropbox to see how my miners are doing without having to log into DeepBit.  It's fine by itself or you can stick it in an iframe tag to include in a normal website.

Originally, this was for having people donate CPU cycles to fund a game server and we gave in-game rewards based on the amount of shares they had submitted.

If you like the script, please  DONATE via bitcoin: 1LWz9cn4XtRCQgfdAVfsuTcsh4EhgM564K    I like money.
Also posted here: http://wastelot.tk/tenement/viewtopic.php?id=37 (http://wastelot.tk/tenement/viewtopic.php?id=37)


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: John (John K.) on July 28, 2012, 11:47:14 AM
Moved to Project Development.  :)


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: rjk on July 28, 2012, 04:17:51 PM
Smart man, providing the source and no executable. Wish all the noobs with an app would do the same.


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: nimda on July 28, 2012, 05:55:45 PM
Thank you for reminding me why I use AutoHotkey.


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: Eremite on July 28, 2012, 07:24:18 PM
Thank you for reminding me why I use AutoHotkey.
I haven't tried AHK scripting before, Does AutoHotkey have a way of parsing JSON output?  This script is kindof a clusterf*** since instead of a proper json parser, I'm using Regex string replacement.  Another thing that bothered me originally was the way I got the JSON string since you apparently can't assign text from an online file to a variable directly.  At least I couldn't figure it out.

I made a PHP-only version that's much cleaner, simpler and faster.  I'll release that one also once I get it modified where you can just edit some variables.


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: nimda on July 28, 2012, 07:59:49 PM
Thank you for reminding me why I use AutoHotkey.
I haven't tried AHK scripting before, Does AutoHotkey have a way of parsing JSON output?
There are multiple open-source libraries for AHK_L which parse JSON, including LSON (https://github.com/infogulch/LSON). If you ever try AHK, make sure you download AutoHotkey_L, because it has tons of features the old AHK doesn't.
Quote
you apparently can't assign text from an online file to a variable directly.  At least I couldn't figure it out.
In AutoHotkey_L, one would use a one line HTTPRequest through COM; I don't know how easy COM is in AU3.
Quote
I made a PHP-only version that's much cleaner, simpler and faster.  I'll release that one also once I get it modified where you can just edit some variables.
Who doesn't love PHP?


Title: Re: deepbit.net bitcoin mining status page generator :: AutoIt and Dropbox
Post by: LuaKT on July 29, 2012, 03:01:11 PM
Here is a Javascript version.

The API key is stored as a cookie so nothing is held by the server.
Unfortunately Deepbit doesn't support jsonp so a PHP proxy has to be used to call the API.

Index: http://pastebin.com/KLBUTWKX
Javascript: http://pastebin.com/CnxkrHbq
Jquery Cookie Plugin: http://pastebin.com/g0VH7Ssy
PHP Proxy: http://pastebin.com/qeKU9u9G

There is a demo up over at http://btcfree.net/deepbit