JavaScript CheckUsage alternative

classic Classic list List threaded Threaded
12 messages Options
Reply | Threaded
Open this post in threaded view
|

JavaScript CheckUsage alternative

Magnus Manske-2
Hi all,

I'm slowly getting settled in at Cambridge, and as a warm-up I hacked
a little JavaScript that might be an alternative to the CheckUsage
script. Demo at:

http://tools.wikimedia.de/~magnus/commonsusage.html

It runs through a combination of project types (currently wikipedia,
wikibooks, wikinews) and languages (currently en, de, es, fr, pl, it,
sv), and queries the usage of an image through the API, which is
always up-to-date. Enter an image name and click "Search", and you can
see the list getting shorter as queries are completed (or longer if
there are many hits); IMHO this cuts down on the "subjective waiting
time" ;-)

Two drawbacks to this:
* It hits the API, which might slow things down if used large-scale
* Due to JavaScript security limitations, I have to go through a Perl
script on the toolserver for each query (ugh!)

However, it might be an in-place alternative to Duesentrieb's script
if installed on commons. Note that the perl script would also have to
be on commons.

Magnus

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Platonides
Magnus Manske wrote:
> Two drawbacks to this:
> * Due to JavaScript security limitations, I have to go through a Perl
> script on the toolserver for each query (ugh!)
>
> However, it might be an in-place alternative to Duesentrieb's script
> if installed on commons. Note that the perl script would also have to
> be on commons.

query.php (still available!) provides proxy functionalities, which
however, seem missing from newer api.php


I'm not sure if using this is better or worse than Duesentrieb's but
anyway, these are good news.


_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Brianna Laugher
In reply to this post by Magnus Manske-2
On 09/05/07, Magnus Manske <[hidden email]> wrote:
> Hi all,
>
> I'm slowly getting settled in at Cambridge, and as a warm-up I hacked
> a little JavaScript that might be an alternative to the CheckUsage
> script. Demo at:
>
> http://tools.wikimedia.de/~magnus/commonsusage.html

NICE :)

but you know we'd have to go through 100% of projects.

are the devs going to like us doing this?

also, have fun at Cambridge! :)

cheers
Brianna
user:pfctdayelise

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Tomasz Sienicki-2
[2007-05-09 03:39] Brianna Laugher wrote:

> On 09/05/07, Magnus Manske <magnusmanske-gM/[hidden email]> wrote:
>> a little JavaScript that might be an alternative to the CheckUsage
>> script. Demo at:
>> http://tools.wikimedia.de/~magnus/commonsusage.html
>
> NICE :)

It messes up Unicode characters in page titles.

--tsca

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Magnus Manske-2
In reply to this post by Platonides
On 5/9/07, Platonides <[hidden email]> wrote:
> query.php (still available!) provides proxy functionalities, which
> however, seem missing from newer api.php

Thanks! I rewrote the thing based on this info. Code is in
[[commons:User:Magnus Manske/monobook.js]]

It now works directly in commons, calling query.php directly (no
in-between script necessary).

I need to put a full language list in there. A language/project combo
list might be even better, so I won't hit the servers for wikis that
don't exist.
Also, this should live in some "official" location, rather than on my
user subpage. Where to put it?

Magnus

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Brianna Laugher
On 11/05/07, Magnus Manske <[hidden email]> wrote:
> Also, this should live in some "official" location, rather than on my
> user subpage. Where to put it?

MediaWiki:Check-usage.js ?

