Difference between revisions of "Source talk:NetHack 3.4.3/src/objects.c"
Jump to navigation
Jump to search
(Gave my Perl add-line-number script, for future use if necessary.) |
(Jayt's script) |
||
Line 2: | Line 2: | ||
:<tt>perl -i.bak -ple '$_ = sprintf "%-4s%s", ++$i . ".", $_ if /^\s/' file.wiki</tt> | :<tt>perl -i.bak -ple '$_ = sprintf "%-4s%s", ++$i . ".", $_ if /^\s/' file.wiki</tt> | ||
: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. [[User:Eidolos|Eidolos]] 18:09, 13 August 2006 (UTC) | :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. [[User:Eidolos|Eidolos]] 18:09, 13 August 2006 (UTC) | ||
+ | |||
+ | ::Ah, but Jayt has a [[User:Jayt#Source_wikification_script|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. --[[User:ZeroOne|ZeroOne]] 18:45, 13 August 2006 (UTC) |
Revision as of 18:45, 13 August 2006
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)