User:FlBot/pseudocode
This page contains the pseudocode of AtyndallBot's functions (if approved). This code will be converted to PHP when ready. If you have an queries about the code, feel free to contact Atyndall.
Assess and Delete function
This function will not be developed because
- I could never get it approved as an admin
- MetsBot already performs that function
//Psudocode of AtyndallBot performing image deletion task
Login to Wikipedia using account AtyndallBot
FOREVER {
Access category "Category:All images with the same name on Wikimedia Commons"
Generate list of Image names
Count images, add value to $amount
Make $i = 1
REPEAT UNTIL $i == $amount {
Access image $i on list
Add image name to varible $wikipediaimagename
Find out name of user who placed {{nowcommons}} template
Add template placer's name to $templateuser
Check for non-free licences (regexes found in nonfree.include.php)
IF FOUND {
Place {{AtyndallBotAssessed|Failed}}
Remove {{nowcommons}} template
Post message $templateuser's talkpage (messages found in messages.include.php)
Move to next image
}
ELSE CONTINUE
Check for free licences (regexes found in free.include.php)
IF NOT FOUND {
Post message to adder of templates userpage (messages found in messages.include.php)
Move to next image
}
ELSE CONTINUE
Find out link to main file
Find out link to commons page
Access commons page
Find out link to main file on commons
Run MD5 hash on main file on Wikipedia ($wikiMD5)
Run MD5 hash on main file on Commons ($commonsMD5)
Compare $wikiMD5 and $commonsMD5
IF NOT EQUAL {
Post message to adder of templates userpage (messages found in messages.include.php)
Move to next image
}
ELSE CONTINUE
Delete Wikipedia image with reason "Exact duplicate of [[:Image:$1]] on Commons"
Increment $i by one ($i++)
}
}
Content Disclaimer
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.
- The information displayed on this website is sourced in part or in whole from Wikipedia and has been adapted for the purpose of restating it. We strive to provide accurate and relevant information, however:
- There is no guarantee of absolute accuracy. Wikipedia is an open, collaborative project that can be edited by anyone, so information is subject to change.
- It is not intended to constitute professional advice. The content displayed is for informational and educational purposes only. For important decisions (e.g., medical, legal, or financial), please consult a professional.
- Content copyright. Wikipedia is licensed under the Creative Commons Attribution-ShareAlike License (CC BY-SA). This means that content may be reused with appropriate attribution and shared under a similar license.
- Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.