cheers,
Brianna

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Magnus Manske-2
Gladly. Alas, I'm not an admin, so I can't edit the MediaWiki namespace :-(

Should I apply for admin rights for technical purposes only?

Magnus


On 5/11/07, Brianna Laugher <[hidden email]> wrote:

> On 11/05/07, Magnus Manske <[hidden email]> wrote:
> > Also, this should live in some "official" location, rather than on my
> > user subpage. Where to put it?
>
> MediaWiki:Check-usage.js ?
>
> cheers,
> Brianna
>
> _______________________________________________
> Commons-l mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/commons-l
>

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Ayelie (Editor at Large)
On 5/11/07, Magnus Manske <[hidden email]> wrote:
Gladly. Alas, I'm not an admin, so I can't edit the MediaWiki namespace :-(

Should I apply for admin rights for technical purposes only?

Magnus

Going through an RfA will take a week, so it is probably quicker for now to go through normal means. For translations users usually post the requested edits on the talk page of the mediawiki page in question, and then add {{editprotected}} to the talk page. An administrator will come and move your content to the mediawiki page for you.

Cheers :)
--
Ayelie
  ~Editor at Large
_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Magnus Manske-2
OK, I put it under [[MediaWiki talk:Check-usage.js]]. You can try it
out by putting

{{subst:MediaWiki talk:Check-usage.js}}

in your [[/monobook.js]]. It is currently checking all wikipedias and
wikinews. For wikibooks, it uses the same languages as for wikinews.
This amounts to >300 sites to check, so it will take about 20 sec to
complete, depending on your computer and internet connection.

Magnus



On 5/11/07, Ayelie <[hidden email]> wrote:

> On 5/11/07, Magnus Manske <[hidden email]> wrote:
> > Gladly. Alas, I'm not an admin, so I can't edit the MediaWiki namespace
> :-(
> >
> > Should I apply for admin rights for technical purposes only?
> >
> > Magnus
> >
>
> Going through an RfA will take a week, so it is probably quicker for now to
> go through normal means. For translations users usually post the requested
> edits on the talk page of the mediawiki page in question, and then add
> {{editprotected}} to the talk page. An administrator will come and move your
> content to the mediawiki page for you.
>
> Cheers :)
> --
> Ayelie
>   ~Editor at Large
> _______________________________________________
> Commons-l mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/commons-l
>
>

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Ayelie (Editor at Large)
On 5/12/07, Magnus Manske <[hidden email]> wrote:
OK, I put it under [[MediaWiki talk:Check-usage.js]]. You can try it
out by putting

{{subst:MediaWiki talk:Check-usage.js}}

in your [[/monobook.js]]. It is currently checking all wikipedias and
wikinews. For wikibooks, it uses the same languages as for wikinews.
This amounts to >300 sites to check, so it will take about 20 sec to
complete, depending on your computer and internet connection.

Magnus

<huge> ILIKEIT </huge>

Very very nice, Magnus.. congrats x2! It works much better on the image pages than the initial direct link did in the example. Unobtrusive, no opening new pages, relatively fast. Makes checking uses before deletion MUCH easier. Lovely <3

--
Ayelie
  ~Editor at Large

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Barcex
In reply to this post by Magnus Manske-2
I have added

document.write('<script type="text/javascript" src="http://commons.wikimedia.org/w/index.php?title=MediaWiki
 talk:Check-usage.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');

to monobook.js, it seems better than including it in order to have always an updated version, and the script can be hosted outside commons if needed. ¿Is MediaWiki talk: Check-usage.js world-writable? If so, thet it is a security flaw, but you can always host it in a more secure place.

Barcex

2007/5/12, Magnus Manske <[hidden email]>:
OK, I put it under [[MediaWiki talk:Check-usage.js ]]. You can try it
out by putting

{{subst:MediaWiki talk:Check-usage.js}}

in your [[/monobook.js]]. It is currently checking all wikipedias and
wikinews. For wikibooks, it uses the same languages as for wikinews.
This amounts to >300 sites to check, so it will take about 20 sec to
complete, depending on your computer and internet connection.

Magnus



On 5/11/07, Ayelie <[hidden email]> wrote:

> On 5/11/07, Magnus Manske <[hidden email]> wrote:
> > Gladly. Alas, I'm not an admin, so I can't edit the MediaWiki namespace
> :-(
> >
> > Should I apply for admin rights for technical purposes only?
> >
> > Magnus
> >
>
> Going through an RfA will take a week, so it is probably quicker for now to
> go through normal means. For translations users usually post the requested
> edits on the talk page of the mediawiki page in question, and then add
> {{editprotected}} to the talk page. An administrator will come and move your
> content to the mediawiki page for you.
>
> Cheers :)
> --
> Ayelie
>   ~Editor at Large
> _______________________________________________
> Commons-l mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/commons-l
>
>

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l


_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l
Reply | Threaded
Open this post in threaded view
|

Re: JavaScript CheckUsage alternative

Robert Leverington
I have copied this to MediaWiki:Check-usage.js where only admins can
edit it. I suggest you use that and whenever it needs to be updated
(if Magnus hasn't got sysop tools by then ;) ) it can be recopied over
from the talk page.

On 13/05/07, Barcex <[hidden email]> wrote:

> I have added
>
> document.write('<script type="text/javascript"
> src="http://commons.wikimedia.org/w/index.php?title=MediaWiki
> talk:Check-usage.js&action=raw&ctype=text/javascript&dontcountme=s"></script>');
>
> to monobook.js, it seems better than including it in order to have always an
> updated version, and the script can be hosted outside commons if needed. ¿Is
> MediaWiki talk: Check-usage.js world-writable? If so, thet it is a security
> flaw, but you can always host it in a more secure place.
>
> Barcex
>
> 2007/5/12, Magnus Manske < [hidden email]>:
> > OK, I put it under [[MediaWiki talk:Check-usage.js ]]. You can try it
> > out by putting
> >
> > {{subst:MediaWiki talk:Check-usage.js}}
> >
> > in your [[/monobook.js]]. It is currently checking all wikipedias and
> > wikinews. For wikibooks, it uses the same languages as for wikinews.
> > This amounts to >300 sites to check, so it will take about 20 sec to
> > complete, depending on your computer and internet connection.
> >
> > Magnus
> >
> >
> >
> > On 5/11/07, Ayelie < [hidden email]> wrote:
> > > On 5/11/07, Magnus Manske <[hidden email]> wrote:
> > > > Gladly. Alas, I'm not an admin, so I can't edit the MediaWiki
> namespace
> > > :-(
> > > >
> > > > Should I apply for admin rights for technical purposes only?
> > > >
> > > > Magnus
> > > >
> > >
> > > Going through an RfA will take a week, so it is probably quicker for now
> to
> > > go through normal means. For translations users usually post the
> requested
> > > edits on the talk page of the mediawiki page in question, and then add
> > > {{editprotected}} to the talk page. An administrator will come and move
> your
> > > content to the mediawiki page for you.
> > >
> > > Cheers :)
> > > --
> > > Ayelie
> > >   ~Editor at Large
> > > _______________________________________________
> > > Commons-l mailing list
> > > [hidden email]
> > > http://lists.wikimedia.org/mailman/listinfo/commons-l
> > >
> > >
> >
> > _______________________________________________
> > Commons-l mailing list
> > [hidden email]
> > http://lists.wikimedia.org/mailman/listinfo/commons-l
> >
>
>
> _______________________________________________
> Commons-l mailing list
> [hidden email]
> http://lists.wikimedia.org/mailman/listinfo/commons-l
>
>


--
Robert[hl]   [[User:Lcarsdata]]
http://roberthl.wikitest.co.uk/

_______________________________________________
Commons-l mailing list
[hidden email]
http://lists.wikimedia.org/mailman/listinfo/commons-l