Jump to content

User:Duesentrieb/CommonsTicker

From Meta, a Wikimedia project coordination wiki
This service is out of business for unknown reasons.


CommonsTicker is a tool written by Duesentrieb for collecting critical events (deletion tagging, deletion etc.) regarding images on Commons and posting them to the local wikis using the specific 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 local wikis. Only events regarding images used on that particular wiki are posted.

CommonsTicker is currently active on the projects listed at #Active Tickers below. An overview of all ticker configurations is online on the TickerMatrix page on the toolserver.

Announcements

[edit]

Announcements regarding CommonsTicker are posted below.

June 20: new version to fix some problems

[edit]

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.


August 20: new version, new features

[edit]

Hello. A new version of CommonsTicker will be rolled out soon (probably tomorrow). Please have an eye on what the bot is doing, and report any problems to m:User_talk:Duesentrieb/CommonsTicker. Some of the changes are:

  • the ticker can now post warnings to the talk page of articles that are using "endangered" images. This is not enabled per default, and you can select for which namespaces it is done. If you want this feature, please request it at m:User:Duesentrieb/CommonsTicker#Change_Requests.
  • in append mode, there are now three empty template parameters: status, editor, and notic. The ticker does not use them itself, but you can use them in the TickerEntry template, for example to strike through entries that have been fixed. en:wikinews has already been using this for a while now.
  • if the ticker fails to post an update, a warning is posted to your and the ticker's talk page. In append mode, the ticker will also re-try to post the update on the next pass. Until now, failed updates where simply ignored.
  • edit summaries become a bit more informative.

I hope these changes will help to make CommonsTicker more used and more useful.

On a related note: you may have noticed that on long pages, entries near the bottom of the page are sometimes not expanded but rendered just as {{TickerEntry}} or similar. This is due to a new limit to template expansion - see bugzilla:7005. To avoid it, try to keep the page short and/or try to simplify the TickerEntry template.

January 5: Ticker Trouble

[edit]

Hello

As you may have noticed, there have been some problems with CommonsTicker lately:

  • first, the toolserver was down. After it was back up, we had to wait for fresh database dumps.
  • also, many updates where failing because ticker pages where growing too large. Updates that went through half-way somtimes also caused entries to be posted multiple times, making the problem worse.
  • when I tried to improve performance, I introduced a bug that caused the ticker to post trash sometimes. I disabled the ticker again when I was told about it, and I have fixed all effected pages yesterday (I hope I didn't miss any).

To sort this out completely, I have to rewrite parts of CommonsTicker. For now, I will enable the ticker again for most wikis, but not for the ones that where having most trouble - namely de-wikipedia, en-wikinews, eo-wikipedia, es-wikipedia, fr-wikipedia, ja-wikipedia, ru-wikipedia, simple-wikipedia and zh-wikipedia. I'll have to investigate those more closely.

So please keep an eye on CommonsTicker in the next days - if there is any more trouble, please tell me, preferrably on meta:User_talk:Duesentrieb/CommonsTicker.

Regards -- meta:User:Duesentrieb 13:32, 5 January 2007 (UTC)

February 6: CommonsTicker, The Next Generation

[edit]

I am currently testing a new version of CommonsTicker (dubbed CommonsTicker NG) on the german Wikipedia - problems with ticker pages growing too large made a partial rewrite necessary. Most changes are "under the hood", the larges change for users is in the way the ticker page is structured and updated:

CommonsTicker will now create a subpage for each day, and include this as a template on the ticker page. New entries for a given day are added to the respective subpage without modifying existing entries on that subpage. Old subpages (sections) are removed automatically from the main ticker page - per default, 7 sections are kept (days for which there are no entries are not counted). Please check that your ticker page has both start- and end-markers for the region where CommonsTicker should post (see m:User:Duesentrieb/CommonsTicker#Ticker_Page); everything between the markers will be replaced. If the markers are missing, the entire page is replaced.

When I have finished testing CommonsTicker NG, I will activate the new version on the wikis where CommonsTicker is currently disabled due to problems with page size (the large projects I mentioned in the last announcement). When all goes well, I will start to switch other wikis to NG one by one, as seems convenient. If you want the new version soon, or you don't want it yet for some reason, please tell me about it on m:User:Duesentrieb/CommonsTicker#Change_Requests.


Creating a Ticker

[edit]

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

[edit]

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?) No longer supported/needed by CommonsTicker NG.
  • keepMax: (new for in CommonsTicker NG) the maximum number of day-sections to keep on the ticker page; old sections are removed. Default is 7. Days that have no section on the page (because there are no messages on that day) are not counted.
  • minor: hide deletion of old version and people replacing their own uploads?
  • notify: for what namespaces should notifications be posted to the talk pages? Note: you must create a template called TickerNotification for this to work - see the example in the #Entry Template section below.

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

[edit]
  • 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 #Entry 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: add an entry to the #Requests for Ticker section below, and tell me what options you would like (see #Available Options above). Notify me on my talk page.
  • 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

[edit]

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)

