Archivierer der Warteschlange
Zur Navigation springen
Zur Suche springen
#!/shared/tcl/bin/tclsh8.6
source api2.tcl
set lang beta ; source langwiki.tcl
source procs.tcl
set date "$year I[expr {$month > 6?{I}:{}}]"
set token [login $wiki]
set i -1
foreach block [set blocks [join [content [post $wiki {*}$get / titles [set title user:Luke081515/Test/3]]]]] {
lappend blocklists [lreplace [split $block |=] 0 0]
}
foreach blocklist $blocklists {
if {[dict get $blocklist STATUS] in {e f n u}} {
if {[incr j] > 5} {
lappend archblocklists "{{[lindex $blocks [incr i]]}}"
} else {
lappend stayblocklists "{{[lindex $blocks [incr i]]}}"
}
} else {
lappend stayblocklists "{{[lindex $blocks [incr i]]}}"
} }
if [exists archblocklists] {
puts \n[edit $title/Archiv/$date {Archivierung erfolgreich} {} / prependtext [join [lreverse $archblocklists] \n]\n]
puts \n[edit $title "Archivierung nach \[\[$title/Archiv/$date\]\]" [join $stayblocklists \n]]\n
}