User:IagoQnsi/sgdb2commons

From Wikimedia Commons, the free media repository
Jump to navigation Jump to search

sgdb2commons is a tool that assists with transferring images from SteamGridDB to Wikimedia Commons. Once you have the user script installed in your web browser, new buttons will appear on steamgriddb.com that allow you to select images you wish to upload. The script will then pass you off to URL2Commons to actually execute the upload. All of the metadata about the file will be passed as parameters to {{User:IagoQnsi/sgdb2commons-info}}, which will render the information page for the file.

At present, the tool does not have any configurable options, though this may change in the future. If needed, you can adjust filenames in URL2Commons before you execute the upload. There is currently no way to change the license from the default ({{PD-textlogo}}{{Trademarked}}), so please ensure this license is correct before uploading. You are responsible for verifying the license of all files you upload with this tool. Please see Commons:Threshold of originality to learn how to identify files that can be uploaded with this license. Unless the criteria at that page are met, all images by default are copyrighted and should not be uploaded to Commons. Most files on SteamGridDB are too complex, and thus CANNOT be transferred to Commons.

Installation

[edit]

Sgdb2commons is published as a Greasemonkey user script for your browser. If you aren't already familiar with Greasemonkey scripts, the easiest way to install them for most browsers is to first install the Tampermonkey extension on your browser.

You can then visit this URL and Tampermonkey should automatically ask if you wish to install the script: https://github.com/oxguy3/sgdb2commons/raw/main/sgdb2commons.user.js

Usage

[edit]

Once the user script is installed, it will automatically load when you visit SteamGridDB. On any page which displays a gallery of video game assets, it will add a Commons logo button to the bottom right corner of each asset. To start an upload, select all the assets you wish to upload by clicking the Commons logo button on each asset (selected assets will be highlighted in blue). Once you have selected all the assets, click the "Commons logo to Commons" button at the top of the website. You will then be taken to URL2Commons, where you can simulate and then execute your upload. If needed, you can adjust the filenames in URL2Commons before uploading.

The user script also works if you are viewing the page for a single asset. In these cases, you don't need to select any assets; simply click the "Commons logo to Commons" button at the top of the website.

The template User:IagoQnsi/sgdb2commons-info is used to create the file's metadata page. It will automatically use the license {{PD-textlogo}}{{Trademarked}}; you are responsible for ensuring that this is the correct license. Only images which are too simple to be copyrighted may be transferred using this tool. It will also add Category:Images from SteamGridDB, as well as an appropriate category depending on the type of image (e.g. Category:Video game logos, Category:Video game icons, etc). You can add additional categories during the upload by appending them below the description in URL2Commons; otherwise, you may add more categories after completing the upload.

Known issues

[edit]

If you try to upload too many files at once, URL2Commons may give you a "431" error message. This is because the URL is getting too long for URL2Commons to accept, as all of the data about all the files has to be included in the URL. For now, the workaround is to split your upload into multiple parts. I plan to eliminate some redundancies in the data that this tool sends to URL2Commons to slightly lessen this problem. I've also opened a ticket on URL2Commons suggesting that it allow data to be submitted a different way, which would completely eliminate the problem.

Development

[edit]

The code for sgdb2commons is published on GitHub: https://github.com/oxguy3/sgdb2commons

It is developed by User:IagoQnsi (Hayden Schiff) and released under the MIT License.

If you encounter any issues, you may leave a message at User talk:IagoQnsi, or create an issue on GitHub.