put new requests above this line!

Incomplete Setups

[edit]
  • ang.wikipedia: ang:Wikipedia:CommonsTicker - contact: James (setup incomplete)
  • he.wikisource s:he:Project:CommonsTicker, contact s:he:User:Dovi (admin); options: newest on top, append, show minor. (setup incomplete)
  • en.wikipedia: w:Wikipedia:CommonsTicker - contact en:user:Lar Options:order-newest, replace, notify, don't show minor. Incomplete pending db dump resolution but I volunteer to be the en:wp to work on this once things are ready. Lar 01:26, 23 September 2006 (UTC)
    • (still in holding pattern as lag is currently... non-en: 3d 1h 26m 31s (264391s) [+540s in 2996s]; en: 18d 12h 47m 31s (1601251s) [+2833s in 2996s] ++Lar: t/c 23:10, 6 February 2007 (UTC))
      • The lag is now much better, it's time to get to work on this. Sorry for the delay. ++Lar: t/c 16:59, 8 August 2007 (UTC)
        • I think everything prior to the userID testing things is ready, except for the .css modifications. Are those mandatory just to test things?? The userID is CommonsTickerBot and has been unblocked (it was blocked shortly after creation :) ). ++Lar: t/c 19:53, 14 August 2007 (UTC)
          • Status update?--Elvey 05:19, 28 November 2009 (UTC)

Configured Tickers

[edit]

Active Tickers

[edit]

Change Requests

[edit]

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

  • en.wiktionary.org: please prefix changes with a ==Date== or ===Date=== heading on wikt:WT:CT. --Connel MacKenzie 21:48, 13 September 2006 (UTC)
sorry, I don't understand -- Duesentrieb 13:21, 24 October 2006 (UTC)
  • en.wiktionary.org: Please change update mode to retain 60 days of activity only. --Connel MacKenzie 21:49, 13 September 2006 (UTC)
maximum for replace mode is 10 days (unless the wiki is very small) -- Duesentrieb 13:21, 24 October 2006 (UTC)
  • pt.wikisource: please change to replace mode' (replacing after one month). 555 20:40, 21 October 2006 (UTC)
replace mode is quite expensive (i.e. means a lot of work for the database), so it is limited to about 10 days. -- Duesentrieb 13:21, 24 October 2006 (UTC)
  • da.wikipedia: Please also run the bot on the template namespace (Skabelon in Danish). I will unblock the bot now, so you can re-enable it immediately. --Palnatoke 21:25, 12 April 2007 (UTC)
done -- Duesentrieb 21:36, 12 April 2007 (UTC)
  • mi.wikipedia.org: - I manually deleted a lot of the material on the ticker page since it was getting veeery long. Could you double check that I didn't delete any of your markers, and also it would be good if you changed to the new setup where the ticker doesn't keep on adding and adding sections... Cheers Kahuroa 09:47, 31 May 2007 (UTC)
  • is.wikipedia: Please change the settings from append to replace, replacing every 7 days. Thank you. Jóna Þórunn 11:28, 9 March 2008 (UTC)
  • als.wikipedia.org: We do not need a ticker there at the moment; for us the CommonsDelinker currently does its work good enough. You may remove alswiki from the active ticker list (until further notice). --- Best regards, Melancholie 21:49, 11 June 2008 (UTC)
  • sv.wiki wants to have the notify: option enabled. I have created sv:Template:TickerNotification for this already. MiCkE 12:19, 16 June 2008 (UTC)
  • zh.wikipedia Not work. plese fix--Shizhao 16:48, 17 February 2009 (UTC)
    • And, keepMax =30; notify enabled. thanks--Shizhao 16:56, 17 February 2009 (UTC)

Ticker Page

[edit]

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.svg|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

[edit]

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|}}} }} 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

[edit]

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 convenience.

  /************************/
  /* 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

[edit]
  • 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)
  • fix surplus blank lines
  • for "real" articles, post to talk pages
  • nicer summary
  • repost failed updates automatically. notify contact admin (and ticker talk page).
  • implement subpage mode
  • implement strip-old

  • 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
  • handle bot-uploads as "minor"

  • post to different wiki than checking (check foundation, post to meta, for example)
  • highlite protected pages (exposed!)
  • localized "and more..."
  • make RSS feed
  • filter by namespace (explicite list + notalk)
  • warn uploader before image deletion (requires SSO)
  • Use {{#time:j. F|<timestamp>}} for date formating - see ParserFunctions#.23time
  • Integrate with delinker-log (otherwise, delinked deleted images are ignored by the ticker)

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

See also

[edit]