Movatterモバイル変換


[0]ホーム

URL:


Jump to content
WikipediaThe Free Encyclopedia
Search

User:Conscious/Subpage

    From Wikipedia, the free encyclopedia
    <User:Conscious

    Flags

    [edit]
    • Vector flags not yet available for:

    WP:WSS/ST update

    [edit]

    ThisPerl script can be used to updateWP:WSS/ST. It takes 3 filenames as parameters:

    1. The file containing stub category sizes. It should be formatted likeUser:Alai/Stub-counts.
    2. The file containing the wikicode ofWP:WSS/ST.
    3. The output file.

    To run the script on *nix systems, you may need to correct the path to perl on your machine found in the first line.

    #!/usr/bin/perlopen Sizes, $ARGV[0] || die "Cannot open $ARGV[0]: $!\n";open Types, $ARGV[1] || die "Cannot open $ARGV[1]: $!\n";open Out, ">$ARGV[2]" || die "Cannot open $ARGV[2]: $!\n";sub Bin {  my $v = $_[0];  if ($v > 800) {    return sprintf("'''%i pages'''", $v/200 + 1);  }  if ($v >= 100) {    return sprintf("<%i00", $v/100 + 1);  }  return "<100" if $v >= 50;  return "<50" if $v >= 25;  return "<25" if $v >= 10;  return "<10";}while ($str = <Sizes>) {  if ($str =~ /\{\{cl\|(.*)\}\}\s+'*(\d+)'*/) {  $category = $1;$number = $2;$category =~ s/_/ /g;    $size{$category} = $number;  }}while ($str = <Types>) {  if ($str =~ /(.*?\[\[\:Category\:([^|]*)\|.*\{\{tl\|.*\}\})/ && $size{$2}) {    $bin = Bin($size{$2});print Out "$1 - $bin on March 16\n";  }  else {    print Out $str;  }}

    Stub types not listed atWP:WSS/ST

    [edit]

    This is the list of stub types that are not listed atWP:WSS/ST. The stub types that are listed in nonstanard way (and therefore weren't caught by the script) are also here. Feel free to remove such stub types from this list.

    This userpage has been blanked. If this is your userpage, you can retrieve the contents of this page in thepage history. Alternatively, if you would like it deleted, simply replace the content of this page with {{db-u1}}.
    Retrieved from "https://en.wikipedia.org/w/index.php?title=User:Conscious/Subpage&oldid=1318192458"

    [8]ページ先頭

    ©2009-2025 Movatter.jp