User:Duesentrieb/CommonsTicker: Difference between revisions

From Meta, a Wikimedia project coordination wiki
Content deleted Content added
Change Requests
→‎Entry Template: {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }}
Line 178: Line 178:


<div style='border:1px dashed #000080; background-color:#F8F8F8; padding: 1ex;'><tt><nowiki>
<div style='border:1px dashed #000080; background-color:#F8F8F8; padding: 1ex;'><tt><nowiki>
<span class="tickerEntry_{{{type}}} tickerEntry_{{{action|}}} {{#if:{{{minor|}}}| tickerMinorEntry}} {{#if:{{{template|}}}| tickerTemplateEntry}} {{#if:{{{sub|}}}| tickerSubEntry}} {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }} plainlinks"><span class="tickerAction_{{{action}}}">{{#if:{{{user|}}}|[[commons:User:{{{user}}}|{{{user}}}]] &nbsp;}}{{#if:{{{action|}}}| {{TickerAction|{{{action}}}|{{{subject|}}}}}}}{{#if:{{{action2|}}}|, {{TickerAction|{{{action2}}}|{{{subject2|}}}}}}} '''[[commons:{{{page}}}|{{{page}}}]]'''</span>{{#if:{{{comment|}}}|<span>:</span> <span class="tickerComment">''{{{comment}}}''</span>}}{{#if:{{{diff|}}}| &nbsp;<span class="tickerDiffLink">([http://commons.wikimedia.org/w/index.php?{{{diff}}} diff])</span>}}; {{#if:{{{usage|}}}|<span class="tickerUsage">Used in: {{{usage}}}</span> {{#if:{{{image|}}}|<small class='tickerMiscLink'>([{{fullurl:{{NS:6}}:{{{image}}}}} local image page])</small>}}}}{{#if:{{{template|}}}| Images:}}</span><noinclude>
<span class="tickerEntry_{{{type}}} tickerEntry_{{{action|}}} {{#if:{{{minor|}}}| tickerMinorEntry}} {{#if:{{{template|}}}| tickerTemplateEntry}} {{#if:{{{sub|}}}| tickerSubEntry}} {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }} {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }} plainlinks"><span class="tickerAction_{{{action}}}">{{#if:{{{user|}}}|[[commons:User:{{{user}}}|{{{user}}}]] &nbsp;}}{{#if:{{{action|}}}| {{TickerAction|{{{action}}}|{{{subject|}}}}}}}{{#if:{{{action2|}}}|, {{TickerAction|{{{action2}}}|{{{subject2|}}}}}}} '''[[commons:{{{page}}}|{{{page}}}]]'''</span>{{#if:{{{comment|}}}|<span>:</span> <span class="tickerComment">''{{{comment}}}''</span>}}{{#if:{{{diff|}}}| &nbsp;<span class="tickerDiffLink">([http://commons.wikimedia.org/w/index.php?{{{diff}}} diff])</span>}}; {{#if:{{{usage|}}}|<span class="tickerUsage">Used in: {{{usage}}}</span> {{#if:{{{image|}}}|<small class='tickerMiscLink'>([{{fullurl:{{NS:6}}:{{{image}}}}} local image page])</small>}}}}{{#if:{{{template|}}}| Images:}}</span><noinclude>





Revision as of 22:13, 20 August 2006

CommonsTicker is a tool written by Duesentrieb for collecting critical events regarding images on Commons and posting them to the wikis using the respective image.. See User:Duesentrieb/Tools for other tools I wrote.

Please use the talk page for questions and comments. If I do not respond, please leave a quick note on my talk page at the german wikipedia.

CommonsTicker consists of two parts:

  • a script that periodically analyses the Commons' log and stores critical events (like images being overwritten, deleted or tagged as problematic) to a database.
  • a script that periodically posts relevant events to a wiki. Only events regarding images used on that wiki are posted.

CommonsTicker is currently active on the projects listed at #Active Tickers below.

Announcements

Announcements regarding CommonsTicker are posted below.

June 20: new version to fix some problems

Hi - you may have noticed some problems with CommonsTicker lately - namely, some entries about deletions went missing, and some entries arrived several days late (messing up the date headings for ticker pages using append mode). This is caused by the massive replication lag we currently see on the toolserver (it's more than a day behind). While I hope this will not happen again in the future, I have been working on improving CommonsTicker so it handles out-of-sync entries gracefully.

I plan to activate a new version of CommonsTicker tonight or tomorrow - so look out for any new problems. Here are the most relevant changes:

  • fix handling of out-of-sync records (see above); added "latecomer" parameter to TickerEntry template (may be ignored)
  • deleted images can be restored now. To reflect this, I have added a "restored" action to CommonsTicker. To use it, you need to change your templates and/or CSS like this.
  • for pages in append-mode, there an empty "status" parameter is now handed to the TickerEntry template - this parameter can be set manually to trigger some type of marking or highliting, depending on how you set up your template and CSS. See here for an example that strikes out the entry if status is set to "done".

For the future, I'm planning to let CommonsTicker post warnings to the talk page of articles that use an image das is (about to be) deleted. I'll post another announcement when that feature is ready.


Creating a Ticker

Each local ticker must be registered in the configuration of the CommonsTicker-bot on the toolserver. To request a ticker for a project, please do the following:

  • Find an admin on your project who wants to help set it up. For me to work with him/her, the admin needs to speak English or German, and should be available on IRC while the ticker is set up.
  • Add the name of your project, a link to the ticker page and a link to the admin's user page to the #Requests for Ticker section below. Please specify what configuration you want (see #Available Options below)
  • Go through the #Checklist below to prepare the pages and templates used by CommonsTicker
  • Drop a short note on my talk page and/or contact me on IRC.

If you want to request changes to an existing ticker, please go to the #Change Requests section, and notify Duesentrieb as descibed above.

Available Options

CommonsTicker can be configured in several ways. The most important options are listed below:

  • order: oldest or newest on top?
  • update mode: append new or replace all? (for replace all: how many days should be shown?)
  • minor: hide deletion of old version and people replacing their own uploads?
  • notify: for what namespaces should notifications be posted to the talk pages? (this feature will become available with the next version)

Options for the ticker page:

  • page: what page should the ticker be on? Usually, that is Wikipedia:CommonsTicker.
  • template: what template should be used for formating entries? TickerEntry is suggested.

Checklist

  • you: Create ticker page (see #Ticker Page below), create/translate header. The header should contain at least:
    • a link to this meta page
    • a link to the local admin (you)
    • a link to the appropriate discussion page
    • Note: a separate "List" page is no longer needed.
  • you: put a header on the discussion page, explaining where to discuss what, and whom to contact when. Include at least:
  • you: Create TickerEntry and TickerAction templates (see #Ticker Template), adjust/translate as needed. They may be called whatever you like, but you'll have to tell me if you don't use the "standard" names.
  • you: Copy and adjust CSS styles (see #CSS) to MediaWiki:common.css
  • you: tell me what options you would like (see #Available Options above)
  • me: Create an account for the bot. Add contact info.
  • me: Create a config file. Run the bot manually to see if it works.
  • you: Check that the ticker does what you want. Tell me about changes you want.
  • you: Add translations for the contact info on the bot's user page
  • you: Doublecheck that everything works. Tell me if everything is OK.
  • me: schedule ticker for automatic updates.

Note: the account used for ticker updates should not have the bot flag. The bot flag is used to hide bot edits on RecentChanges/Watchlist; but the CommonsTicker posts notifications, which people should see. -- Duesentrieb 20:57, 31 May 2006 (UTC)

Requests for Ticker

To request a ticker page, please follow the instructions above and add an entry mentioning the name of your wiki, the desired ticker page, and the user page of the cooperating admin (you?). Go through the #Checklist to prepare the ticker page. Don't forget to contact me on my talk page and/or on IRC.

Note: CommonsTicker can be implemented on the English Wikipedia(en.wikipedia) only after the toolserver has a fresh dump and up-to-date replication for that project. Currently, data for the en:wp is broken on the toolserver. I hope this will be resolved soon, but it will probably take another few weeks. -- Duesentrieb 18:34, 21 May 2006 (UTC)

Incomplete Setups

Configured Tickers

Active Tickers

Change Requests

Put a short notice here if you want some options changed. Afterwards, please notify Duesentrieb on his talk page or on IRC.

Ticker Page

The ticker page is a page on a "local" wiki, to which the CommonsTicker will post any changes relevant to that project. The skeleton of the ticker page should look something like this:

[[Image:Commons-ticker.png|321px|right]]
[[meta:User:Duesentrieb/CommonsTicker|CommonsTicker]] is the notification mechanism for problematic Common's media files.  Files on Commons that have license issues should either be corrected or linked to some alternate.  A secondary intent of CommonsTicker is to increase the Sister-project-to-Commons communication.

* Local contact admin: [[User:xxxxx]]
* Bot account: [[User:CommonsTicker]]
* Bot author/maintainer: [[w:de:Benutzer:Duesentrieb]]
* Technical information: [[meta:User:Duesentrieb/CommonsTicker|CommonsTicker]]
* Technical discussion: [[meta:User talk:Duesentrieb/CommonsTicker|CommonsTicker talk]]

<div class="tickerList">
== Latest ==
<!-- NOTE: the ticker bot inserts new data below the following marker. Make sure it stays in the right place!
     <@@@<CommonsTicker:BEGIN>@@@> 
-->

<!-- <@@@<CommonsTicker:END>@@@> 
     NOTE: the ticker bot inserts new data before the above marker. Make sure it stays in the right place!
-->
</div>
<!-- put footer/categories below -->

Each entry is formatted using a template, and looks something like this:

* {{TickerEntry
|page=Image:Diskussion_mit_Pfeil.png
|image=Diskussion_mit_Pfeil.png
|user=TakuroKato
|type=replaced
|action=replaced
|action2=
|comment={{Information |Description= Hinweis auf Tab "Diskussion" mit rotem Pfeil |Source= screenshot / own drawing |Date= 09.05.2006 |Author= [[:de:Benutzer:Taxman]] |Permission= PD-self |other_versions= old Version
|usage=[[Wikipedia:Diskussionsseiten|Wikipedia:Diskussionsseiten]], [[Benutzer:Taxman/Tour/3|Benutzer:Taxman/Tour/3]]
}}<!-- ticker-id: 3913 --> <!-- timestamp: 20060510001232 --> 

Entry Template

The template used for entries can be fully customized and should also take care of translation as well as format and style. It could look something like this:

<span class="tickerEntry_{{{type}}} tickerEntry_{{{action|}}} {{#if:{{{minor|}}}| tickerMinorEntry}} {{#if:{{{template|}}}| tickerTemplateEntry}} {{#if:{{{sub|}}}| tickerSubEntry}} {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }} {{#if:{{{status|}}}| tickerStatus_{{{status|}}} }} plainlinks"><span class="tickerAction_{{{action}}}">{{#if:{{{user|}}}|[[commons:User:{{{user}}}|{{{user}}}]]  }}{{#if:{{{action|}}}| {{TickerAction|{{{action}}}|{{{subject|}}}}}}}{{#if:{{{action2|}}}|, {{TickerAction|{{{action2}}}|{{{subject2|}}}}}}} '''[[commons:{{{page}}}|{{{page}}}]]'''</span>{{#if:{{{comment|}}}|<span>:</span> <span class="tickerComment">''{{{comment}}}''</span>}}{{#if:{{{diff|}}}|  <span class="tickerDiffLink">([http://commons.wikimedia.org/w/index.php?{{{diff}}} diff])</span>}}; {{#if:{{{usage|}}}|<span class="tickerUsage">Used in: {{{usage}}}</span> {{#if:{{{image|}}}|<small class='tickerMiscLink'>([{{fullurl:{{NS:6}}:{{{image}}}}} local image page])</small>}}}}{{#if:{{{template|}}}| Images:}}</span><noinclude>

-------
'''''This template is used by the [[meta:User:Duesentrieb/CommonsTicker|CommonsTicker bot]] to format entries on [[project:CommonsTicker]].''''' </noinclude>

This looks a bit complicated, mostly because it's all in one line. This provides nice formating and uses some CSS classes for styling (see below). It also uses an auxilliary template, TickerAction, that basically provides translations for the action parameter:

&nbsp;{{#switch:{{{1}}}
|replaced=replaced
|replacedOwn=replaced own upload
|deleted=deleted
|deletedRev=deleted old version of
|restored=restored
|addedBad=puts deletion marker ''{{{2}}}'' on
|removedBad=removes deletion marker ''{{{2}}}'' from
|addedGood=puts license tag ''{{{2}}}'' on
|removedGood=removes license tag ''{{{2}}}'' from
|{{{1}}} {{{2|}}}
}}<noinclude>


-------
'''''This template is used by the [[meta:User:Duesentrieb/CommonsTicker|CommonsTicker bot]]
with [[Template:TickerEntry]] to format entries on [[project:CommonsTicker]].'''''
</noinclude>


If you have talk page notification enabled, you also need a template for that (per default, Template:TickerNotification). I could look something like this:

== Image Warning ==
The following images have been deleted from commons, or have been marked for deletion. Please remove the images from the article, or join the discussion on commons. ''This messages was generated automatically by [[Wikipedia:CommonsTicker|CommonsTicker]]''.

CSS

The following CSS classes are used by the TickerEntry template as shown above - a different entry template could use completely different css classes (or none). The definitions below are provided as a conveniance.

  /************************/
  /* CommonsTicker styles */
  /************************/
 
  /* links */
  .tickerDiffLink { } /* diff links in ticker */
  .tickerMiscLink { } /* misc links in ticker */
 
  /* remove list bullets */
  .tickerList ul,    .tickerList ul li    { list-style: none; text-indent:-2em; margin-left:2em;   text-align:left; }
  .tickerList ul ul, .tickerList ul ul li { list-style: none; text-indent:0;    margin-left:1.5em; text-align:left; }

  /* per-type styles */
  .tickerEntry_deleted     { }  /* entry for image deletion */
  .tickerEntry_restored    { }  /* entry for restored image */
  .tickerEntry_replaced    { }  /* entry for image replacement */
  .tickerEntry_tagged      { }  /* entry for adding/removing problem tags */
  .tickerEntry_redir       { }  /* entry for critical redirection (fot tag redirects) */
  .tickerEntry_recat       { }  /* entry for critical re-categorization (for tag categories) */
  .tickerEntry_notify      { }  /* entry for global notifications */
  .tickerEntry_changed     { }  /* entry for generic change */

  /* per-status styles */
  .tickerStatus_done     { text-decoration:line-through; }  /* strike through when entry has been handeled */

  /* per-action styles */
  .tickerAction_deleted:before     { content:" GONE "; color: #FF0000; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_restored:before    { content:" BACK "; color: #00BB00; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_deletedRev:before  { content:" -OLD "; color: #DDAAAA; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_replaced:before    { content:" REPL "; color: #CC88FF; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_replacedOwn:before { content:" UPDT "; color: #EEAAFF; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_addedBad:before    { content:" +VfD "; color: #FF8800; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_removedBad:before  { content:" -VfD "; color: #00BB00; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_addedGood:before   { content:" +OK  "; color: #00BB00; font-family:monospace; font-weight:bold; font-size:100%; }  
  .tickerAction_removedGood:before { content:" -OK  "; color: #FF8800; font-family:monospace; font-weight:bold; font-size:100%; }

  /* ticker usage list */
  .tickerUsage  { font-size:80%; }  

  /* entry applies to a template used by multiple images */
  .tickerTemplateEntry    { font-weight: bold; } 

  /* entry applies to sub-entries, i.e. images that use a specific template */
  .tickerSubEntry         { }                       

  /* minor entry styles */ 
  .tickerMinorEntry  { color:#666; }     /* minor entry */
  .tickerMinorEntry a,
  .tickerMinorEntry a:link,
  .tickerMinorEntry a:visited { color:#669; }
  #bodyContent .tickerMinorEntry a.extiw,
  #bodyContent .tickerMinorEntry a.extiw:link,
  #bodyContent .tickerMinorEntry a.extiw:visited { color:#669; }
 

(The pseudoclass :before used in the tickerAction classes in the example above doesn't work in Internet Explorer, so you don't get the colored marker at the beginning of a row when using this browser.)

To Do

  • detect/ignore version-deletions
  • ignore people overwriting their own uploads
  • config file
  • insert marker (before/after)
  • separator
  • sort order
  • highlite usage in main-ns
  • make a "replace" mode that always checks n days and replaces all previous entries.
  • do faster usage check (chunks)

  • detect reverts to old versions --> info missing in db
  • implement direct "global" notifications (think about multilingual messages) --> separate tool
  • fix missing diff links --> apears to be missing in the HTML...
  • link to the log, link to CheckUsage --> template

  • fix surplus blank lines
  • highlite protected pages (exposed!)
  • localized "and more..."
  • make RSS feed
  • for "real" articles, post to talk pages
  • filter by namespace (explicite list + notalk)
  • nicer summary
  • repost failed updates automatically. notify contact admin (and ticker talk page).
  • warn uploader before image deletion

Note: if you want to request a feature, report a bug, etc, please do so on the talk page