The goal is to parse, for example, gdata.youtube.com/feeds/api/users/FoxloidShiroko/uploads for links to put into the scroll area in utaite.wikia.com/wiki/Shiroko. As a starting point, we can take my Python code at tinyurl.com/aq2pe6a.
This task should be extremely simple because we only have to split out and format a few fields. There's no need to use the re library or the alternate references for this task.
By the way, this might be useful. "[%s %s] (%s)" % (url, description, date) gives you the string in quotes, with each %s replaced by the corresponding variable inside the parenthesis.
And text.split("<a href=\"").split("\"") ordinarily gives you the url of the first link on a page.
Oh so you can make a bot for NND links then? That might be super useful. I'll try to look more into this when I have time but even then, when I had tried researching on how to create/program a bot everything just went over my head
i wonder if this will work out well, or if this will only make more work, e.g. bc of some random code inserted or double/wrong linking
This will reduce some of the work, but you will still have to check the links by hand. It is probably impossible for programs to check for duplicates, so this cannot be a bot. The most this can be is a program that only writes part of the wikicode.
The benefit of having a program write part of the wikicode for your is pretty clear though. You don't have to focus on copying links or titles into the correct syntax. And you may not have to focus on getting the date.
i see... then i guess it's pretty heplful. esp. for youtaite, since i think completing youtaite playlists are more tedious than utaite playlists
however, i understood it this way:
if on a page the code is like this
# "World is mine" (XXXX.XX.XX) # "magnet" (XXXX.XX.XX) # "whatever" (XXXX.XX.XX)
we can use this to make it like this
# "[youtube.com/watch?v=XXXXXXX World is mine]" (2012.12.12) # "[youtube.com/watch?v=AAAAA magnet]" (2010.12.01) # "[youtube.com/watch?v=SSSSS whatever]" (2005.04.02)
but if the code varies like this
# "Suji Chigai" (Misdirected) (parody of [[Suki kirai]]) -Short ver.- feat. Faneru and [[kogeinu]] (2012.05.04)
(ok this is an extreme example) i wonder, if it can deal with it
and another thing is: can it convert the YT date format to the XXXX.XX.XX format, i wonder?
(sorry, i never dealt with bots/python codes)
If it is complicated to interpret what to do with a song, or if it has multiple authors, those extra details will need to be added afterwords. And while writing the program, you can format the date into any format you prefer.
You can in fact create an AWB bot to automate that for dates we already have with this tool: http://en.wikipedia.org/wiki/Wikipedia:AutoWikiBrowser. It might take more effort to figure out how regexes work. I didn't completely learn about them until several years after I started programming.
well i might take a look at it, when i have more time after christmas, if no one else has done it so far.
thanks for your helpfulness *bows down to 90°*
edit: or actually in one week, when exams period is over.
im not sure about this. but for your python code, we need a pywikiabot don't we?
and i think for sth like this, i think an exra account is recommended...
I just reviewed the bot-creation guide and you're right, a second account is recommended. This is both to be consistent wiki wiki policy and in case we want this bot account to do more tasks later on.
A bot is good for maintaining a page if the edits are obvious, like Utaite_Wiki:Directory.
However, creating a list of links is different. It is a matter of running a program that reads rss pages, and then manually copying its printouts into a page.
What do you think?