User:Whiteknight/Count Ticker/Script

From Wikibooks, open books for an open world
Jump to navigation Jump to search
User talk:WhiteknightNuvola apps edu languages.svg
User:Whiteknight/Book FoundryNuvola devices blockdevice.png
User:Whiteknight/All BooksNuvola apps bookcase.png
User:Whiteknight/New Book GuideNuvola apps kdict.png
User:Whiteknight/Book CreatorNuvola apps kcmsystem.png
User:Whiteknight/ImagesNuvola apps kolourpaint.png
User:Andrew WhitworthContact-new.svg
Whiteknight Discussion Book Foundry All Books New Book Guide Book Creator Images About Me
Due to a severe shortage of time, I am no longer able to be an active member of the Wikibooks project. Please see my page for more details about my absense. I will continue to monitor my talk page for correspondence and will try to reply quickly when possible.

Script[edit | edit source]

This is a planning page for my script that reads the hit counter and posts results.

Data[edit | edit source]

The month of the entry
Total Hits
The total number of page hits counted by wikicharts since the counter was activated on October 5th 2007. Notice that these numbers are not accurate prior to January 3rd, 2008.
the threshold necessary for a book to appear on this list. This is computed statistically.
Books Listed
The number of books above the threshold. Capped at 50.
The time of day posted, EST.

Books are listed by the total number of page hits. The top 10 books are bolded. Per-book page hit data are proportional but inaccurate before January 3rd 2008. Page hits are counted continuously from October 5 2007. To get per-day hit counts, subtract the page hits from the number for the previous day. At the moment, this subtraction is not performed manually.

Current Status[edit | edit source]

Script is up and running, regular updates. Script is set to automatically update the ticker every night at 9pm EST.

Components[edit | edit source]

There are a number of different components that i'm working on right now.

Templates[edit | edit source]

I use various templates with the counter ticker. more details about them to come.

Uploader[edit | edit source]

This script is written in perl. It queries the hit counter every day at 9PM EST and posts the results onto wikibooks.

Graphs[edit | edit source]

I'm working on a custom javascript to graph the daily page hit counts. I've just about removed all the kinks. To install my graph tool (which has many uses besides just keeping track of page counts), add this line to your personal javascript file:


Once you do, you should be able to see a graph here:

Graph Gadget (version 1.1)

This is tested to not work in IE6 and IE7. IE does not support the <canvas> tag, which is required for this to work. Works in Safari and FF2. I may try to come up with an alternate method for use in IE, but I make no promises about this.

To Do[edit | edit source]

  • Possibly use subst on templates.
  • Possibly allow other counts to be graphed, possibly by searching archives.
  • Set hard limit for number of records to post, such as 50.