User:Conscious/Subpage

User:Conscious/Subpage

Flags

  • Vector flags not yet available for:

WP:WSS/ST update

This Perl script can be used to update WP:WSS/ST. It takes 3 filenames as parameters:

  1. The file containing stub category sizes. It should be formatted like User:Alai/Stub-counts.
  2. The file containing the wikicode of WP: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/perl

open 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 at WP:WSS/ST

This is the list of stub types that are not listed at WP: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.

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.

  1. 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:
  2. 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.
  3. 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.
  4. 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.
  5. Responsible use. Any risk arising from the use of information from this website is entirely the responsibility of the user.