Enquirer Home Page | Twitter | Back to Improbable Island

 Forum Index > Places > Places: General New Topic Post Reply
 Getting past Onslaught to the Scrapyard
 |  Printable Version
fledermaus
 Tuesday, April 24 2012 @ 01:58 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Hm... looks like I was a bit too slow - but I've put together
a single-click upload-from-council-to-a-gdocs-spreadsheet
greasemonkey script.

http://users.pepperfish.net/vivek/ii/ii-council.user.js

uploads to

https://docs.google.com/spreadsheet/ccc?key=0ArkyFQnCjG4ndGhXM0ROclE2U3pURmdWLWNFMlRqTnc

automagically.

It records the time, threat level and wall points.


 
Profile Email
Quote
Count Sessine
 Tuesday, April 24 2012 @ 10:01 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1398

Quote by: fledermaus

Hm... looks like I was a bit too slow - but I've put together
a single-click upload-from-council-to-a-gdocs-spreadsheet
greasemonkey script.

http://users.pepperfish.net/vivek/ii/ii-council.user.js

uploads to

https://docs.google.com/spreadsheet/ccc?key=0ArkyFQnCjG4ndGhXM0ROclE2U3pURmdWLWNFMlRqTnc

automagically.

It records the time, threat level and wall points.

That's way cool!

I wonder if there's any way to hook the two pieces together? ...I don't know if Google Forms is willing to 'play nice' with data inserted separately. Even if not, having the two separate views of what's happening will be enlightening. For one thing, you're capturing the wall points, which gives a more complete picture of what's happening, especially at threat level 8.

