User:TaxonBot/test4.tcl
\n(.*?)\n} $oconts -- oldlist
puts $oldlist set newlist "\n"
foreach project $lproject { puts \n\n lassign {} oldlist loldlist set project [join $project] puts $project set oconts [conts t $project x] regexp -- {\n(.*?)\n} $oconts loldlist oldlist puts $oldlist puts $loldlist if ![empty oldlist] { puts [edit $project {Bot: Reset NeueArtikel aufgrund Prozessfehler, NeueArtikel werden im nächsten Schritt wieder eingetragen} [string map [list $loldlist $newlist] $oconts] / minor] } if {[incr zz] < 10} {gets stdin} }
exit
foreach line [split $rc \n] { lappend lline [dict values [regexp -inline -- {contributions-title" title\="(.*?)"\>} $line]] }
save_file test4e.out [join $lline \n]
exit
set ls [split $rc \n]
- save_file test4a.out $ls
foreach {1 2 3 4 5 6 7} $ls { lappend lincr [incr zzzz]:$1|$2|$3|$4|$5|$6|$7
- if {$zzzz == 10} {exit}
}
save_file test4b.out [join $lincr \n]
exit
read_file contribtool0.out c
- puts $c
set url0 http://de.wikipedia.org/w/index.php? set urld http://devilman.fandom.com/wiki/Devilman_Saga? set userd https://devilman.fandom.com/wiki/User:
foreach line [split $c \n] { set line [string map [list $url0 $urld] $line] input oldid "\noldid: " input user "user: " regsub -all -- {oldid=\d{9}} $line "oldid=$oldid" line if ![empty user] { regsub -- {\[\[:user:Doc Taxon\|Doc Taxon\]\]} $line "\[$userd$user $user\]" line } puts \n$line lappend lline $line }
puts [join $lline \n] append_file contribtool0.out [join $lline \n]
exit
set summ {Bot: Parameterkorrektur: Vorlage:Unsigniert ist ohne Signatur zu verwenden; diese aufgrund Problemen bezüglich H:LINT entfernt} set summ1 {Parameterkorrektur: Vorlage:Unsigniert ist ohne Signatur zu verwenden; diese aufgrund Problemen bezüglich H:LINT entfernt}
read_file test4.db t
set lt [split $t \n]
foreach t $lt { if {[string first \[ $t] > -1} {lappend lc $t} }
set offset 0 set llc [llength $lc] foreach c $lc { puts \n\n[incr i]:$llc puts ====\n[lindex $c 0]:
- puts [lindex $c end]\n
if {[lindex $c 0] ne {Wikipedia:Löschkandidaten/10. Juli 2019}} {if !$offset {continue}} else {set offset 1} set conts [conts t [lindex $c 0] x] ; set nconts $conts foreach typetempl [lindex $c end] { foreach templ $typetempl { if {[string first \[ $templ] > -1 && [regexp -all \} $templ] > 3} {
- puts [regexp -all -inline -line -nocase {\{\{[ ]?unsigniert.*?\}\}} $templ]
- puts [regexp -all -inline -line -nocase {\{\{[ ]?unsigned.*?\}\}} $templ]
- puts [regexp -all -inline -line -nocase {\{\{[ ]?nicht unterschrieben.*?\}\}} $templ]
puts $templ input templ "\nTemplate: " if [empty templ] {continue} set ptempl [parse_templ $templ] puts $ptempl dict with ptempl { set ntempl $TEMPLATE append ntempl |$1 catch {if {[string first \[\[ $2] == -1} {append ntempl |$2}} catch {if {[string first \[\[ $3] == -1} {append ntempl |$3}} catch {if {[string first \[\[ $ALT] == -1} {append ntempl |ALT=$ALT}} set ntempl [format {{{%s}}} $ntempl] puts $ntempl set nconts [string map [list $templ $ntempl] $nconts] unset -nocomplain TEMPLATE 1 2 3 ALT templ ptempl ntempl } } } } if {$nconts ne $conts} { set out [edit [lindex $c 0] $summ $nconts / minor] puts $out if {{protectedpage} in [split $out]} { source api2.tcl ; set lang de1 ; source langwiki.tcl ; #set token [login $wiki] puts [edit [lindex $c 0] $summ1 $nconts / minor] after 5000 source api.tcl ; set lang de ; source langwiki.tcl ; #set token [login $wiki] }
- gets stdin
} }
- puts [llength $lc]
- puts $ic
exit
set ltempl [template1 Vorlage:Unsigniert x] puts $ltempl puts [set lenltempl [llength $ltempl]]
foreach templ $ltempl { puts "\n[incr i]/$lenltempl: $templ" set c [conts t $templ x] append_file test4.db [list $templ [list [ regexp -all -inline -line -nocase {\{\{[ ]?unsigniert.*?\}\}} $c ] [ regexp -all -inline -line -nocase {\{\{[ ]?unsigned.*?\}\}} $c ] [ regexp -all -inline -line -nocase {\{\{[ ]?nicht unterschrieben.*?\}\}} $c ]]] }
exit
set lpt [lsort [insource {\{\{!-\}\}|\{\{\(!\}\}|\{\{!\)\}\}|\{\{!!\}\}/} 4]] puts $lpt puts [llength $lpt]
foreach pt $lpt { if {$pt in {{Wikipedia:WikiProjekt Vorlagen/Werkstatt} {Wikipedia:Administratoren/Anfragen}}} {continue} if {[string first /Archiv $pt] > -1} {continue} puts $pt set oc [conts t $pt x] set nc [string trim [string map [list {{{!-}}} {|-} \n\{\{\(!\}\} \n\{\{\{!\}\} \{\{\(!\}\} \n\{\{\{!\}\} \{\{!\)\}\} \{\{!\}\}\} {{{!!}}} {||}] $oc]] puts [edit $pt {Ersetzung der obsoleten Vorlagen |-,
- if {[incr i] < 10} {gets stdin}
- puts \n
- puts $rcline
- set name {Elaine Aron}
- puts $name:
- puts $html ; gets stdin
- if [catch {
- set xml [[[dom parse -html [encoding convertfrom $html]] documentElement] asList]
- }] {puts Fehler ; continue}
- puts $rex