Source talk:NetHack 3.4.3/src/objects.c

From NetHackWiki
Revision as of 18:45, 13 August 2006 by ZeroOne (talk | contribs) (Jayt's script)
Jump to navigation Jump to search

This file needs line numbers! --ZeroOne 17:49, 13 August 2006 (UTC)

perl -i.bak -ple '$_ = sprintf "%-4s%s", ++$i . ".", $_ if /^\s/' file.wiki
It's not perfect, but probably quite good enough. You'll need to tweak the 4 for however many digits the largest line number has. Eidolos 18:09, 13 August 2006 (UTC)
Ah, but Jayt has a source wikification script made in Python. It includes some html-code to make the lines linkable. But as it happens, I haven't got a Python environment in my use. --ZeroOne 18:45, 13 August 2006 (UTC)