Is it possible to convert your timestamp to EDT datetime? That would make cross-checking back and forth easier. (Forms doesn't offer flexibility there. You just get what you get.)


 
Profile Email
Quote
fledermaus
 Tuesday, April 24 2012 @ 10:36 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Maaaaybe. Never looked at google forms before. The EDT conversion should
be trivial though.

( Not going to look at it right now - I'll just end up pulling
another all-nighter and I am Far Too Old for that. )


 
Profile Email
Quote
fledermaus
 Tuesday, April 24 2012 @ 10:39 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

I do encourage (a few) other people to install the GM
script though, that way we'll get samples from times
when I'm not around too.

Hm... I _could_ create a script that would log in
once an hour and sample the council office in
kittania.

Would that be against the II rules (such as they are)
in any way?


 
Profile Email
Quote
Count Sessine
 Tuesday, April 24 2012 @ 11:49 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1398

Quote by: fledermaus

I do encourage (a few) other people to install the GM
script though, that way we'll get samples from times
when I'm not around too.

Hm... I _could_ create a script that would log in
once an hour and sample the council office in
kittania.

Would that be against the II rules (such as they are)
in any way?

That would be for CMJ to say. For now, I think we can gather more than enough data with volunteer contributors. It's not like we're going for machine-like exactitude, here -- only a general sense of what's happening.

We can see from the data accumulated already that the spawn rate must be subject to considerable random variations; sometimes an outpost remains very stable, and sometimes the threat level will shoot up suddenly.


 
Profile Email
Quote
fledermaus
 Wednesday, April 25 2012 @ 12:10 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Had a look at the form... if I understand it correctly, it's backed by
a google docs spreadsheet - I can either update the spreadsheet directly
if you give me access to it, or I can try to submit the form
from the greasemonkey script...

If you want me to set it up, it would be handy if you cloned
the form & spreadsheet into a test version do I could get
things working without filling them with garbage test data.


 
Profile Email
Quote
Count Sessine
 Wednesday, April 25 2012 @ 02:20 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1398

Quote by: fledermaus

If you want me to set it up, it would be handy if you cloned
the form & spreadsheet into a test version do I could get
things working without filling them with garbage test data.

You've got it. Big Grin


 
Profile Email
Quote
fledermaus
 Wednesday, April 25 2012 @ 04:51 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Quick question - where do the dates come from - are they part of the form submission, or special formatting in the spreadsheet, or what?


 
Profile Email
Quote
Buddleia
 Wednesday, April 25 2012 @ 05:42 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 04/23/10
Posts: 343

They are automatically generated by the Form. When someone hits Submit, it adds the timestamp of the entry to column A, and the answer to question 1 into column B, question 2 to column C, etc.


Improbable Reference Links - goo.gl/MRBnb -------------- Land Registry (map of Places) ---- goo.gl/bpkRR
 
Profile Email Website
Quote
fledermaus
 Thursday, April 26 2012 @ 12:41 AM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Okay… updated the GM script. It now has buttons to send the
data to my spreadsheet, and to your form - The one to your
form currently targets the form that feeds the test spreadsheet,
but if you try it out and are happy with it, we can swap out
the test form URL for the live one and publish the GM script.

let me know how/if it works and if you'd like any changes to it.

http://users.pepperfish.net/vivek/ii/ii-council.user.js


 
Profile Email
Quote
Count Sessine
 Thursday, April 26 2012 @ 03:32 AM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1398

Welp -- I went and downloaded Greasemonkey, and installed the script... and it looks like it's in place and activating when I'm at the Council page, but I am not seeing any buttons. What should I be looking for? Would the fact that I'm using a Mac (OS X 10.5.8) cause a problem?

You've been adding data to the test form via the script, though, and that doesn't seem to have interfered with any of the forms-related functions or the graphs. So, applause! This is all very, very cool.


 
Profile Email
Quote
Full Metal Lion
 Thursday, April 26 2012 @ 05:44 AM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/19/11
Posts: 430

Quote by: Count+Sessine

Welp -- I went and downloaded Greasemonkey, and installed the script... and it looks like it's in place and activating when I'm at the Council page, but I am not seeing any buttons. What should I be looking for? Would the fact that I'm using a Mac (OS X 10.5.8) cause a problem?

You've been adding data to the test form via the script, though, and that doesn't seem to have interfered with any of the forms-related functions or the graphs. So, applause! This is all very, very cool.


I also have no buttons. I'm running Chrome on Windows XP. And my paranoia senses are tingling about the "this extension can access all your data" thing.


 
Profile Email Website
Quote
fledermaus
 Thursday, April 26 2012 @ 12:12 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Not aware of any platform specific issues.

It could be that I set the @include to www.improb…

If you add the non www version, that might fix things.

If that doesn't work, check tools→web developer→error console
for any script realted errors (on FF, not sure what chrome's
equivalent is).


 
Profile Email
Quote
fledermaus
 Thursday, April 26 2012 @ 12:16 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

With regard to the “access all your data”... well, sort of, but pages
can't insert scripts into greasemonkey - GM scripts have to be locally
installed by you. And GM scripts are sandboxed to the page(s) they're
run in, so if anything they're safer than regular javascript.


 
Profile Email
Quote
Count Sessine
 Thursday, April 26 2012 @ 02:12 PM UTC  
Forum Moderator
Moderator

Status: offline

Registered: 08/16/08
Posts: 1398

Yes, the @include is www.improb... but that's what I'm using, so I don't think that can be the problem. And I'm not seeing any related messages in the error console.

The @namespace is on pepperfish.net -- could there be a permissions issue? (Grasping at straws, here!)


 
Profile Email
Quote
fledermaus
 Thursday, April 26 2012 @ 02:39 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

Namespaces are just to tell scripts apart. What skin/theme are you using for the island?
Could be there's some odd difference I haven't accounted for.


 
Profile Email
Quote
fledermaus
 Thursday, April 26 2012 @ 02:45 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

I've updated the script to include some GM_log lines (these will only
work in FF, not chrome) so there should be some debug output in the
"messages" section of the error log.


 
Profile Email
Quote
fledermaus
 Thursday, April 26 2012 @ 04:50 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

It was the different layout in different skins. Should be fixed now.


 
Profile Email
Quote
Full Metal Lion
 Thursday, April 26 2012 @ 10:13 PM UTC  
Forum Improbable Badass
Improbable Badass

Status: offline

Registered: 12/19/11
Posts: 430

I'll re-install it now, though I checked the old one in Default: Red, and there was no button.


 
Profile Email Website
Quote
fledermaus
 Thursday, April 26 2012 @ 10:43 PM UTC  
Forum Contender
Contender

Status: offline

Registered: 03/12/12
Posts: 35

There wouldn't have been, turns out the layout of that page is
radically different in several different skins, including console,
classic, and a couple of others.

It works for me in all the skins now.

I've also (as of just now) pointed the script at the live form,
but haven't tested it yet because I threw all my gamedays at cc404
in an attempt to clear it.


 
Profile Email
Quote
Content generated in: 0.12 seconds
New Topic Post Reply



 All times are UTC. The time is now 07:26 AM.

Normal Topic Normal Topic
Locked Topic Locked Topic
Sticky Topic Sticky Topic
New Post New Post
Sticky Topic W/ New Post Sticky Topic W/ New Post
Locked Topic W/ New Post Locked Topic W/ New Post
View Anonymous Posts 
Anonymous users can post 
Filtered HTML Allowed 
Censored Content