Hi,
I work with large categories. My dream is to upload a list of articles to a wikipage, where there are checkboxes next to the titles, and I can click. The page would return a filtered lists which I can use with my bot to change the category. On an advanced level, several columns of checkboxes could exist do divide the category to subcats.
Checkbox is not the aim, it is only a way I can explain what I want to do. Of course, I can do it in Excel, but 1. on a wikipage I can move my mouse on the title and see the part of the content, and in Excel I cannot, 2. I can offer a wikipage to another user to make the filtering, an then do the work with bot.
As far as I see, the most natural way is to code this in PHP, which needs a MediaWiki extension, if anyone feels like, and likes my idea... By that time, do you know about such service on the tolserver? Or can I do it myself somehow with Lua?
Hi, Bináris
A client-side JavaScript code might help with that. This would remove a need of deploying any code to all users of the wiki while retaining the page previews.
An overview of a solution: - find all links on the current page - create a checkbox for every link (and tag them with page title, for example using dataset property) - when you finish marking articles, query the selected boxes - display the output in any format you're comfortable with
Cheers, Msz2001
________________________________ Od: Bináris wikiposta@gmail.com Wysłano: poniedziałek, 24 października 2022, 22:54 Do: Wikimedia developers wikitech-l@lists.wikimedia.org Temat: [Wikitech-l] Filtered lists with checkboxes
Hi,
I work with large categories. My dream is to upload a list of articles to a wikipage, where there are checkboxes next to the titles, and I can click. The page would return a filtered lists which I can use with my bot to change the category. On an advanced level, several columns of checkboxes could exist do divide the category to subcats.
Checkbox is not the aim, it is only a way I can explain what I want to do. Of course, I can do it in Excel, but 1. on a wikipage I can move my mouse on the title and see the part of the content, and in Excel I cannot, 2. I can offer a wikipage to another user to make the filtering, an then do the work with bot.
As far as I see, the most natural way is to code this in PHP, which needs a MediaWiki extension, if anyone feels like, and likes my idea... By that time, do you know about such service on the tolserver? Or can I do it myself somehow with Lua?
-- Bináris
Good idea. Thank you, I am not very familiar with JS, but I will try it.
Marcin Szwarc marcinszwarc@hotmail.com ezt írta (időpont: 2022. okt. 24., H, 23:05):
Hi, Bináris
A client-side JavaScript code might help with that. This would remove a need of deploying any code to all users of the wiki while retaining the page previews.
An overview of a solution:
- find all links on the current page
- create a checkbox for every link (and tag them with page title, for
example using dataset property)
- when you finish marking articles, query the selected boxes
- display the output in any format you're comfortable with
Cheers, Msz2001
*Od:* Bináris wikiposta@gmail.com *Wysłano:* poniedziałek, 24 października 2022, 22:54 *Do:* Wikimedia developers wikitech-l@lists.wikimedia.org *Temat:* [Wikitech-l] Filtered lists with checkboxes
Hi,
I work with large categories. My dream is to upload a list of articles to a wikipage, where there are checkboxes next to the titles, and I can click. The page would return a filtered lists which I can use with my bot to change the category. On an advanced level, several columns of checkboxes could exist do divide the category to subcats.
Checkbox is not the aim, it is only a way I can explain what I want to do. Of course, I can do it in Excel, but 1. on a wikipage I can move my mouse on the title and see the part of the content, and in Excel I cannot, 2. I can offer a wikipage to another user to make the filtering, an then do the work with bot.
As far as I see, the most natural way is to code this in PHP, which needs a MediaWiki extension, if anyone feels like, and likes my idea... By that time, do you know about such service on the tolserver? Or can I do it myself somehow with Lua?
-- Bináris
Wikitech-l mailing list -- wikitech-l@lists.wikimedia.org To unsubscribe send an email to wikitech-l-leave@lists.wikimedia.org https://lists.wikimedia.org/postorius/lists/wikitech-l.lists.wikimedia.org/
Pe luni, 24 octombrie 2022, Bináris wikiposta@gmail.com a scris:
Hi,
[...]
By that time, do you know about such service on the tolserver? Or can I
do it myself somehow with Lua?
Hi Binaris,
For Commons files, there is https://pagepile-visual-filter.toolforge.org/ It shouldn't be too complicated to extend it to any list, but it's not there yet. Maybe ask the maintainer for an extended version?
There are several tools working with PagePiles that can achieve the same result, but they are all basically equivalent to editing the wikipage and deleting the unwanted titles, which doesn't seem to be what you want.
HTH, Strainu
-- Bináris
Thank you! " editing the wikipage and deleting the unwanted titles" -- yes, this is just what I want, The list may be on a temporary page, and deleting the unwanted is even better then first marking it. Then I can use this page as a source for the bot. Is there a list of these tools? I am not familiar with Toolforge, how to find a tool by purpose.
Strainu strainu10@gmail.com ezt írta (időpont: 2022. okt. 25., K, 1:10):
There are several tools working with PagePiles that can achieve the same result, but they are all basically equivalent to editing the wikipage and deleting the unwanted titles, which doesn't seem to be what you want.
Pe marți, 25 octombrie 2022, Bináris wikiposta@gmail.com a scris:
Thank you! " editing the wikipage and deleting the unwanted titles" --
yes, this is just what I want, The list may be on a temporary page, and deleting the unwanted is even better then first marking it. Then I can use this page as a source for the bot.
Is there a list of these tools? I am not familiar with Toolforge, how to
find a tool by purpose.
If you're ok with editing a list of titles, petscan [1] is all you need.
If you never used it, here is how I would do it:
1. Generate the initial list of articles: on the "Categories" tab, select your wiki and your category. On the output tab, select Format plain text. This will get you the list.
2. Prepare the workspace: After you refresh (in order to reset all fields), go to the "Other sources" tab and input your list of files in the "Manual list" field, then just below add the wiki and click on "Do it!". A list of results will appear, along with a number called psid, which uniquely identifies the list. For example: "PSID is 23121189". Copy the link and send them to your users.
3. Each user can then edit the article list, click on "Do it!" and give you their psid.
4. (Optional) If you want to do more complex operations on the results, set the output to PagePile and ask the users for the PagePile ID (or the url they are redirected to when clicking Do it). Then use https://pagepile.toolforge.org/?menu=filter to combine them.
Now, pywikibot does have some support for petscan, but I believe it does not include psid. However, it's trivial to scrape the output of the text output.
Good luck!
Strainu
[1] https://petscan.wmflabs.org/
Strainu strainu10@gmail.com ezt írta (időpont: 2022. okt. 25., K, 1:10):
There are several tools working with PagePiles that can achieve the same
result, but they are all basically equivalent to editing the wikipage and deleting the unwanted titles, which doesn't seem to be what you want.
Strainu strainu10@gmail.com ezt írta (időpont: 2022. okt. 25., K, 19:20):
If you're ok with editing a list of titles, petscan [1] is all you need.
Thank you! Unfortunately, this does not run in native home wiki, so it lacks the advantage of seeing the article preview when I push my mouse over the title, but anyway, it is useful!
Pe marți, 25 octombrie 2022, Bináris wikiposta@gmail.com a scris:
Strainu strainu10@gmail.com ezt írta (időpont: 2022. okt. 25., K,
19:20):
If you're ok with editing a list of titles, petscan [1] is all you need.
Thank you! Unfortunately, this does not run in native home wiki, so it lacks the
advantage of seeing the article preview when I push my mouse over the title, but anyway, it is useful!
Not sure about page pop-ups, but Wikidata label and description added to the output seems like an easy improvement. Patches are welcome: https://github.com/magnusmanske/petscan_rs/pulls?q=is%3Apr+is%3Aclosed
:)
wikitech-l@lists.wikimedia.org