Comments on 2017-06-30 Traveller Subsector Generator

Made some changes, and added random sector generation (32x40 instead of 8x10).

– Alex 2017-07-05 06:07 UTC


How to get a random UWP from the command line:

perl traveller.pl get /uwp/874568503 2>/dev/null | xmllint --html --xpath '//pre/text()' - | perl -MHTML::Entities -pe 'decode_entities($_);'

– Alex Schroeder 2017-07-05 14:57 UTC


How to generate a SVG file from the command line:

perl traveller.pl get /map/874568503 2>/dev/null > 874568503.svg

– Alex Schroeder 2017-07-05 14:58 UTC


Generating a simple SVG file from a map on the command line (URL-escaped):

perl traveller.pl get --header 'Content-Type:application/x-www-form-urlencoded' --method POST --content "map=Rezufa%200101%20E310000-0%20Ba" /map 2>/dev/null

– Alex Schroeder 2017-07-05 15:09 UTC


Generating an SVG map from UWP in a text file:

perl traveller.pl get --header 'Content-Type:application/x-www-form-urlencoded' --method POST --content map=$(cat 874568503.txt|encodeURIComponent) /map

This assumes you defined the following alias:

alias encodeURIComponent='perl -pe '\''s/([^a-zA-Z0-9_.!~*()'\''\'\'''\''-])/sprintf("%%%02X",ord($1))/ge'\'

– Alex Schroeder 2017-07-05 15:21 UTC


Please make sure you contribute only your own work, or work licensed under the GNU Free Documentation License. See Info for text formatting rules. You can edit this page if you need to fix typos. You can subscribe to updates by email without leaving a comment.

To save this page you must answer this question:

Please say HELLO.