User:David/Imported Commands

Introduction
Like with the Imported Cvars this page is here in case the commands need to be reimported or its ever useful.

Steps

 * Get a list.
 * /cmdlist in game.
 * Run it through sed and sort -u to strip the + and - and remove dupes.
 * See steps 2-4 on User:David/Imported_Cvars. This is mostly the same.

The script
use strict;
 * 1) !/usr/bin/perl -W

my $count = 0;

sub pageno {	my ($pageno) = @_; return (int(($pageno)/95+1)); }

while(my $line = ) {	$line =~ s/\n$//; $count++; if (pageno($count) != pageno($count-1) or $count == 1) {		open (FILE, ">", "cmds-" . pageno($count) . ".xml" ); print FILE "\n"; }	else {		open (FILE, ">>", "cmds-" . pageno($count) . ".xml" ); }	print FILE " \n"; print FILE "   $line \n"; print FILE "   \n"; print FILE "     ". `echo -n \$(date '+%Y-%m-%dT%H:%M:%SZ')`. " \n"; print FILE "      David  \n"; print FILE "     AUTO IMPORTED BY SCRIPT!  User:David/Imported_Commands for more info. \n"; print FILE "     \n"; print FILE "\n"; print FILE "\n"; print FILE "== Usage ==\n"; print FILE "\n"; print FILE " \n"; print FILE "   \n"; print FILE " \n"; if (pageno($count) != pageno($count+1)) {		print FILE " \n"; }	close (FILE); }

open (FILE, ">>", "cmds-" . pageno($count) . ".xml" ); print FILE " \n"; close (FILE);