User:Guillom/UploadWizard: Difference between revisions
→Combined approach: fmt |
→Combined approach: fmt |
||
| Line 29: | Line 29: | ||
[[quarry:91995]] attempts to get all <code>comment_id</code>s for <code>comment_text</code> matching the regex <code>'^Uploaded a work by .+ from .+ with UploadWizard$'</code>, and yields 3,136,590 entries after running for 51 minutes. |
[[quarry:91995]] attempts to get all <code>comment_id</code>s for <code>comment_text</code> matching the regex <code>'^Uploaded a work by .+ from .+ with UploadWizard$'</code>, and yields 3,136,590 entries after running for 51 minutes. |
||
Until we can count how many files were uploaded for each <code>comment_id</code>, we know that at least one file was uploaded for each comment. This brings the total of files uploaded with UploadWizard to a minimum of <code>34,350,208 + 3,136,590 = 37,486,798</code>, so around 32% of all |
Until we can count how many files were uploaded for each <code>comment_id</code>, we know that at least one file was uploaded for each comment. This brings the '''total of files uploaded with UploadWizard''' to a minimum of <code>34,350,208 + 3,136,590 = '''37,486,798'''</code>, so around '''32% of all files''' on Commons. |
||
Revision as of 00:28, 24 March 2025
I'm trying to estimate the number of files uploaded using UploadWizard. To my knowledge there is no easy way to measure this, so this page describes my attempt to find a way.
Previous attempts
There used to be a hidden category, Category:Uploaded with UploadWizard, automatically added by UploadWizard during upload. This was an easy way to track the main metric (number of files uploaded) but the Commons community decided to delete it because it didn't serve a purpose, as "UploadWizard is the default mode of upload" and "This category is like having an 'Articles created using the Edit Button' category on Wikipedia." A comment in this discussion notes that as of August 2016, the category contained around 9 million files.
Another way was to query the Commons database (or rather a copy, using Quarry) and look for log actions for uploads with the content "User created page with UploadWizard", which was also automatically set by UploadWizard during upload (example). This approach was used by User:Steinsplitter on October 16, 2016 and yielded a count of 10,228,537.
Current problem
The method used by Steinsplitter is no longer reliable for several reasons:
log_commentis deprecated, andlog_comment_id(in theloggingtable) along withcomment_idandcomment_text(in thecommenttable) should be used instead.- Changes made by the Multimedia team to UploadWizard in October 2020 resulted in two possible patterns of upload comments, multiplied by their translations:
Uploaded own work with UploadWizard(example)Uploaded a work by $1 from $2 with UploadWizard, where $1 is the copyright holder, and $2 the source, per the message documentation.
All the language variations of the "own work" comment could reasonably be listed and queried. However, the customization of the "third party" comment with two variables makes identifying all files upload that way non-trivial. First, the comment table would need to be queried to get all comment_ids for all the comments using the pattern of the message (and all its translations), and then the logging table would need to be queried to count the number of uploads that match this (presumably large) number of comments.
Combined approach
If we ignore the 2020 changes for now, let's try to adapt Steinsplitter's method to use the logging and comment tables. quarry:41469 identifies comment_text = "User created page with UploadWizard" as comment_id = 44. Although it takes a while to count (11 minutes), as of March 23, 2025 quarry:42025 yields a count of 20,231,572. The same query run by User:Reedy on October 5, 2020 yielded a count of 20,231,414, confirming that the count has barely changed, due to the comment message changing in the software around that date.
quarry:91991 identifies comment_text = "Uploaded own work with UploadWizard" as comment_id = 144143204. As of March 23, 2025 quarry:42025 runs for ~10 minutes and yields a count of 14,118,636. This brings the total of files uploaded with UploadWizard to a minimum of 20,231,572 + 14,118,636 = 34,350,208, so around 30% of all 116,784,255 files on Commons.
Let's see if the comment translations are actually used. In my experience, Spanish-language contributors often prefer to set their interface to Spanish, so Spanish is a good language to test if the comment is actually ever translated. In quarry:91992 we look for the comment_id corresponding to comment_text = "Trabajo propio subido con el Asistente de subidas" (per translatewiki:MediaWiki:Mwe-upwiz-upload-comment-own-work/es). The query returns no result, meaning that the translated comment can't be found. quarry:91993 shows a similar result for the French translation.
If we don't have to take into account translated messages, this dramatically simplifies the count for own-work uploads, and brings counting third-party uploads back into the realm of the possible. Let's see if we could count third-party works.
quarry:91995 attempts to get all comment_ids for comment_text matching the regex '^Uploaded a work by .+ from .+ with UploadWizard$', and yields 3,136,590 entries after running for 51 minutes.
Until we can count how many files were uploaded for each comment_id, we know that at least one file was uploaded for each comment. This brings the total of files uploaded with UploadWizard to a minimum of 34,350,208 + 3,136,590 = 37,486,798, so around 32% of all files on Commons.