More script metadata exposed
|
|
@version and @copyright is exposed on script page if it exists. http://userscripts.org/scripts/show/3626 has a @version in the source. It needs to be presented in a better way, but it is a start. Opinions? |
|
|
Maybe you could group the new information with the install count and the 'last updated' and 'first uploaded' information. Make a new "script stats" subheading or simlar. |
|
|
@license wouldn't be a bad idea, either. An example from one of my scripts: // @copyright Copyright 2007, 2008 Jordon Kalilich (http://www.theworldofstuff.com/) // @license GNU GPL version 3 or later; http://www.gnu.org/copyleft/gpl.html |
|
|
Shouldn't that go without saying?
|
|
|
@dob, While most (all?) scripts are open source, the particular license they use might be different. I'm adding license and redeploying. |
|
|
Now when you look at Jordon's script it makes it even more evident that I need to do what @znerp suggested. Unfortunately I'm exhausted and it is hard to do visual design when tired while adding some more extraction code was easy... Some day I'll catch up ... |
|
|
You should realize that you're creating de facto standards here, but I feel the need to ask - has anyone run any of this by the Greasemonkey development team? (Let alone Opera and IE7Pro and GreaseKit and all the other Grease-alike utilities that use similar formats...) What happens when/if Gm (or one of those others) defines a use for an @-term that conflicts somehow with what you're doing? (When I was writing my self-updater, I specifically avoided using terms that I knew were in use elsewhere, to prevent conflicts in content or formatting from requiring a rewrite.) At the very least, someone should write and publish a document defining what those fields are expected to contain, and in what format - something that future authors (of both scripts and the tools to run them) can look at and say, "no, we can't do it this way, because they're already doing it that way." |
|
|
ScroogeMcPump, All of the fields (other than name) are optional. I am following the guidelines of the greasespot wiki and exposing common keys. If GM/others were to use those common keys a lot of the existing scripts would be broken. Jesse |
|
|
(Interestingly, a discussion I had with Anthony and Johan about that exact paragraph was what led to the approach I took with my self-updater script.) I don't expect Gm to make use of these keys, either, but since you are making use of them now, I just meant to suggest that you might want to standardize and document your expectations of how they should be used (in the future; I know you can't do anything about existing or unmaintained scripts). |
|
|
ScroogeMcPump, Yikes! I don't know if I want to dictate what the keys should be. I will document what ones I use (which so far are those that the community uses). I would like that to be a community effort (either us.o community or the GM community or the wider "user.js" community) |
|
|
I don't know if I want to dictate I didn't expect that you would, and didn't mean to imply that I thought that was what you were doing. community effort Which is as it should be; but having a public page that says "These are the @-terms we (us.o) look at, this is why, and this is what we do with them" would be a help in that community effort. the wider "user.js" community That's the place the conversation should take place, but I don't think that place exists; AFAIK there isn't any one place where all the constituencies of that "community" hang out together. |
|
|
Needs |
|
|
Jesse, adding an id to the exposed version would be make it easier for an userscript to check for updates (at least till the US.o API is ready) |
|
|
Hey, I'm not from the US, so it took me quite some time to figure out why on earth @licence wouldn't show up. I don't mind changing a c to an s, but in case any more of us Europeans have trouble with it (currently or in the future). any chance you could add a little check for both spellings? |
|
|
Mindeye, Do you means I should add the a updated time/internal version number to http://userscripts.org/scripts/source/26181.met... something like @uso.version (time stamp) |
|
|
lucideer, I check for both spellings now (licence if license isn't entered) |
|
|
No, I was talking about adding an id attribute to the HTML of the script page to make it easy for scripts using XHR to get the @version. But now that the meta.js file is ready, it isn't necessary |
|
|
@Jesse
|

