User:TaxonBot/NeueArtikel5.tcl

From Wikipedia

(.*)} $nportal ]]]] foreach item [regexp -all -inline -- {\[\[.*?\]\]} $locportal] { regsub -all -- , $item @comma@ comma regsub -- [regexvar $item] $locportal $comma locportal } set locportal [string map {@comma@ , {\&} &} [split $locportal ,]] foreach 1 $locportal {lappend tlocportal [string trim $1]} foreach line $tlocportal { if ![empty line] { regsub -all -nocase -- {\[\[(?!Datei:|File:|:)} $line \[\[: nline regexp -- {\[\[(.*?)\]\] \((.*?)\)} $nline -- item linedate set linedate [string trim [ clock format [clock scan $linedate -format $linedateformat -locale de] -format $linedateformat -locale de ]] set lineday [clock format [clock scan $linedate -format $linedateformat -locale de] -format %d] set linemonth [clock format [clock scan $linedate -format $linedateformat -locale de] -format %m] set lineyear [clock format [clock scan $linedate -format $linedateformat -locale de] -format %Y] if {$linemonth eq {12} && $tmonth eq {01}} { set clinedate [clock scan "[incr lineyear -1] $linemonth $lineday" -format {%Y %m %d}] } else { set clinedate [clock scan "$lineyear $linemonth $lineday" -format {%Y %m %d}] } if {$clinedate > [expr $altdate - 86400] && ![missing $item] && ![redirect $item] && $item ni $bkl} { lappend lncportal $clinedate "\[\[$item\]\] ($linedate)" } } } foreach {hit lemma ts} [lrange [join [lsort -unique -decreasing $titles]] 1 end] { if {$lemma eq {/leer/}} {continue} if {$hit == 3} { lassign [list [lindex $lemma 0] [lindex $lemma 1]] src tgt if {[string first \[\[:$src\]\] $lncportal] > -1 || [string first \[\[$src\]\] $lncportal] > -1} { set lncportal [string map [list \[\[:$src\]\] \[\[:$tgt\]\] \[\[$src\]\] \[\[:$tgt\]\]] $lncportal] continue } else { set lemma $tgt } }

 			if {[redirect $lemma] || [missing $lemma] || $lemma in $bkl} {continue}

if {[string first \[\[:$lemma\]\] $lncportal] == -1 && [string first \[\[$lemma\]\] $lncportal] == -1} { set neudate [clock scan $ts -format {%Y %m %d}] set linets [clock format $neudate -format $linedateformat -locale de] set neu [string trim [clock format $neudate -format {%e. %B} -locale de]] set lncportal [linsert $lncportal 0 $neudate "\[\[:$lemma\]\] ($neu)"] } } set lncportal [lsort -stride 2 -integer -decreasing $lncportal] foreach {-- ncportal} $lncportal { lappend nlncportal $ncportal } set nacount [regexp -all -- {\[\[:} $lncportal] return [string map {& {\&}} [join $nlncportal ,\n]] } }

proc portals {portal nportal data} { global tmonth bkl nacount set lncportal {} dict with data { if {$listformat eq {SHORTLIST}} {set linedateformat %d.%m.} else {set linedateformat {%d. %b}} set dateformat {%Y %m %d} set altdate [clock scan $alt -format $dateformat] set locportal [split [join [dict values [ regexp -inline -- {(.*)} $nportal ]]] \n] if {$locportal eq Template:Der Inhalt (neue Artikel) wird in den nächsten Stunden bzw. Tagen aktualisiert.} {set locportal {}} foreach line $locportal { lassign {} nline2 nline12 set line [string trim $line] if ![empty line] { regsub -all -nocase -- {\[\[(?!Datei:|File:|:)} $line \[\[: nline if {$listformat eq {SHORTLIST}} { regexp -- {(\d{1,2}\.\d\d\.)} $nline -- olinedate } else { regexp -- {(\d{1,2}\. \w{3,4})} $nline -- olinedate } if {[string index $olinedate 1] eq {.}} { set linedate 0$olinedate set nline [string map [list $olinedate $linedate] $nline] } else { set linedate $olinedate } if {$linedate ne {}} { set lineday [clock format [clock scan $linedate -format $linedateformat -locale de] -format %d] set linemonth [clock format [clock scan $linedate -format $linedateformat -locale de] -format %m] set lineyear [clock format [clock scan $linedate -format $linedateformat -locale de] -format %Y] if {$linemonth eq {12} && $tmonth eq {01}} { set clinedate [clock scan "[incr lineyear -1] $linemonth $lineday" -format {%Y %m %d}] } else { set clinedate [clock scan "$lineyear $linemonth $lineday" -format {%Y %m %d}] } if {$clinedate > [expr $altdate - 86400]} { regexp -- {^(.*? )\[} $nline -- nline1 set znline [dict values [regexp -all -inline -- {\[\[(.*?)\]\]} $nline]] foreach item $znline {if {![missing $item] && ![redirect $item] && $item ni $bkl} {lappend nline2 \[\[$item\]\]}} } } if ![empty nline2] { lappend lncportal $clinedate [append nline12 $nline1 [join $nline2 { · }]] } } } foreach {hit lemma ts} [lrange [join [lsort -unique -decreasing $titles]] 1 end] { if {$lemma eq {/leer/}} {continue} if {$hit == 3} { lassign [list [lindex $lemma 0] [lindex $lemma 1]] src tgt if {[string first \[\[:$src\]\] $lncportal] > -1 || [string first \[\[$src\]\] $lncportal] > -1} { set lncportal [string map [list \[\[:$src\]\] \[\[:$tgt\]\] \[\[$src\]\] \[\[:$tgt\]\]] $lncportal] continue } else { set lemma $tgt } } if {[redirect $lemma] || [missing $lemma] || $lemma in $bkl} {continue} if {[string first \[\[:$lemma\]\] $lncportal] == -1 && [string first \[\[$lemma\]\] $lncportal] == -1} { set neudate [clock scan $ts -format $dateformat] set linets [clock format $neudate -format $linedateformat -locale de] set reset 0 foreach {tskey line} $lncportal { if {$tskey == $neudate} { set lncportal [string map [ list >$linets ">$linets \[\[:$lemma\]\] ·" "* $linets.:" "* $linets.: \[\[:$lemma\]\] ·" "* $linets:" "* $linets: \[\[:$lemma\]\] ·" ] $lncportal] set reset 1 } } if !$reset { if {$listformat eq {SHORTLIST}} { lappend lncportal $neudate "• $linets \[\[:$lemma\]\]" } elseif {[lindex $linets 1] eq {Mai}} { lappend lncportal $neudate "* $linets: \[\[:$lemma\]\]" } else { lappend lncportal $neudate "* $linets.: \[\[:$lemma\]\]" } } } } set nacount [regexp -all -- {\[\[:} $lncportal] return [string map {& {\&}} [join [dict values [lsort -stride 2 -integer -decreasing $lncportal]] \n]] } }

proc catselect {key kdbranch catdb icatdb} { global $key\kat lassign {} $key\match wDWmatch if {$key eq {kd}} { set keykat [dict get $kdkat $kdbranch] if [empty keykat] {return {}} foreach kdcat $keykat { set icheck 0 if {$kdcat in $icatdb} { incr icheck break } } if !$icheck { foreach kdcat $keykat { if {$kdcat in $catdb} { lappend kdmatch $kdcat } } } return $kdmatch } else { set keykat [subst $$key\kat] foreach "$key l$key\cat" $keykat { set icheck 0 if {$key eq {qs}} {set l$key\cat [dict get [subst $[subst l$key\cat]] pagecat]}

  1. foreach item [subst $[subst l$key\cat]] {set myarray($item) 1}
  2. foreach item $icatdb { if {$myarray($item)} { incr icheck ; break } }
  3. array unset myarray

foreach $key\cat [subst $[subst l$key\cat]] { if {[subst $$key\cat] in $icatdb} { incr icheck break } }

  1. set icheck [llength [struct::set intersect [subst $[subst l$key\cat]] $icatdb]]

if !$icheck { foreach $key\cat [subst $[subst l$key\cat]] { if {[subst $$key\cat] in $catdb && [subst $$key] ni [subst $$key\match]} { lappend $key\match [subst $$key] } } } if {[llength $wDWmatch] == 50} {break} } return [subst $$key\match] } }

proc qsw portal { global lkkat kdkat rvkat qskat phkat phdict qscount listformat lassign {0 LIST ALL {} {Zurzeit keine} {} {}} qscount listformat LISTS ALWAYSSHOW EMPTY IGNORE-QS QSWORKLIST set qswdb [read [set f [open QSWORKLIST/[string map {{ } _ ~ 15:52, 7 February 2024 (UTC) / ~ ! ´´´´} $portal] r]]] ; close $f dict with qswdb { set listformat [dict get $param listformat] set LISTS [join [split [dict get $param LISTS] ,]] set ALWAYSSHOW [join [split [dict get $param ALWAYSSHOW] ,]] set EMPTY [dict get $param EMPTY] try {set IGNORE-QS [join [split [dict get $param IGNORE-QS] ,]]} on 1 {} {set IGNORE-QS {}}

  1. set LISTS ALL

if {({ALL} in $LISTS && {-LK} ni $LISTS) || {LK} in $LISTS} { set lkblock {} set lkmatch [catselect lk -- $catdb $icatdb]

  1. puts lkmatch:$lkmatch

foreach lk [lsort -unique $lkmatch] { if [matchtemplate $lk Vorlage:Löschantragstext] {catch { regexp -- {\{\{Löschantragstext\|tag=(.*?)\|monat=(.*?)\|jahr=(.*?)\|titel=(.*?)[|\}]} [conts t $lk x] -- dy mo yr tx set ladate1 [string map {{ } {}} [clock format [ set c [clock scan [list $dy $mo $yr] -format {%e %B %Y} -locale de] ] -format %e.%N.]] set ladate2 [string trim [clock format $c -format {%e. %B %Y} -locale de]] lappend lkblock [format %s $lk $ladate2 $tx $ladate1] }} } incr qscount [set lkcount [llength $lkblock]] set lkblock [join $lkblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set lkbranch ";\[\[Datei:Fairytale Trash Question.svg|30x15px|text-unten|Löschkandidat|link=:Kategorie:Wikipedia:Löschkandidat\]\] Löschkandidat ([tdot $lkcount])" if ![empty lkblock] { append QSWORKLIST \n$lkbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$lkblock } elseif {({ALL} in $ALWAYSSHOW && {-LK} ni $ALWAYSSHOW) || {LK} in $ALWAYSSHOW} { append QSWORKLIST \n$lkbranch\n$EMPTY } } if {({ALL} in $LISTS && {-KD} ni $LISTS) || {KD} in $LISTS} { set kdblock {} foreach kdbranch {kdla kdub kdzf kdqs} { set kdmatch [catselect kd $kdbranch $catdb $icatdb]

  1. puts kdmatch:$kdmatch

foreach kd [lsort -unique $kdmatch] { catch { set kdc [conts t $kd x]

  1. puts $kdbranch:$kd

switch $kdbranch { kdla { if [matchtemplate $kd Vorlage:Löschantragstext] { regexp -- {Löschantragstext\|tag=(.*?)\|monat=(.*?)\|jahr=(.*?)\|titel=(.*?)[|\}]} $kdc -- dy mo yr tx set ladate1 [string map {{ } {}} [clock format [ set c [clock scan [list $dy $mo $yr] -format {%e %B %Y} -locale de] ] -format %e.%N.]] set ladate2 [string map {{ } {}} [clock format $c -format %Y/%B/%e -locale de]] lappend kdblock [format %s $kd $ladate2 $tx $ladate1] } } kdub { if [matchtemplate $kd Vorlage:Umbenennungstext] { regexp -- {Umbenennungstext\|tag=(.*?)\|monat=(.*?)\|jahr=(.*?)\|ziel=(.*?)[|\}]} $kdc -- dy mo yr tx set ladate1 [string map {{ } {}} [clock format [ set c [clock scan [list $dy $mo $yr] -format {%e %B %Y} -locale de] ] -format %e.%N.]] set ladate2 [string map {{ } {}} [clock format $c -format %Y/%B/%e -locale de]] lappend kdblock [format %s $kd $ladate2 $kd $tx $ladate1] } } kdzf { if [matchtemplate $kd Vorlage:Zusammenführungstext] { regexp -- {Zusammenführungstext\|tag=(.*?)\|monat=(.*?)\|jahr=(.*?)\|ziel=(.*?)[|\}]} $kdc -- dy mo yr tx set ladate1 [string map {{ } {}} [clock format [ set c [clock scan [list $dy $mo $yr] -format {%e %B %Y} -locale de] ] -format %e.%N.]] set ladate2 [string map {{ } {}} [clock format $c -format %Y/%B/%e -locale de]] lappend kdblock [format %s $kd $ladate2 $kd $tx $ladate1] } } kdqs { if [matchtemplate $kd Vorlage:QS-Antrag-Kategorien] { regexp -- {QS-Antrag-Kategorien\|tag=(.*?)\|monat=(.*?)\|jahr=(.*?)[|\}]} $kdc -- dy mo yr set ladate1 [string map {{ } {}} [clock format [ set c [clock scan [list $dy $mo $yr] -format {%e %B %Y} -locale de] ] -format %e.%N.]] set ladate2 [string map {{ } {}} [clock format $c -format %Y/%B/%e -locale de]] lappend kdblock [format {Template:W-Link} $kd $ladate2 $kd $ladate1] } } } } } } incr qscount [set kdcount [llength $kdblock]] set kdblock [join $kdblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set kdbranch ";\[\[Datei:Categorisation-hierarchy-left2right.svg|30x15px|text-unten|Kategoriendiskussion|link=:Kategorie:Wikipedia:Kategorienwartung\]\] Kategoriendiskussion ([tdot $kdcount])" if ![empty kdblock] { append QSWORKLIST \n$kdbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$kdblock } elseif {({ALL} in $ALWAYSSHOW && {-KD} ni $ALWAYSSHOW) || {KD} in $ALWAYSSHOW} { append QSWORKLIST \n$kdbranch\n$EMPTY } } if {({ALL} in $LISTS && {-RV} ni $LISTS) || {RV} in $LISTS} { set rvblock {} set rvmatch [catselect rv -- $catdb $icatdb]

  1. puts rvmatch:$rvmatch

foreach rv [lsort -unique $rvmatch] { if {[matchtemplate $rv Vorlage:Review] || [matchtemplate $rv Vorlage:Schreibwettbewerb] || [matchtemplate $rv Vorlage:UIBK-Bio]} { regexp -- {\{\{(Review\|(.*?)|Schreibwettbewerb|UIBK-Bio)??\}\}} [conts t $rv x] -- rvpage rvlink

  1. puts $rvpage:$rvlink ; gets stdin

if {$rvpage eq {Schreibwettbewerb}} { lappend rvblock [format {%s (SW)} $rv] } elseif {[string first Review $rvpage] > -1} { if [matchtemplate $rv Vorlage:Schreibwettbewerb] { set swplus { (SW+} } else { set swplus { (} } lappend rvblock [format {%s%s%s)} $rv $swplus $rvlink $rv $rvlink] } elseif {$rvpage eq {UIBK-Bio}} { lappend rvblock [format {%s (UIBK-Bio)} $rv $rv] } } } incr qscount [set rvcount [llength $rvblock]] set rvblock [join $rvblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set rvbranch ";\[\[Datei:Qsicon inArbeit blue.svg|30x15px|text-unten|Review|link=:Kategorie:Wikipedia:Reviewprozess\]\] Review ([tdot $rvcount])" if ![empty rvblock] { append QSWORKLIST \n$rvbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$rvblock } elseif {({ALL} in $ALWAYSSHOW && {-RV} ni $ALWAYSSHOW) || {RV} in $ALWAYSSHOW} { append QSWORKLIST \n$rvbranch\n$EMPTY } } if {({ALL} in $LISTS && {-QS} ni $LISTS) || {QS} in $LISTS} { set qsblock {} set qsmatch [catselect qs -- $catdb $icatdb]

  1. puts qsmatch:$qsmatch

foreach qs [lsort -unique $qsmatch] { set qsdict [dict get $qskat $qs] dict with qsdict { if {[matchtemplate $qs Vorlage:$qstempl] && ((${IGNORE-QS} ne {ALL} && $qstempl ni ${IGNORE-QS}) || $qsshort eq {0})} { switch $qsshort { 0 { set qsdate1 {} regexp -- {\{\{QS-Antrag\|(.*?)[|\}]} [conts t $qs x] -- qsdate1 if ![empty qsdate1] { set qsdate2 [string map {{ } {}} [ clock format [clock scan $qsdate1 -format {%e. %B %Y} -locale de] -format %e.%N. ]] lappend qsblock [ format %s $qs $qsdate1 $qs $qsdate2 ] } } AUG { lappend qsblock [format {Template:W-Link} $qs $qs $qsshort] } BKP { set nut {} regexp -- {\{\{QS-BKS\|(.*?)[|\}]} [conts t $qs x] -- nut if {[string tolower $nut] eq {knacknüsse=ja}} {set qslong WP:BKF/K} lappend qsblock [format {Template:W-Link} $qs $qslong $qs $qsshort] } C { set nut {} regexp -- {\{\{QS-Chemie\|(.*?)[|\}]} [conts t $qs x] -- nut if {[string tolower $nut] eq {knacknüsse=ja}} {set qslong WP:RC/K} lappend qsblock [format {Template:W-Link} $qs $qslong $qs $qsshort] } FF { regexp -- {\{\{QS-FF\|(.*?)[|\}]} [conts t $qs x] -- qsdate if ![catch {clock scan [string trim $qsdate] -format {%B %Y} -locale de}] { lappend qsblock [format {Template:W-Link} $qs $qslong $qsdate $qsshort] } else { lappend qsblock [format {Template:W-Link} $qs $qslong $qsshort] } } MIL { lappend qsblock [format {Template:W-Link} $qs $qs $qsshort] } SCHIFF { lappend qsblock [format {Template:W-Link} $qs $qs $qsshort] } U { lappend qsblock [format {Template:W-Link} $qs $qs $qsshort] } USA { regexp -- {\{\{QS-USA\|(.*?)[|\}]} [conts t $qs x] -- state lappend qsblock [format {Template:W-Link} $qs $qslong $state $qsshort] } WF { lappend qsblock [format {Template:W-Link} $qs $qs $qsshort] } § { set nut {} regexp -- {\{\{QS-Recht\|(.*?)[|\}]} [conts t $qs x] -- nut if {[string tolower $nut] eq {knacknüsse=ja}} {append qslong /Knacknüsse} lappend qsblock [format {Template:W-Link} $qs $qslong $qs $qsshort] } default { lappend qsblock [format {Template:W-Link} $qs $qslong $qs $qsshort] } } } } } incr qscount [set qsqscount [llength $qsblock]] set qsblock [join $qsblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : $listformat eq {CLIST} ? {#} : {*}}] "] set qsbranch ";\[\[Datei:Qsicon Fokus2.svg|30x15px|text-unten|Qualitätssicherung|link=:Kategorie:Wikipedia:Qualitätssicherung\]\] Qualitätssicherung ([tdot $qsqscount])" if ![empty qsblock] { append QSWORKLIST \n$qsbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$qsblock } elseif {({ALL} in $ALWAYSSHOW && {-QS} ni $ALWAYSSHOW) || {QS} in $ALWAYSSHOW} { append QSWORKLIST \n$qsbranch\n$EMPTY } } if {({ALL} in $LISTS && {-PH} ni $LISTS) || {PH} in $LISTS} { set phblock {} set phmatch [catselect ph -- $catdb $icatdb]

  1. puts phmatch:$phmatch

foreach ph [lsort -unique $phmatch] { unset -nocomplain proj if {[matchtemplate $ph Vorlage:Portalhinweis] || [matchtemplate $ph Vorlage:Projekthinweis] || [matchtemplate $ph Vorlage:Redaktionshinweis]} { regexp -- {\{\{((Portal|Projekt|Redaktions)??hinweis)\|(.*?)(\|(.*?)\}|\})} [conts t $ph x] -- -- type proj -- sub if [exists proj] { switch $type { Portal {set project PD:$proj} Projekt {set project "WD:WikiProjekt $proj"} Redaktions {set project "WP:Redaktion $proj"} } catch { set phdictval [dict get $phdict $type:$proj] set proj [lindex $phdictval 0] set project [lindex $phdictval 1] } switch $type { Portal { lappend phblock [format %s $ph $project $ph $proj] } Projekt { if ![empty sub] { lappend phblock [format %s $ph $project $sub $ph $proj] } else { lappend phblock [format %s $ph $project $ph $proj] } } Redaktions { if ![empty sub] { lappend phblock [format %s $ph $project $sub $proj] } else { lappend phblock [format %s $ph $project $ph $proj] } } } } else { lappend phblock [format {%s} $ph] } } } incr qscount [set phcount [llength $phblock]] set phblock [join $phblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set phbranch ";\[\[Datei:Icon tools.svg|30x15px|text-unten|Projekthinweis|link=:Kategorie:Wikipedia:Qualitätssicherung\]\] Projekthinweis ([tdot $phcount])" if ![empty phblock] { append QSWORKLIST \n$phbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$phblock } elseif {({ALL} in $ALWAYSSHOW && {-PH} ni $ALWAYSSHOW) || {PH} in $ALWAYSSHOW} { append QSWORKLIST \n$phbranch\n$EMPTY } }

  1. puts qscount:$qscount
  2. puts $listformat

return [string map {& {\&}} $QSWORKLIST]

  1. puts [edit user:TaxonBota/qstest "Bot: QSWORKLIST: $qscount" $QSWORKLIST]

} }

proc w portal { global db tyear tmonth wUEkat wUVkat wLUEkat wLkat wQFkat wNkat wKATkat wVVkat wDWkat wVSkat wINTkat wWkat wRDkat wAZkat wALTkat global wGEOkat wVFkat wDFkat wDFit wBWkat hidden wcount listformat lassign {0 LIST ALL {} {Zurzeit keine} {}} wcount listformat LISTS ALWAYSSHOW EMPTY WORKLIST set wdb [read [set f [open WORKLIST/[string map {{ } _ ~ 15:52, 7 February 2024 (UTC) / ~ ! ´´´´} $portal] r]]] ; close $f dict with wdb { set listformat [dict get $param listformat] set LISTS [join [split [dict get $param LISTS] ,]] set ALWAYSSHOW [join [split [dict get $param ALWAYSSHOW] ,]] set EMPTY [dict get $param EMPTY]

  1. set LISTS ALL
  2. set ALWAYSSHOW ALL

if {({ALL} in $LISTS && {-UE} ni $LISTS) || {UE} in $LISTS} { set wUEblock {} set wUEmatch [catselect wUE -- $catdb $icatdb]

  1. puts wUEmatch:$wUEmatch

if ![empty wUEmatch] { foreach wUE [lsort -unique $wUEmatch] {lappend orpt '[sql <- $wUE]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Überarbeiten' order by page_title ;" pt { lappend wUEblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wUEcount [llength $wUEblock]] set wUEblock [join $wUEblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wUEbranch ";\[\[Datei:Qsicon Ueberarbeiten.svg|30x15px|text-unten|Überarbeiten|link=:Kategorie:Wikipedia:Überarbeiten\]\] Überarbeiten ([tdot $wUEcount])" if ![empty wUEblock] { append WORKLIST \n$wUEbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wUEblock } elseif {({ALL} in $ALWAYSSHOW && {-UE} ni $ALWAYSSHOW) || {UE} in $ALWAYSSHOW} { append WORKLIST \n$wUEbranch\n$EMPTY } } if {({ALL} in $LISTS && {-UV} ni $LISTS) || {UV} in $LISTS} { set wUVblock {} set wUVmatch [catselect wUV -- $catdb $icatdb]

  1. puts wUVmatch:$wUVmatch

if ![empty wUVmatch] { foreach wUV [lsort -unique $wUVmatch] {lappend orpt '[sql <- $wUV]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Unverständlich' order by page_title ;" pt { set pt [sql -> $pt] lappend wUVblock "\[\[:$pt\]\] \[\[Diskussion:$pt|(Disk)\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wUVcount [llength $wUVblock]] set wUVblock [join $wUVblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wUVbranch ";\[\[Datei:Qsicon Unverstaendlich.svg|30x15px|text-unten|Allgemeinverständlichkeit|link=:Kategorie:Wikipedia:Unverständlich\]\] Allgemeinverständlichkeit ([tdot $wUVcount])" if ![empty wUVblock] { append WORKLIST \n$wUVbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wUVblock } elseif {({ALL} in $ALWAYSSHOW && {-UV} ni $ALWAYSSHOW) || {UV} in $ALWAYSSHOW} { append WORKLIST \n$wUVbranch\n$EMPTY } } if {({ALL} in $LISTS && {-LUE} ni $LISTS) || {LUE} in $LISTS} { set wLUEblock {} set wLUEmatch [catselect wLUE -- $catdb $icatdb]

  1. puts wLUEmatch:$wLUEmatch

if ![empty wLUEmatch] { foreach wLUE [lsort -unique $wLUEmatch] {lappend orpt '[sql <- $wLUE]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Lückenhaft' order by page_title ;" pt { lappend wLUEblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wLUEcount [llength $wLUEblock]] set wLUEblock [join $wLUEblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wLUEbranch ";\[\[Datei:Qsicon Lücke.svg|30x15px|text-unten|Lückenhaft|link=:Kategorie:Wikipedia:Lückenhaft\]\] Lückenhaft ([tdot $wLUEcount])" if ![empty wLUEblock] { append WORKLIST \n$wLUEbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wLUEblock } elseif {({ALL} in $ALWAYSSHOW && {-LUE} ni $ALWAYSSHOW) || {LUE} in $ALWAYSSHOW} { append WORKLIST \n$wLUEbranch\n$EMPTY } } if {({ALL} in $LISTS && {-L} ni $LISTS) || {L} in $LISTS} { set wLblock {} set wLmatch [catselect wL -- $catdb $icatdb]

  1. puts wLmatch:$wLmatch

if ![empty wLmatch] { foreach wL [lsort -unique $wLmatch] {lappend orpt '[sql <- $wL]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Nur_Liste' order by page_title ;" pt { lappend wLblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wLcount [llength $wLblock]] set wLblock [join $wLblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wLbranch ";\[\[Datei:QSicon Formatierung.svg|30x15px|text-unten|NurListe|link=:Kategorie:Wikipedia:Nur Liste\]\] Nur Liste ([tdot $wLcount])" if ![empty wLblock] { append WORKLIST \n$wLbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wLblock } elseif {({ALL} in $ALWAYSSHOW && {-L} ni $ALWAYSSHOW) || {L} in $ALWAYSSHOW} { append WORKLIST \n$wLbranch\n$EMPTY } } if {({ALL} in $LISTS && {-QF} ni $LISTS) || {QF} in $LISTS} { set wQFblock {} set wQFmatch [catselect wQF -- $catdb $icatdb]

  1. puts wQFmatch:$wQFmatch

if ![empty wQFmatch] {

  1. foreach wQF [lsort -unique $wQFmatch] {lappend wQFblock \[\[:$wQF\]\]}

foreach wQF [lsort -unique $wQFmatch] {lappend orpt '[sql <- $wQF]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Belege_fehlen' order by page_title ;" pt { lappend wQFblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wQFcount [llength $wQFblock]] set wQFblock [join $wQFblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wQFbranch ";\[\[Datei:Qsicon Quelle.svg|30x15px|text-unten|Belege fehlen|link=:Kategorie:Wikipedia:Belege fehlen\]\] Belege fehlen ([tdot $wQFcount])" if ![empty wQFblock] { append WORKLIST \n$wQFbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wQFblock } elseif {({ALL} in $ALWAYSSHOW && {-QF} ni $ALWAYSSHOW) || {QF} in $ALWAYSSHOW} { append WORKLIST \n$wQFbranch\n$EMPTY } } if {({ALL} in $LISTS && {-N} ni $LISTS) || {N} in $LISTS} { set wNblock {} set wNmatch [catselect wN -- $catdb $icatdb]

  1. puts wNmatch:$wNmatch

if ![empty wNmatch] { foreach wN [lsort -unique $wNmatch] {lappend orpt '[sql <- $wN]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Neutralität' order by page_title ;" pt { lappend wNblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wNcount [llength $wNblock]] set wNblock [join $wNblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wNbranch ";\[\[Datei:Qsicon Achtung.svg|30x15px|text-unten|Neutralität|link=:Kategorie:Wikipedia:Neutralität\]\] Neutralität ([tdot $wNcount])" if ![empty wNblock] { append WORKLIST \n$wNbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wNblock } elseif {({ALL} in $ALWAYSSHOW && {-N} ni $ALWAYSSHOW) || {N} in $ALWAYSSHOW} { append WORKLIST \n$wNbranch\n$EMPTY } } if {({ALL} in $LISTS && {-KAT} ni $LISTS) || {KAT} in $LISTS} { set wKATblock {} set wKATmatch [catselect wKAT -- $catdb $icatdb]

  1. puts wKATmatch:$wKATmatch

if {$wKATmatch ne {{}}} { foreach wKAT [lsort -unique $wKATmatch] { if {![missing $wKAT] && ![redirect $wKAT]} { set lpagecat [pagecat $wKAT] foreach cat $lpagecat { if {$cat in $hidden} { lremove lpagecat $cat } } if {$lpagecat eq {}} { lappend wKATblock "\[\[:$wKAT\]\]" } } } } incr wcount [set wKATcount [llength $wKATblock]] set wKATblock [join $wKATblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wKATbranch ";\[\[Datei:Nuvola filesystems folder red open.png|30x15px|text-unten|Kategorisieren|link=:Wikipedia:Kategorien\]\] Nicht kategorisierte Seite ([tdot $wKATcount])" if ![empty wKATblock] { append WORKLIST \n$wKATbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wKATblock } elseif {({ALL} in $ALWAYSSHOW && {-KAT} ni $ALWAYSSHOW) || {KAT} in $ALWAYSSHOW} { append WORKLIST \n$wKATbranch\n$EMPTY } } if 0 { if {({ALL} in $LISTS && {-VV} ni $LISTS) || {VV} in $LISTS} { set wVVblock {} set wVVmatch [catselect wVV -- $catdb $icatdb]

  1. puts wVVmatch:$wVVmatch

if ![empty wVVmatch] { foreach wVV [lsort -unique $wVVmatch] { #Blacklist vom Portal gewünscht, bis 01.01.2019 befristet if {$portal eq {Portal:Schach/Werkstatt} && [lindex $wVV 0] eq {Zoltán Sárosy} && $tyear < 2019} {continue} lassign [list [lindex $wVV 0] [lindex $wVV 1]] wVV0 wVV1 if {[string first Gestorben [pagecat $wVV0]] == -1} { if {[lindex $wVV1 0] ne {}} { foreach {lll llt} $wVV1 { lappend lwVV1 "\[\[:$lll:$llt|$lll\]\]" } lappend wVVblock "\[\[:$wVV0\]\] ([join $lwVV1 { / }])" } else { lappend wVVblock "\[\[:$wVV0\]\]" } } } } incr wcount [set wVVcount [llength $wVVblock]] set wVVblock [join $wVVblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wVVbranch ";\[\[Datei:Gnome-face-angel.svg|30x15px|text-unten|Verstorben|link=:Benutzer:MerlBot/Vermutlich verstorben\]\] Vermutlich verstorben ([tdot $wVVcount])" if ![empty wVVblock] { append WORKLIST \n$wVVbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wVVblock } elseif {({ALL} in $ALWAYSSHOW && {-VV} ni $ALWAYSSHOW) || {VV} in $ALWAYSSHOW} { append WORKLIST \n$wVVbranch\n$EMPTY } } } #wSOL if {({ALL} in $LISTS && {-INT} ni $LISTS) || {INT} in $LISTS} { set wINTblock {} set wINTmatch [catselect wINT -- $catdb $icatdb]

  1. puts wINTmatch:$wINTmatch

if ![empty wINTmatch] { foreach wINT [lsort -unique $wINTmatch] {lappend orpt '[sql <- $wINT]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to like '%lastig' order by page_title ;" pt { lappend wINTblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wINTcount [llength $wINTblock]] set wINTblock [join $wINTblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wINTbranch ";\[\[Datei:German-Language-Flag.svg|30x15px|text-unten|Internationalisierung|link=:Kategorie:Wikipedia:Staatslastig\]\] Internationalisierung ([tdot $wINTcount])" if ![empty wINTblock] { append WORKLIST \n$wINTbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wINTblock } elseif {({ALL} in $ALWAYSSHOW && {-INT} ni $ALWAYSSHOW) || {INT} in $ALWAYSSHOW} { append WORKLIST \n$wINTbranch\n$EMPTY } } if {({ALL} in $LISTS && {-W} ni $LISTS) || {W} in $LISTS} { set wWblock {} set wWmatch [catselect wW -- $catdb $icatdb]

  1. puts wWmatch:$wWmatch

if ![empty wWmatch] { foreach wW [lsort -unique $wWmatch] {lappend orpt '[sql <- $wW]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to = 'Wikipedia:Widerspruch' order by page_title ;" pt { lappend wWblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db unset -nocomplain orpt } incr wcount [set wWcount [llength $wWblock]] set wWblock [join $wWblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wWbranch ";\[\[Datei:Split-arrows.svg|30x15px|text-unten|Widerspruch|link=:Kategorie:Wikipedia:Widerspruch\]\] Widerspruch ([tdot $wWcount])" if ![empty wWblock] { append WORKLIST \n$wWbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wWblock } elseif {({ALL} in $ALWAYSSHOW && {-W} ni $ALWAYSSHOW) || {W} in $ALWAYSSHOW} { append WORKLIST \n$wWbranch\n$EMPTY } } if {({ALL} in $LISTS && {-RD} ni $LISTS) || {RD} in $LISTS} { set wRDblock {} set wRDmatch [catselect wRD -- $catdb $icatdb]

  1. puts wRDmatch:$wRDmatch

if ![empty wRDmatch] { foreach wRDpair [lsort -unique $wRDmatch] { foreach wRD $wRDpair {lappend orpt '[sql <- [join [dict values [regexp -inline -- {^(.*?)(?:#|$)} $wRD]]]]'} lassign {} lwRDpair lct set db [get_db dewiki] mysqlreceive $db " select cl_to from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to like 'Wikipedia:Redundanz\_%' order by page_title ;" ct { if ![empty ct] {lappend lct " \[\[:[string map {{Redundanz } Redundanz/} [sql -> $ct]]|(Disk)\]\]"} } mysqlclose $db foreach wRDpairitem $wRDpair {lappend lwRDpair \[\[:$wRDpairitem\]\]} lappend wRDblock "[join $lwRDpair { ⇄ }][join [lsort -unique $lct]]" unset -nocomplain orpt lct } } incr wcount [set wRDcount [llength $wRDblock]] set wRDblock [join [lsort -unique $wRDblock] "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wRDbranch ";\[\[Datei:Merge-arrows.svg|30x15px|text-unten|Redundanz|link=:Kategorie:Wikipedia:Redundanz\]\] Redundanz ([tdot $wRDcount])" if ![empty wRDblock] { append WORKLIST \n$wRDbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wRDblock } elseif {({ALL} in $ALWAYSSHOW && {-RD} ni $ALWAYSSHOW) || {RD} in $ALWAYSSHOW} { append WORKLIST \n$wRDbranch\n$EMPTY } } if {({ALL} in $LISTS && {-GEO} ni $LISTS) || {GEO} in $LISTS} { set wGEOblock {} set wGEOmatch [catselect wGEO -- $catdb $icatdb]

  1. puts wGEOmatch:$wGEOmatch

if ![empty wGEOmatch] { foreach wGEO [lsort -unique $wGEOmatch] {lappend orpt '[sql <- $wGEO]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and cl_to like 'Wikipedia:Lagewunsch%' order by page_title ;" pt { lappend wGEOblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db set wGEOblock [lsort -unique $wGEOblock] unset -nocomplain orpt } incr wcount [set wGEOcount [llength $wGEOblock]] set wGEOblock [join $wGEOblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wGEObranch ";\[\[Datei:Georeference.svg|30x15px|text-unten|Lagewunsch|link=:Kategorie:Wikipedia:Lagewunsch\]\] Lagewunsch ([tdot $wGEOcount])" if ![empty wGEOblock] { append WORKLIST \n$wGEObranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wGEOblock } elseif {({ALL} in $ALWAYSSHOW && {-GEO} ni $ALWAYSSHOW) || {GEO} in $ALWAYSSHOW} { append WORKLIST \n$wGEObranch\n$EMPTY } } if {({ALL} in $LISTS && {-BW} ni $LISTS) || {BW} in $LISTS} { set wBWblock {} set wBWmatch [catselect wBW -- $catdb $icatdb]

  1. puts wBWmatch:$wBWmatch

if ![empty wBWmatch] { foreach wBW [lsort -unique $wBWmatch] {lappend orpt '[sql <- $wBW]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and (cl_to like 'Wikipedia:Bilderwunsch%' or cl_to = 'Wikipedia:Mineral_ohne_Bild') order by page_title ;" pt { lappend wBWblock "\[\[:[sql -> $pt]\]\]" } mysqlclose $db set wBWblock [lsort -unique $wBWblock] unset -nocomplain orpt } incr wcount [set wBWcount [llength $wBWblock]] set wBWblock [join $wBWblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wBWbranch ";\[\[Datei:Photo-request.svg|30x15px|text-unten|Bilderwunsch|link=:Kategorie:Wikipedia:Bilderwunsch\]\] Bilderwunsch ([tdot $wBWcount])" if ![empty wBWblock] { append WORKLIST \n$wBWbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wBWblock } elseif {({ALL} in $ALWAYSSHOW && {-BW} ni $ALWAYSSHOW) || {BW} in $ALWAYSSHOW} { append WORKLIST \n$wBWbranch\n$EMPTY } } if {({ALL} in $LISTS && {-AZ} ni $LISTS) || {AZ} in $LISTS} { lassign {} wAZdict wAZblock set wAZmatch [catselect wAZ -- $catdb $icatdb]

  1. puts wAZmatch:$wAZmatch

if ![empty wAZmatch] { foreach wAZ [lsort -unique $wAZmatch] {lappend orpt '[sql <- $wAZ]'} set db [get_db dewiki] mysqlreceive $db " select page_title, cl_to from page, categorylinks where cl_from = page_id and page_namespace = 0 and page_title in ([join $orpt ,]) and ((cl_to like 'Wikipedia:Veraltet\_%' or cl_to = 'Wikipedia:Veraltet') and cl_to <> 'Wikipedia:Veraltete_Normdaten') order by page_title ;" {pt ct} {

  				dict lappend wAZdict [sql -> $pt] Kategorie:[sql -> $ct]

} mysqlclose $db foreach {wAZpt wAZlct} $wAZdict { set ldate {} if {{Kategorie:Wikipedia:Veraltet} in $wAZlct} { lappend ldate 1 } else { foreach wAZct $wAZlct { regexp -- {Veraltet nach (.*)} $wAZct -- odate if ![exists odate] {continue} if {[string first Jahr $odate] == -1} { set sdate [clock format [clock scan "01 $odate" -format {%d %B %Y} -locale de] -format %Y-%m] set ndate [clock format [clock add [clock scan $sdate\-01 -format %Y-%m-%d] 1 month] -format %Y-%m] if {[clock scan $ndate\-01 -format %Y-%m-%d] <= [clock scan $tyear\-$tmonth\-01 -format %Y-%m-%d]} { lappend ldate $sdate } } else { set sdate [clock format [clock scan "01 01 $odate" -format {%d %m Jahr %Y}] -format %Y] set ndate [clock format [clock add [clock scan $sdate\-01-01 -format %Y-%m-%d] 1 year] -format %Y] if {[clock scan $ndate\-01-01 -format %Y-%m-%d] <= [clock scan $tyear\-01-01 -format %Y-%m-%d]} { lappend ldate $sdate } } } } if ![empty ldate] { if {$ldate == 1} { lappend wAZblock \[\[$wAZpt\]\] } else { lappend wAZblock "\[\[$wAZpt\]\] ([join [lsort -unique $ldate] { / }])" } } } unset -nocomplain orpt wAZdict ldate } incr wcount [set wAZcount [llength $wAZblock]] set wAZblock [join $wAZblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wAZbranch ";\[\[Datei:QSicon rot Uhr.svg|30x15px|text-unten|Veraltet|link=:Kategorie:Wikipedia:Veraltet\]\] Veraltet ([tdot $wAZcount])" if ![empty wAZblock] { append WORKLIST \n$wAZbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wAZblock } elseif {({ALL} in $ALWAYSSHOW && {-AZ} ni $ALWAYSSHOW) || {AZ} in $ALWAYSSHOW} { append WORKLIST \n$wAZbranch\n$EMPTY } } if {({ALL} in $LISTS && {-ALT} ni $LISTS) || {ALT} in $LISTS} { lassign {} lwALTblock wALTblock set wALTmatch [catselect wALT -- $catdb $icatdb]

  1. puts wALTmatch:$wALTmatch

if ![empty wALTmatch] { foreach wALT [lsort -unique $wALTmatch] {lappend orpt '[sql <- $wALT]'} set db [get_db dewiki] mysqlreceive $db " select page_title, tl_title from page b, templatelinks where tl_from = b.page_id and b.page_title in ([join $orpt ,]) and b.page_namespace = 0 and tl_title in ( select page_title from page a, categorylinks where cl_from = a.page_id and a.page_namespace = 10 and a.page_title <> 'Veraltete_Vorlage' and cl_to = 'Vorlage:Veraltet' ) and tl_from_namespace = 0 and tl_namespace = 10 order by b.page_title ;" {pt tt} { dict lappend lwALTblock "\[\[:[sql -> $pt]\]\]" "\{\{Vorlage|$tt\}\}" } mysqlclose $db unset -nocomplain orpt } foreach {pt ltt} $lwALTblock { lappend wALTblock "$pt [join [lsort -unique $ltt] { / }]" } unset -nocomplain lwALTblock incr wcount [set wALTcount [llength $wALTblock]] set wALTblock [join $wALTblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wALTbranch ";\[\[Datei:Template superseded.svg|30x15px|text-unten|Vorlage veraltet|link=:Kategorie:Vorlage:Veraltet\]\] Vorlage veraltet ([tdot $wALTcount])" if ![empty wALTblock] { append WORKLIST \n$wALTbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wALTblock } elseif {({ALL} in $ALWAYSSHOW && {-ALT} ni $ALWAYSSHOW) || {ALT} in $ALWAYSSHOW} { append WORKLIST \n$wALTbranch\n$EMPTY } } if {({ALL} in $LISTS && {-VF} ni $LISTS) || {VF} in $LISTS} { lassign {} lwVFblock wVFblock set wVFmatch [catselect wVF -- $catdb $icatdb]

  1. puts wVFmatch:$wVFmatch

if ![empty wVFmatch] { foreach wVF [lsort -unique $wVFmatch] {lappend orpt '[sql <- $wVF]'} set db [get_db dewiki] mysqlreceive $db " select page_title, tl_title from page b, templatelinks where b.page_id = tl_from and tl_from_namespace = 0 and tl_namespace = 10 and tl_title not in ( select page_title from page a where a.page_namespace = 10 ) and b.page_title in ([join $orpt ,]) and b.page_namespace = 0 order by b.page_title ;" {pt tt} { dict lappend lwVFblock "\[\[:[sql -> $pt]\]\]" "\{\{Vorlage|$tt\}\}" } mysqlclose $db unset -nocomplain orpt } foreach {pt ltt} $lwVFblock { lappend wVFblock "$pt [join [lsort -unique $ltt] { / }]" } unset -nocomplain lwVFblock incr wcount [set wVFcount [llength $wVFblock]] set wVFblock [join $wVFblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wVFbranch ";\[\[Datei:Template-X.svg|30x15px|text-unten|Fehlende Vorlage|link=:Wikipedia:WikiProjekt Vorlagen/Arbeitsliste\]\] Nicht existierende Vorlageneinbindung ([tdot $wVFcount])" if ![empty wVFblock] { append WORKLIST \n$wVFbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wVFblock } elseif {({ALL} in $ALWAYSSHOW && {-VF} ni $ALWAYSSHOW) || {VF} in $ALWAYSSHOW} { append WORKLIST \n$wVFbranch\n$EMPTY } } if {({ALL} in $LISTS && {-DF} ni $LISTS) || {DF} in $LISTS} { lassign {} wDFblock lpt set wDFmatch [catselect wDF -- $catdb $icatdb]

  1. puts wDFmatch:$wDFmatch

if ![empty wDFmatch] { foreach wDF [lsort -unique $wDFmatch] {lappend orpt '[sql <- $wDF]'} set db [get_db dewiki] mysqlreceive $db " select page_title, il_to from page c, imagelinks where il_from = c.page_id and c.page_title in ([join $orpt ,]) and c.page_namespace = 0 and il_from_namespace = 0 and il_to not in ( select page_title from page a where a.page_namespace = 6 ) and il_to not in ( select page_title from commonswiki_p.page b where b.page_namespace = 6 ) order by page_title ;" {pt it} { if {$it in $wDFit} {dict lappend lpt \[\[:[sql -> $pt]\]\] \[\[:Datei:[sql -> $it]\]\]} } mysqlclose $db if ![empty lpt] { foreach {pt lit} $lpt { lappend wDFblock "$pt ([join [lsort -unique $lit] { / }])" } } unset -nocomplain orpt lpt } incr wcount [set wDFcount [llength $wDFblock]] set wDFblock [join $wDFblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wDFbranch ";\[\[Datei:Qsicon image red.svg|30x15px|text-unten|Fehlende Bilder|link=:Wikipedia:Redaktion Bilder/Arbeitsliste fehlende Bilder\]\] Nicht existierende Dateien oder -Seiten ([tdot $wDFcount])" if ![empty wDFblock] { append WORKLIST \n$wDFbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wDFblock } elseif {({ALL} in $ALWAYSSHOW && {-DF} ni $ALWAYSSHOW) || {DF} in $ALWAYSSHOW} { append WORKLIST \n$wDFbranch\n$EMPTY } }

  1. wVS als vorletzter

if {({ALL} in $LISTS && {-VS} ni $LISTS) || {VS} in $LISTS} { set wVSblock {} set wVSmatch [catselect wVS -- $catdb $icatdb]

  1. puts wVSmatch:$wVSmatch

if ![empty wVSmatch] { foreach wVS [lsort -unique $wVSmatch] {lappend orplt '[sql <- $wVS]'} set db [get_db dewiki] mysqlreceive $db " select pl_title from pagelinks, page where page_id = pl_from and pl_title in ([join $orplt ,]) and pl_from_namespace = 2 and pl_namespace = 0 and page_title = 'MerlBot/Verwaiste_Artikel' and page_namespace = 2 order by pl_title ;" plt { lappend wVSblock "\[\[:[sql -> $plt]\]\]" } mysqlclose $db unset -nocomplain orplt } incr wcount [set wVScount [llength $wVSblock]] set wVSblock [join $wVSblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wVSbranch ";\[\[Datei:Qsicon empty.svg|30x15px|text-unten|Verwaiste Artikel|link=:Wikipedia:WikiProjekt Verwaiste Seiten\]\] Verwaist ([tdot $wVScount])" if ![empty wVSblock] { append WORKLIST \n$wVSbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wVSblock } elseif {({ALL} in $ALWAYSSHOW && {-VS} ni $ALWAYSSHOW) || {VS} in $ALWAYSSHOW} { append WORKLIST \n$wVSbranch\n$EMPTY } }

  1. wDW ans Ende

if {({ALL} in $LISTS && {-DW} ni $LISTS) || {DW} in $LISTS} { set wDWblock {} set wDWmatch [catselect wDW -- $catdb $icatdb]

  1. puts wDWmatch:$wDWmatch

if ![empty wDWmatch] { foreach wDW $wDWmatch {lappend orpt '[sql <- $wDW]'} set db [get_db dewiki] mysqlreceive $db " select page_title from page, categorylinks where cl_from = page_id and page_namespace in (0, 1) and page_title in ([join $orpt {, }]) and cl_to like 'Wikipedia:Defekte_Weblinks%' order by page_title ;" pt { set pt [sql -> $pt] if {[string first {Defekte Weblinks} [pagecat Diskussion:$pt]] > -1} { lappend wDWblock "\[\[:$pt\]\] \[\[Diskussion:$pt|(Disk)\]\]" } else { lappend wDWblock \[\[:$pt\]\] } } mysqlclose $db unset -nocomplain orpt } incr wcount [set wDWcount [llength [set wDWblock [lsort -unique $wDWblock]]]] set wDWblock [join $wDWblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set wDWbranch ";\[\[Datei:Qsicon Weblink red.svg|30x15px|text-unten|Defekter Weblink|link=:Kategorie:Wikipedia:Defekte Weblinks\]\] Defekter Weblink ([expr $wDWcount < 50 ? [tdot $wDWcount] : Template:Auf max. 50 Artikel beschränkt])" if ![empty wDWblock] { append WORKLIST \n$wDWbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$wDWblock } elseif {({ALL} in $ALWAYSSHOW && {-DW} ni $ALWAYSSHOW) || {DW} in $ALWAYSSHOW} { append WORKLIST \n$wDWbranch\n$EMPTY } } return [string map {& {\&}} $WORKLIST] } }

proc bw portal { global db bwwKALPkat global bwwcount bwwkandcount bwwlwkandcount bwwlwabwcount bwwreviewcount listformat lassign {0 LIST ALL {} {Zurzeit keine} {}} bwwcount listformat LISTS ALWAYSSHOW EMPTY BWWORKLIST set bwwdb [read [set f [open BWWORKLIST/[string map {{ } _ ~ 15:52, 7 February 2024 (UTC) / ~ ! ´´´´} $portal] r]]] ; close $f dict with bwwdb { set listformat [dict get $param listformat] set LISTS [join [split [dict get $param LISTS] ,]] set ALWAYSSHOW [join [split [dict get $param ALWAYSSHOW] ,]] set EMPTY [dict get $param EMPTY] if [catch {set KALP [dict get $param KALP]}] {set KALP {}}

  1. puts $KALP
  2. set LISTS ALL
  3. set ALWAYSSHOW ALL

if {({ALL} in $LISTS && {-KALP} ni $LISTS) || {KALP} in $LISTS} { lassign {} bwwKALPkandblock bwwKALPlwabwblock bwwKALPlwkandblock set bwwKALPmatch [catselect bwwKALP -- $catdb $icatdb] if ![empty bwwKALPmatch] { foreach bwwKALP [lsort -unique $bwwKALPmatch] {lappend orpt '[sql <- $bwwKALP]'} set db [get_db dewiki] mysqlreceive $db " select page_title, tl_title from page join templatelinks on tl_from = page_id where page_title in ([join $orpt ,]) and !page_namespace and !tl_from_namespace and tl_namespace = 10 and (tl_title = 'Kandidat' or tl_title like 'Lesenswert-%') order by page_title ;" {pt tlt} { if {$KALP eq {UNION}} { lappend bwwKALPkandblock "\[\[:[sql -> $pt]\]\]" } else { switch $tlt { Kandidat {lappend bwwKALPkandblock "\[\[:[sql -> $pt]\]\]"} Lesenswert-Abwahl {lappend bwwKALPlwabwblock "\[\[:[sql -> $pt]\]\]"} Lesenswert-Kandidat {lappend bwwKALPlwkandblock "\[\[:[sql -> $pt]\]\]"} Lesenswert-Wiederwahl {lappend bwwKALPkandblock "\[\[:[sql -> $pt]\]\]"} } } } mysqlclose $db unset -nocomplain orpt } if {$KALP eq {UNION}} { incr bwwcount [set bwwkandcount [llength $bwwKALPkandblock]] } else { incr bwwcount [set bwwkandcount [llength $bwwKALPkandblock]] incr bwwcount [set bwwlwabwcount [llength $bwwKALPlwabwblock]] incr bwwcount [set bwwlwkandcount [llength $bwwKALPlwkandblock]] } if {$KALP eq {UNION}} { set bwwKALPkandblock [join $bwwKALPkandblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] } else { set bwwKALPkandblock [join $bwwKALPkandblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set bwwKALPlwabwblock [join $bwwKALPlwabwblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set bwwKALPlwkandblock [join $bwwKALPlwkandblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] } if {$KALP eq {UNION}} { set bwwKALPkandbranch ";\[\[Datei:QSicon Kand.svg|30x15px|text-unten|Auszeichnungskandidatur|link=:Kategorie:Wikipedia:Kandidatur von Artikeln, Listen und Portalen\]\] Auszeichnungskandidatur ([tdot $bwwkandcount])" } else { set bwwKALPkandbranch ";\[\[Datei:QSicon Kand.svg|30x15px|text-unten|Auszeichnungskandidatur|link=:Kategorie:Wikipedia:Kandidatur von Artikeln, Listen und Portalen\]\] Auszeichnungskandidatur ([tdot $bwwkandcount])" set bwwKALPlwabwbranch ";\[\[Datei:Qsicon lesenswert Abwahl.svg|30x15px|text-unten|Abwahl Lesenswert|link=:Wikipedia:Kandidaten für lesenswerte Artikel\]\] Abwahl Lesenswert ([tdot $bwwlwabwcount])" set bwwKALPlwkandbranch ";\[\[Datei:Qsicon lesenswert Kandidat.svg|30x15px|text-unten|Kandidat Lesenswert|link=:Wikipedia:Kandidaten für lesenswerte Artikel\]\] Kandidat Lesenswert ([tdot $bwwlwkandcount])" } if {$KALP eq {UNION}} { if ![empty bwwKALPkandblock] { append BWWORKLIST \n$bwwKALPkandbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$bwwKALPkandblock } elseif {({ALL} in $ALWAYSSHOW && {-KALP} ni $ALWAYSSHOW) || {KALP} in $ALWAYSSHOW} { append BWWORKLIST \n$bwwKALPkandbranch\n$EMPTY } } else { if ![empty bwwKALPkandblock] { append BWWORKLIST \n$bwwKALPkandbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$bwwKALPkandblock } elseif {({ALL} in $ALWAYSSHOW && {-KALP} ni $ALWAYSSHOW) || {KALP} in $ALWAYSSHOW} { append BWWORKLIST \n$bwwKALPkandbranch\n$EMPTY } if ![empty bwwKALPlwkandblock] { append BWWORKLIST \n$bwwKALPlwkandbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$bwwKALPlwkandblock } elseif {({ALL} in $ALWAYSSHOW && {-KALP} ni $ALWAYSSHOW) || {KALP} in $ALWAYSSHOW} { append BWWORKLIST \n$bwwKALPlwkandbranch\n$EMPTY } if ![empty bwwKALPlwabwblock] { append BWWORKLIST \n$bwwKALPlwabwbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$bwwKALPlwabwblock } elseif {({ALL} in $ALWAYSSHOW && {-KALP} ni $ALWAYSSHOW) || {KALP} in $ALWAYSSHOW} { append BWWORKLIST \n$bwwKALPlwabwbranch\n$EMPTY } } } if {{RV} in $LISTS} { set bwwreviewblock {} set bwwreviewmatch [catselect bwwKALP -- $catdb $icatdb]

  1. puts bwwreviewmatch:$bwwreviewmatch

if ![empty bwwreviewmatch] { foreach bwwreview [lsort -unique $bwwreviewmatch] { if {[matchtemplate $bwwreview Vorlage:Review] || [matchtemplate $bwwreview Vorlage:Schreibwettbewerb] || [matchtemplate $bwwreview Vorlage:UIBK-Bio]} { regexp -- {\{\{(Review\|(.*?)|Schreibwettbewerb|UIBK-Bio)??\}\}} [conts t $bwwreview x] -- bwwreviewpage bwwreviewlink

  1. puts $bwwreviewpage:$bwwreviewlink ; gets stdin

if {$bwwreviewpage eq {Schreibwettbewerb}} { lappend bwwreviewblock [format {%s (SW)} $bwwreview] } elseif {[string first Review $bwwreviewpage] > -1} { if [matchtemplate $bwwreview Vorlage:Schreibwettbewerb] { set swplus { (SW+} } else { set swplus { (} } lappend bwwreviewblock [format {%s%s%s)} $bwwreview $swplus $bwwreviewlink $bwwreview $bwwreviewlink] } elseif {$bwwreviewpage eq {UIBK-Bio}} { lappend bwwreviewblock [format {%s (UIBK-Bio)} $bwwreview $bwwreview] } } } } incr bwwcount [set bwwreviewcount [llength $bwwreviewblock]] set bwwreviewblock [join $bwwreviewblock "\n[expr {$listformat eq {SHORTLIST} ? {·} : {*}}] "] set bwwreviewbranch ";\[\[Datei:Qsicon inArbeit blue.svg|30x15px|text-unten|Review|link=:Kategorie:Wikipedia:Reviewprozess\]\] Review ([tdot $bwwreviewcount])" if ![empty bwwreviewblock] { append BWWORKLIST \n$bwwreviewbranch\n[expr {$listformat eq {SHORTLIST} ? {} : $listformat eq {CLIST} ? {# } : {* }}]$bwwreviewblock } elseif {{RV} in $ALWAYSSHOW} { append BWWORKLIST \n$bwwreviewbranch\n$EMPTY } } return [string map {& {\&}} $BWWORKLIST] } }

set portal [lindex $argv 0 0] set data [lindex $argv 0 1]

  1. puts $portal
  2. puts $data


set repeat 0 while 1 { if {[catch { set summary {}

  1. set portal {Portal:Berlin/Arbeitsliste}
  2. set portal {Benutzer:Flominator/Freiburg}
  3. set portal {Portal:Österreich/Baustellen}
  4. set portal {Portal:Leichtathletik/Neue Artikel}
  5. set portal {Portal:Tod/Verbesserungswürdige Artikel}
  6. set portal {Benutzerin:TaxonBota/qstest}
  7. set portal {Portal:Muntenien/Neue Artikel}
  8. set portal {Wikipedia:Redaktion Religion/Wartung/Gesamtübersicht}
  9. set data [dict get $e $portal]

puts \n$portal:

  1. puts $data
  2. if {$portal ni $lwportal} {continue}
  3. if {$portal ne {Portal:Bahn/Mitmachen/Löschkandidaten und QS}} {continue}
  4. if {$portal ne {Benutzer:Bungert55/Wartungsseiten/Eifel} && !$aaaa} {continue} else {incr aaaa}

if {$portal in {{Wikipedia:WikiProjekt Fußball/Kader-Navigationsleisten} {Wikipedia:WikiProjekt Eishockey/Kaderwartung}}} {continue} set oconts [conts t $portal x]

  1. puts [edit user:TaxonBota/qstest1 test [string map {{\&} &} $oconts]]

set nportal $oconts if {$data ne {x}} { set br 1 if {$portal eq {Portal:Computerspiele/Neue Artikel}} { set lncportal [computerspiele $portal $nportal $data] } else { set lncportal [portals $portal $nportal $data] } if ![empty lncportal] {set lncportal \n$lncportal} set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$lncportal\n\\1]] set summary "Bot: NeueArtikel: [tdot $nacount]" }

  1. if {$data ne {x} && $portal in $lqsportal} {
  2. set br 1
  3. set QSWORKLIST [qsw $portal]
  4. if {$listformat ne {TABLE}} {
  5. set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$QSWORKLIST\n\\1]]
  6. set summary "Bot: NeueArtikel: [tdot $nacount]; QSWORKLIST: [tdot $qscount]"
  7. } else {
  8. set summary "Bot: NeueArtikel: [tdot $nacount]"
  9. }
  10. } elseif {$data eq {x} &&} {
  11. set br 2
  12. set QSWORKLIST [qsw $portal]
  13. if {$listformat eq {TABLE}} {continue}
  14. set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$QSWORKLIST\n\\1]]
  15. set summary "Bot: QSWORKLIST: [tdot $qscount]"
  16. } else {
  17. set br 3
  18. set summary "Bot: NeueArtikel: [tdot $nacount]"
  19. }

if {$portal in $lqsportal} { set br 2 set QSWORKLIST [qsw $portal] if {$listformat ne {TABLE}} { set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$QSWORKLIST\n\\1]] if ![empty summary] { append summary "; QSWORKLIST: [tdot $qscount]" } else { set summary "Bot: QSWORKLIST: [tdot $qscount]" } } }

if {$portal in $lwportal} { set br 3 set WORKLIST [w $portal]

  1. puts $WORKLIST

if {$listformat ne {TABLE}} { set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$WORKLIST\n\\1]] if ![empty summary] { append summary "; WORKLIST: [tdot $wcount]" } else { set summary "Bot: WORKLIST: [tdot $wcount]" } } }

  1. set WORKLIST [w $portal]
  2. puts $WORKLIST\n$wcount
  3. puts [edit user:TaxonBota/qstest1 test [string map {{\&} &} $WORKLIST]] ; exit

if {$portal in $lbwportal} { set br 4 set BWWORKLIST [bw $portal] if {$listformat ne {TABLE}} { set nportal [string map {{\&} &} [regsub -- {().*} $nportal \\1$BWWORKLIST\n\\1]] if ![empty summary] { append summary "; BWWORKLIST: [tdot $bwwcount]" } else { set summary "Bot: BWWORKLIST: [tdot $bwwcount]" } } }

if {$nportal ne $oconts} {

  1. puts [edit user:TaxonBota/qstest1 "$summary|\[\[$portal\]\]" $nportal / minor]
  2. if {$br != 3} {puts [edit user:TaxonBota/qstest "$summary|\[\[$portal\]\]" $nportal / minor] ; gets stdin}

puts $br:[edit $portal $summary $nportal / minor]

  1. if {[incr xx] < 15} {gets stdin}

} }] != 1} { break } else { if {[incr repeat] == 1} { set lang test ; source langwiki.tcl ; #set token [login $wiki] puts [edid 63277 {Log: NeueArtikel} {} / appendtext "\n* [ clock format [clock seconds] -format %Y-%m-%dT%TZ ] NeueArtikel: Fehler in \[\[:w:de:$portal\]\]!"] set lang dea ; source langwiki.tcl ; #set token [login $wiki] if {$portal eq {Wikipedia:WikiProjekt Kategorien/Arbeitsliste}} {break} } if {$repeat == 10} { set lang test ; source langwiki.tcl ; #set token [login $wiki] puts [edid 63277 {Log: NeueArtikel} {} / appendtext "\n* [ clock format [clock seconds] -format %Y-%m-%dT%TZ ] NeueArtikel: Fehler in \[\[:w:de:$portal\]\]!"] set lang dea ; source langwiki.tcl ; #set token [login $wiki] break } } }


  1. puts "\nend of task"
  2. set lang test ; source langwiki.tcl ; #set token [login $wiki]
  3. puts [edid 63277 {Log: MB4} {} / appendtext "\n* [clock format [clock seconds] -format %Y-%m-%dT%TZ] NeueArtikel4: Task finished!"]


</source> -->