Last modified: 2014-01-03 15:21:38 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T61255, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 59255 - DBQ-2 list of commons image with no licence template
DBQ-2 list of commons image with no licence template
Status: RESOLVED FIXED
Product: Tool Labs tools
Classification: Unclassified
Database Queries (Other open bugs)
unspecified
All All
: Unprioritized major
: ---
Assigned To: Bugzilla Bug Importer (valhallasw)
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-01-03 15:21 UTC by Bugzilla Bug Importer (valhallasw)
Modified: 2014-01-03 15:21 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:30 UTC
This issue was converted from https://jira.toolserver.org/browse/DBQ-2.
Summary: list of commons image with no licence template
Issue type: Task - A task that needs to be done.
Priority: Major
Status: Done
Assignee: Dan Collins <EN.WP.ST47@gmail.com>

-------------------------------------------------------------------------------
From: Darkoneko <koneko@tiscali.fr>
Date: Sun, 28 Oct 2007 11:32:52
-------------------------------------------------------------------------------

The goal be to have a list of commons: images having no licence information

To simplify the ask (since there are numerous licence template), the request is to have the list of all images having either  
*no template  
*only infobox% templates

output format should be put on a file, with the form CONCAT("image:", page_title, "\n")  
The used tables will be "page" and "templatelinks". 

Unfortunatly, my SQL knowledge wasn't enough to make a working query for that, so I had to ask for help here ![][1]   
thanks in advance

   [1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif
Comment 1 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:32 UTC
-------------------------------------------------------------------------------
From: Bryan Tong Minh <bryan@tools.wikimedia.de>
Date: Sun, 28 Oct 2007 11:40:10
-------------------------------------------------------------------------------

That would be something like

USE commonswiki_p;  
SELECT CONCAT('* Image:', page_title) FROM image, page LEFT JOIN templatelinks ON tl_from = page_id WHERE (page_namespace, page_title) = (6, img_name) AND (tl_namespace, tl_title) <> (10, 'Information') AND tl_from IS NULL;

It would be much easier if all Commons license tags would embed Category:License_tags aside from the sub cats of License_tags.
Comment 2 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:33 UTC
-------------------------------------------------------------------------------
From: Dan Collins <EN.WP.ST47@gmail.com>
Date: Sun, 28 Oct 2007 11:42:00
-------------------------------------------------------------------------------

I just did this for en - let's see if I can do it here too.
Comment 3 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:35 UTC
-------------------------------------------------------------------------------
From: Dan Collins <EN.WP.ST47@gmail.com>
Date: Sun, 28 Oct 2007 13:06:39
-------------------------------------------------------------------------------

select page_title from page, image where page_namespace = 6 and page_title=img_name and page_id not in (select tl_from from templatelinks);

select img_name from image where img_name not in (select page_title from page where page_namespace = 6 );

and results are at [[commons:User:ST47/NT]]
Comment 4 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:36 UTC
-------------------------------------------------------------------------------
From: Daniel Kinzler <daniel@brightbyte.de>
Date: Sun, 28 Oct 2007 15:11:56
-------------------------------------------------------------------------------

For future reference: where ... not in (select ...) is rather slow if you do it on a lot of entries. rather use left join ... where x is null.

Anyway, the above query will only find pages without any template. there's a lot of non-license templates. I have built a list of license templates, and a view that is like templatelinks, but only for license templates - that would give a more accurate result I hope.

Oh well, maybe next time ![][1] hm, perhaps i should make this stuff available somewhere, somehow. maybe create a commonswiki_aux_p database containing "auxiliary" data?

   [1]: https://jira.toolserver.org/images/icons/emoticons/smile.gif
Comment 5 Bugzilla Bug Importer (valhallasw) 2014-01-03 15:21:38 UTC
This bug was imported as RESOLVED. The original assignee has therefore not been
set, and the original reporters/responders have not been added as CC, to
prevent bugspam.

If you re-open this bug, please consider adding these people to the CC list:
Original assignee: EN.WP.ST47@gmail.com
CC list: koneko@tiscali.fr, Bryan.TongMinh@Gmail.com, daniel.kinzler@wikimedia.de, EN.WP.ST47@gmail.com

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links