Ninovolador added a comment.
The post_processor function is great and I use it now in my code. I see that
this is way more flexible when uploading multiple files. In my case I work with
one book file at a time, so no need to do that, and in my mind it looked
cleaner to just grab something instead of defining functions and such.
But I insist, isn't even more cleaner to just be able to grab the filename
using the file_url?
I think about setting an attribute to UploadRobot similar to `self.counter`,
like `self.filenames`, that stores that information. In the same block where
you defined `post_processor`:
self.filenames[file_url] = filename
The robot would have an internal dictionary that checks 1) if the file was
correctly uploaded vs None 2) the final filename of every file. And you can
loop or list or whatever you want with that information.
TASK DETAIL
https://phabricator.wikimedia.org/T360837
EMAIL PREFERENCES
https://phabricator.wikimedia.org/settings/panel/emailpreferences/
To: Xqt, Ninovolador
Cc: Xqt, Aklapper, pywikibot-bugs-list, Ninovolador, mevo, Isabelladantes1983,
Themindcoder, Adamm71, Jersione, Hellket777, LisafBia6531, 786, Biggs657,
PotsdamLamb, Jyoo1011, JohnsonLee01, Juan90264, SHEKH, Dijkstra, Alter-paule,
Beast1978, Un1tY, Khutuck, Zkhalido, Hook696, Kent7301, joker88john, Viztor,
CucyNoiD, Wenyi, Gaboe420, Giuliamocci, Cpaulf30, Af420, Bsandipan, Tbscho,
MayS, Lewizho99, Mdupont, JJMC89, Maathavan, Dvorapa, Altostratus, Neuronton,
Avicennasis, mys_721tx, jayvdb, Masti, Alchimista
_______________________________________________
pywikibot-bugs mailing list -- [email protected]
To unsubscribe send an email to [email protected]