|
|
(One intermediate revision by one other user not shown) |
Line 1: |
Line 1: |
| == Definitions ==
| | Hey. I edit stuff on this wiki and program things. I'm sysop, so if there's administrative tasks that need doing, like page deletion or moving, just ask me. I have [[User:NightmareciBot | a bot]], so if you find something that would be done best by a bot, I can probably hook something up to make it happen. |
| Terms in [[TGM legend]] and [[Glossary]] will be used in my pages, with the original definitions. If you encounter a confusing term, look in TGM legend first, then Glossary if it's not in TGM legend.
| |
|
| |
|
| === Row Numbering === | | == Various Contributions == |
| In my pages, row numbering follows this convention:
| | * Using [[User:NightmareciBot | my bot]] and [http://botwiki.sno.cc/wiki/Main_Page pywikipedia], I converted pages using [[Template:Pfstart | playfield templates]] to the new [[Help:Playfield | playfield parser extension]]; this is easier on the server and wiki editors. |
| | |
| <ol start=0>
| |
| <li>[[Playfield#Vanish_zone|Vanish zone]]</li>
| |
| <li>First visible row</li>
| |
| <li>Second visible row</li>
| |
| ... | |
| <li value=19>Nineteenth visible row</li>
| |
| <li>Twentieth visible row (last)</li>
| |
| </ol>
| |
| | |
| Row number 0 is the topmost row and successive rows are beneath it. In the listing above (which is TGM1's row configuration), there is a total of 21 usable rows.
| |
|
| |
|
| == My Own Pages == | | == My Own Pages == |
Line 20: |
Line 8: |
|
| |
|
| [[User:Nightmareci/SRS | SRS]] | | [[User:Nightmareci/SRS | SRS]] |
| | |
| | [[User:Nightmareci/Vaguely Tetris-like Games | Vaguely Tetris-like Games]] |
|
| |
|
| == Other Stuff == | | == Other Stuff == |
|
| |
|
| === Playfield Template Converters ===
| | Nothing right now. |
| The old playfield templates are problematic for both bandwidth and server load; the new <playfield> parser extension alleviates those problems, and these can convert pages to the new syntax:
| |
| ==== Awk Version ====
| |
| I, Nightmareci, made this one; I put it in the public domain, so do as you wish with it.
| |
| <pre>#!/bin/awk -f
| |
| | |
| /\{\{ *pfstart *\}\}/,/\{\{ *pfend *\}\}/ {
| |
| sub(/\{\{ *pfstart *\}\}/, "<playfield>")
| |
| sub(/\{\{ *(pf|width[3-6]|tnet)row */, "") && gsub(/\||\}\}/, "") && gsub(/ /, ".")
| |
| sub(/\{\{ *pfend *\}\}/, "</playfield>")
| |
| print
| |
| next
| |
| }
| |
| | |
| 1
| |
| </pre>
| |
| | |
| ==== Python Version ====
| |
| I, Nightmareci, made this one; I put it in the public domain, so do as you wish with it.
| |
| <pre>#!/usr/bin/env python
| |
| import fileinput
| |
| import re
| |
| | |
| start = re.compile(r'\{\{pfstart\}\}')
| |
| row = re.compile(r'\{\{(?:pf|tnet|width[3-6])row *([^}]*)\}\}')
| |
| end = re.compile(r'\{\{pfend\}\}')
| |
| # Because we need more explicit control over moving between lines, we must use
| |
| # an actual FileInput instance.
| |
| files = fileinput.input()
| |
| | |
| for line in files:
| |
| # Find the beginning of the playfield.
| |
| if start.search(line):
| |
| # Replace '{{pfstart}}' with '<playfield>'
| |
| print start.sub('<playfield>', line, 1),
| |
| | |
| for line in files:
| |
| # If the current line is '{{pfend}}', replace with
| |
| # '</playfield>' and break out
| |
| if end.search(line):
| |
| print end.sub('</playfield>', line, 1),
| |
| break
| |
| # If this is not '{{pfend}}', this line is a row, so
| |
| # convert it to the new syntax.
| |
| else:
| |
| # First, the template arguments are extracted
| |
| # from the row, then the pipes, '|', are
| |
| # removed, then spaces, ' ', are changed to
| |
| # periods, '.'.
| |
| print row.sub(r'\1', line, 1).replace('|',
| |
| '').replace(' ', '.').upper(),
| |
| # This line isn't the beginning of a playfield, so just print.
| |
| else:
| |
| print line,
| |
| </pre>
| |
| ==== Perl Version ====
| |
| DeHackEd made this one, and I'm not sure what conditions he has over it. I made some fixes to it, so it works on any type of row, not just pfrow:
| |
| <pre>#!/usr/bin/perl
| |
| | |
| | |
| while (<>) {
| |
| chomp;
| |
|
| |
| if (/^(.*)\{\{pfstart\}\}(.*)$/) {
| |
| print "$1<playfield>$2\n";
| |
| }
| |
| elsif (/^\{\{(?:pf|tnet|width[3-6])row *\|(.*)\}\}$/) {
| |
| $code = $1;
| |
|
| |
| @stuff = split(/\|/, $code);
| |
| print join("", @stuff). "\n";
| |
| }
| |
| elsif (/\{\{pfend\}\}(.*)$/) {
| |
| print "</playfield>$1\n";
| |
| }
| |
| else {
| |
| print "$_\n";
| |
| }
| |
| | |
| }
| |
| </pre>
| |
|
| |
|
| <playfield> | | <playfield> |
| ZZZ | | ZZZ. |
| Z Z | | Z..Z |
| ZZZ | | ZZZ. |
| Z Z | | Z..Z |
| </playfield> | | </playfield> |
Hey. I edit stuff on this wiki and program things. I'm sysop, so if there's administrative tasks that need doing, like page deletion or moving, just ask me. I have a bot, so if you find something that would be done best by a bot, I can probably hook something up to make it happen.
Various Contributions
My Own Pages
Detailed description of Tetris The Grand Master
SRS
Vaguely Tetris-like Games
Other Stuff
Nothing right now.