User talk:Evad37/Covery.js
This script has a documentation page at User:Evad37/Covery. |
This page has archives. Sections older than 3000 days may be automatically archived by Lowercase sigmabot III when more than 400 sections are present. |
Thank you
[edit]đđđ Evad strikes again czar 16:15, 7 October 2018 (UTC)
Underscores not converted to spaces
[edit]First of all, what Czar said above. Bravo! I just uploaded File:Asterix & Obelix Take on Caesar video game cover.jpg and it worked like a charm. The only thing I noticed is that the article name in the template uses "_" instead of " ". Also, could the script maybe suggest a file name based on the article name if it cannot parse it from the URL? Regards SoWhy 18:03, 7 October 2018 (UTC)
- Underscores should now be converted to spaces, and the script should now be able to retrieve the file name from a url. - Evad37Â [talk] 03:34, 8 October 2018 (UTC)
Script did not upload image but everything else
[edit]The script should probably check whether the image was actually uploaded before doing the other steps. I tried uploading a cover and it did not work but the File talk was created and the image was added and the talk request removed. Regards SoWhy 19:28, 7 October 2018 (UTC)
- I've added another check that should make sure file is successfully uploaded. - Evad37Â [talk] 03:34, 8 October 2018 (UTC)
FR: Fill publisher and developer in infobox if provided to Covery but not yet in infobox
[edit]Should be easy: If the infobox lacks developer and publisher entries, Covery requires you to provide them, so it would be cool if the script could then add them to the infobox when it adds the image. Regards SoWhy 18:17, 8 October 2018 (UTC)
- @SoWhy: Â Done - Evad37Â [talk] 04:25, 10 October 2018 (UTC)
png files and infobox
[edit]Hi Evad. You've done a great job. I've seen a few issues when using the script, which should be reasonably easy to sort.
1. When anything other than {{Infobox video game}} is present, the script doesn't work. However, quite a few articles are spelt with {{infobox video game}}, which when I attempted to use, the script ignored the second case, and threw up an error.
2. When uploading a file, in the format of .png, the image is displayed, but cannot be uploaded. Is this a script, or a wikipedia thing?
3. On Chrome, I couldn't get the url image upload to work at all. Is it a specific url style that needs to be used?
Thank you so much for your hard work! Lee Vilenski (talk ⢠contribs) 11:43, 9 October 2018 (UTC)
- @Lee Vilenski:
- Â Fixed. All the redirects to the infobox should work now, with either an upper- or lowercase first letter.
- Depends on what you mean by "cannot be uploaded" - does the upload button remain disabled, or does it let you click the button but then give you en error?
- The url needs to be a direct url to the image, ending in .gif , .png , .jpg , .jpeg , .svg , or .tiff
- - Evad37Â [talk] 04:32, 10 October 2018 (UTC)
- Thank you Evad! For the second point, the upload button was grayed out/disabled. All other sections were filled, so it could only be the file type that caused the issue. Lee Vilenski (talk ⢠contribs) 08:31, 10 October 2018 (UTC)
- Did you check whether the filename had an extension? It won't work otherwise. Regards SoWhy 08:34, 10 October 2018 (UTC)
- Thank you Evad! For the second point, the upload button was grayed out/disabled. All other sections were filled, so it could only be the file type that caused the issue. Lee Vilenski (talk ⢠contribs) 08:31, 10 October 2018 (UTC)
FR: Allow choosing a different rationale and/or NFCC tag
[edit]Since the cover art category also contains requests for logos of developers and suchlike, it would be cool if there was a dropdown you could choose a different template from if needed (e.g. {{non-free logo}}
and {{non-free use rationale logo}}
for logos). Regards SoWhy 12:20, 9 October 2018 (UTC)
- Of course the script would then have to work with
{{infobox company}}
, so it's probably a bit more work. Regards SoWhy 12:20, 9 October 2018 (UTC)- I've got an idea of how to generalise the script by setting up different "profiles" based on the type of infobox the article has, which could also allow the script to do books and films and so on. But it would be quite a bit a work to actually do so. - Evad37Â [talk] 04:39, 10 October 2018 (UTC)
Doesn't work if no infobox or empty infobox
[edit]I tried to use this on a page without an infobox and it didn't automatically create one as part of the process. Also didn't work with an empty infobox. I first had to populate it with "Genre" and "Platform".--Coin945 (talk) 23:10, 9 October 2018 (UTC)
- @Coin945: An infobox is required to make sure it is actually being used for a video game article. An empty infobox should now work. - Evad37Â [talk] 04:43, 10 October 2018 (UTC)
- Why does this have to be used only with the video game infobox? Would the concept not also work with TV shows, films, books, people etc?--Coin945 (talk) 05:30, 10 October 2018 (UTC)
- @Coin945: See Evad's comment above. Seems like they are working on that which would be great Regards SoWhy 07:17, 10 October 2018 (UTC)
- Why does this have to be used only with the video game infobox? Would the concept not also work with TV shows, films, books, people etc?--Coin945 (talk) 05:30, 10 October 2018 (UTC)
- I understand this is potentially being generalized, how about the {{Infobox video game series}}? Most infoboxes of this type also have this type of upload. One I found in the list was Arcade Classic, which should simply have one of the game's cover in the infobox, but this wouldn't work with the script. Lee Vilenski (talk ⢠contribs) 09:11, 10 October 2018 (UTC)
- I get this error message when trying to use the tool with an empty infobox for a game called Phantasie II: "Error: Unable to parse infobox from wikitext `Phantasie II is the second video game in the Phantasie series."--Coin945 (talk) 23:42, 11 October 2018 (UTC)
- Coin945 - It's because there is no infobox at all that you get the error on Phantasie II. The script is searching for the template, but can't find one, and is simply saying the first line of the article back. I'll add an infobox so you can add the image. Lee Vilenski (talk ⢠contribs) 08:37, 12 October 2018 (UTC)
"Error uploading: verification-error" when using the wrong extension
[edit]I got Error uploading: verification-error
with no further explanation. There is also nothing in the console as far as I can tell. What I did was accidentally naming the file .jpg when it was a .png. Maybe this can be more clear or the extension be changed by the script? Regards SoWhy 08:31, 10 October 2018 (UTC)
- @SoWhy: Â Done The script will now show error messages below the file name input if it detects an mismatched file extension, of if the file name is otherwise invalid. - Evad37Â [talk] 07:11, 11 October 2018 (UTC)
Adding platform option to script
[edit]Hi there, I was directed to this page by another user. Over the last year or so, I have been working (somewhat sporadically) to remove video game covers from Category:Video game covers (which is kind of a non-platform-specific holding category), and to place them in their respective platform category (eg Category:PlayStation 4 game covers, Category:iOS game covers etc). I'm wondering would it be possible to include in the script some kind of option to allow users to select the appropriate platform category at upload? I know nothing of scripts, so this could be a ridiculous question, but it was suggested to me that I run it past you. Cheers. Bertaut (talk) 23:12, 10 October 2018 (UTC)
- @Bertaut: Â Done! - Evad37Â [talk] 05:15, 11 October 2018 (UTC)
- @Evad37:. Thanks, much appreciated. Bertaut (talk) 19:08, 11 October 2018 (UTC)
- Nice work. On a side note, could the script take information about platforms from the infobox as well? Regards SoWhy 13:52, 14 October 2018 (UTC)
- @Evad37:. Thanks, much appreciated. Bertaut (talk) 19:08, 11 October 2018 (UTC)
Can we search for existing art within Wikipedia Commons using the tool?
[edit]Regards.--Coin945 (talk) 23:39, 11 October 2018 (UTC)
- @Coin945: I cannot think of cover art that would be eligible for upload to Commons because it's almost always copyrighted. Can you give an example or two? Regards SoWhy 09:27, 12 October 2018 (UTC)
Source input box
[edit]Brilliant script, incredibly useful. Is there any chance of adding an optional source input box please that populates the source field of the rationale template? CrimsonFox talk 11:47, 14 March 2019 (UTC)
Upload button greyed out despite file selected
[edit]Hi, Evad37. I tried to upload a cover at SpellForce 3: Soul Harvest and while I can choose the file, the upload button stays greyed out. I tried it in both Chrome and Firefox and with other articles from Category:Video game articles requesting identifying art but the result is always the same. Also, the file name is not autofilled from the file chosen for upload. Regards SoWhy 11:07, 11 August 2019 (UTC)
- @Evad37: Still happening. Any update on this? Regards SoWhy 20:41, 2 November 2019 (UTC)
- @SoWhy: I think I've managed to fix it, at least for using the select file method. I couldn't get the url loading to work. Apologises for letting this slip of the radar for so long. - Evad37Â [talk]
- @Evad37: No worries, I just thought you might have overlooked my message. I can confirm it works again, so great job. I can do url uploads by just pasting the URL in the file selector window, so that works too. Regards SoWhy 12:13, 3 November 2019 (UTC)
- @SoWhy: I think I've managed to fix it, at least for using the select file method. I couldn't get the url loading to work. Apologises for letting this slip of the radar for so long. - Evad37Â [talk]
Other media types
[edit]@Evad37, I'd love to use this script for book covers and I can see it having a lot of (fair) use (ho ho ho) across WP. Any chance you have plans to abstract the template text so that we can help apply it to other categories? Or would I be better off making a copy of the script and hacking together a version for myself? czar 10:00, 31 December 2021 (UTC)
- I did have a look at making a more generic non-free infobox image uploader, but I don't know what happened to the code. In any case, I don't think I got that far along with it. Just doing something similar to this script for a single infobox for books woud be simpler, and you should be able to take this code and modify it. The main things to change would be:
- Line 5-8: script identier/version/link
- Line 89: Modify the regex if there are redirects/wrappers etc that don't start with {{Infobox
- Line 107-140: function checkInfobox - swicth to infobox book and its redirects
- Line 196-221: makeDescriptionText - work out what info is needed to generaten on-free use rationale and licencing for books
- Line 264-273: Swicth video games to books
- Line 347: update wikilink
- Line 366-393 function updateTalkpageWikitext - needs to be updated for book wikiproject banners
- Line 432-568 - dialog content, layout - update for books (e.g. remove developer, add author etc)
- Line 696-703 - required inputs check - update for books
- Line 719-764 - checking platform - work out if you need something similar for books, otherwise remove
- Line 756-759 - autofilling some input fields from infobox parameter values
- Line 780-803 - getting existing platforms from api, add as options in the MenuTagMultiselect input - might need to remove if theres nothing similar for books
- Line 842-848 - update per changes made to makeDescriptionText
- Line 897-903 - change to paramters/values that should be added to the book infobox
- Line 1013 - change tb-covery to something else to avoid a clash
- Line 1023 - update url of the script
- Hope that helps - Evad37Â [talk] 10:42, 31 December 2021 (UTC)
Force convert to PNG
[edit]@Evad37: I think this tool would be very useful but my main gripe with it that prevents me from using it is that it seems to maintain the original file type. When downsizing an image, making a JPG very small will cause it to become very low-quality. Is there a way you could make it convert all images to PNG before doing the downsizing if it starts out as a different file type? (If it does have the option, correct me if I'm wrong). á´˘xá´á´ ĘÉ´á´ (á´) 03:37, 8 June 2022 (UTC)