• Welcome to the new COTI server. We've moved the Citizens to a new server. Please let us know in the COTI Website issue forum if you find any problems.

Web-based Automatic Sector Data / Map pdf Generator

Thanks Inex

Once I have the missing module source code, I think I can have something out fairly quick.

There is a second motive here as well.

Micks accomplishments go FAR beyond just the sector generator. any project that generates large voumes of data that needs to be formatted into a nicely formatted booklet especially with various graphics derived from the data would be greatly enhanced.

Imagine adding the maps and system carts.

For that matter, Just taking the world data and creating a system and system map and integrating all of that into one booklet. With what is already done, adding trade info, animal encounters, and a well done world map becomes simple instead of days or even weeks of work.

Suddenly, players chose a world you have never planned on. Have a few pre-drawn world maps, and a minuet at the puter and the players have a new plethora of library data to look at, and you have enough detail to start generating ideas for what monstrous things you can do to them when they land.

Even better, random look adventure hooks can be added. most of those would be side trips to divert the attention of the players, but they could also spark ideas to tie back into the main arc of your story.

Or for the fantasy players, generate an entire nation complete with a list of all large settlements, big ruins, and other data. The same thing as sector maker does, a customized Campaign setting with a level of detail never before possible. (that is a project that has been simmering for me for years, but I could never solve the problem of how to present the results in a usable form, let alone pretty enough to share.)

My huge downfall as a game master is I cannot react quickly if my players color outside the lines.

Being able to create a shell on the fly will give me a chance to keep things moving.

Anyway for the windows fans out there I will have a port very directly.
 
Mr TEK - I've been following this thread for sometime and have wished for a utility based on Micks fantastic sources, for the Windows platform. Your investigations and hard work following this up are greatly appreciated!

Perhaps the forum would be a good place to ask if you need beta testers (happy to volunteer!)

all the best
 
Once I have the script,

I will definitely need testers.

I am concerned that all of the tools install correctly, and I am nervous about making sure nothing collides with someone else's software.

There were more tools to locate, and I had to learn how to correctly install each one, but after the iintigrated installer seems to do it's job well.
 
Scripting.

Windows native scripting is too limited even with replacements for nearly all of the shell commands.

So my options are to recode into something that works, probably c or C++

or an alternative shell.

CYWin has a huge footprint, takes an hour or more to download and install, and installs so many tools that if you are doing any professional work the likelihood of major conflicts, or even fubaring someones system is just unacceptable.

Same with the web based stuff. Installing a web server is a massive undertaking and absolutely overkill for one little application.

Powershell is an option, if it has all of the commands. Awk, cut and paste commands for Linux Shell hurt to lose but those might be possible to install.

So design goals here -
-- absolutely simplest and most fool proof install possible.
-- Minimal impact on system
-- Avoiding anything that might cause conflicts or disrupt the system in graphics, programming or or overhead that interferes with gamers.
-- Being as interchangeable as possible with the Linux and Mac versions. (not really necessary unless the project grows more, but nice if I can pull it off.)

Still a lot of overhead to worry about.
Since Perl is becoming common ever with people on here, there are issues with figuring out if it is already installed and where to install the ghost script tools that run in Perl.

Ghost script itself since that can impact people that that do work with postscript, authoring PDFs, or both.

Just some thoughts.

I know this was going to be a knotty problem, which is why I never started till I found myself with a lot of time to spare.
 
Glad to see Windows progress!

I have gotten the scripts to work on Mac Lion, as well as my Linux (bluehost) server, but I am still wrestling with the permissions settings necessary to get this working as a cgi.

The gensec3 sourcecode should be in the installer - let me know if you still need it!

Micki
 
Not having any inclination to read through this 37 page thread... ;)

Just looking at the title and your design goals... Java and iText (http://itextpdf.com/) would probably provide for a robust, elegant solution that is web-based and also, platform independent, standalone operation to boot. (This assumes you are 'porting' from highlevel, c-like sources - but that seems a fair assumption given the title and you comments about libraries, etc.)

There is tons of web support for the third party installations of Java and iText and both are mature products - and there's lots of developer resources even for iText (from a quick look at the site - haven't used the product myself).

Generating PostScript is really very easy from just about any language (or script).

Doing something useful onscreen with the PS can be another matter as is generating PDF. Unix/Mac OS provide one line command options for PS to PDF and the Ghostscript provides similar for Windows and users can even use online free converters (ala http://www.ps2pdf.com/convert.htm). You could also even pass parameters directly to such a site or host your own (ala http://view.samurajdata.se/).

Traveller sector data/mapping is trivial. Postscript generation is also fairly trivial (if you don't know postscript, the Adobe books and lots of examples are free and it is a very approachable language). Of course, given the thread, I'd assume such could also be readily pulled from the original sources (probably use regular expressions - which is easily modified to other platforms or just recoded - though regular expressions are often overkill and prone to runtime issues, so I don't usually use them or recommend them myself).

Technically, javascript could easily handle this. Even more elegant (in theory), would be an HTML 5 implementation. See http://logand.com/sw/wps/index.html.

Just some thoughts...
 
You should read the thread :)

Thanks for the great suggestions!

You should take a look at the thread and the the software, written on Mac OSX. It is a command-line shell script that uses some of those exact utilities (ps2pdf, pdftk, enscript, etc.) as well as Traveller software (SW4 (gensec, subsec, mapsub), full-upp, and some of robject's perl) and provides a pdf containing a sector with maps and world descriptions.

It includes book 3 world generation, subsector and sector map generation, UPP listings and/or UPP descriptions, trade routes, animal encounters, simple trade data, and borders and alliances.

Give it a look, if you like - you may find it similar to some of the suggestions you posit above.
 
Ah. I'm afraid you missed my point -> eliminating the whole slew of installation requirements that makes porting from a Unix based solution to Windows any kind of challenge.

The Traveller data mentioned and PS generation are all trivial - just simple data generation (nothing relational) and text handling. No need for any third party libraries, etc. The PDF creation and Browser accessibility are the non-trivial parts as far as platforms go. Unix style kludging together of things with script code (nothing inherently wrong with that for non-commercial apps) is not a well supported way to go when it comes to supporting the Windows platform.

Java + direct PDF generation (iText) would do away with the need for any command line tools or other PS to PDF production and eliminate the need for a web server - great for Windows and still supporting running in a browser on other mentioned platforms. I mention such because it is high level and should be graspable by even entry level programmers.

For accessing, a web-hosted solution is still preferable, especially regards mobile platforms (not running Java - notably iOS). However, for standalone execution, web hosting on a Windows platform is not industry supported with the same tools as on Unix platforms. I've done it plenty of times, but it is not for the casual end-user. .NET is great for Windows hosting, but sucks for Unix (getting better though).

Finally, Javascript alone could generate the PS file and the user could view, print and convert to PDF using GSView/GhostView/Preview or whatever means on a given platform or simply print the PS if supported by printer or print driver.

And for the ultimate in 'simplicity' and platform compatibility - write the whole thing in a postscript file with embedded PDF commands and generate the PDF file. Then the user could just open the file and enter a random number seed (so its reproducible - otherwise just use date and time stamp) and voila -> sector/sub maps, listings and such all from one simple file. Yep - that's right, PDF can support realtime dynamic content (heck, even 3D). [Development tools required: notepad, distiller (or compatible PDF generator)!]

FYI: For Mac OSX the included Preview app will convert single file PS and EPS to PDF. From CLI, Apple pstopdf works much better than the thirdparty tools in GhostScript, fink, etc. ;)
 
I can locate the Linux binary of subsec2 and I can locate a source file for subsec.awk.

Is it possible to get a copy of that source?

I have all of the other source files, and the script translation should be easy enough now that I have all of the tools.

Just open up subsec2 in a text editor. It's not a binary. It's an awk script. It just has no extension.
 
Ah. I'm afraid you missed my point -> eliminating the whole slew of installation requirements that makes porting from a Unix based solution to Windows any kind of challenge. {...} Unix style kludging together of things with script code (nothing inherently wrong with that for non-commercial apps) is not a well supported way to go when it comes to supporting the Windows platform.

No, I got and I understand your point. It's just not my point. :) This software package is a decidedly non-commercial set of scripts that leverage open source and free tools by other Traveller programmers to achieve the result of publication-quality LBB pdf's of an autogenerated Traveller sector on Mac and other flavors of Unix. It was not written or conceived of for Windows and I've not simplified the script's efficiency nor its' ease of installation/porting.

If there is an interest among CotI folks to put a project together to create a newer and more flexible way to create auto-generated publication quality LBB's, count me in! I'm SO up for the chance to rewrite this from scratch with multi-platform intent whether in HTML5, pure PostScript, and yes maybe even (shudder) Java. That would be an exciting, and different, project. I would love to be involved.

Note: I'm in the last stages of hosting this script now so public users can generate pdfs by email or logging in on the command line and download the resulting pdf files from a web URL. I am hesitant to provide a web front-end to the script due to permissions issues and possible DDOS vulnerabilities but I'm still looking at it.

From CLI, Apple pstopdf works much better than the thirdparty tools in GhostScript, fink, etc. ;)

Note: your last paragraph leads me to believe you may not have looked at the software or its output. If you do, you'll see that pstopdf and other multi-platform open source CLI tools including enscript, pdftk, perl, awk, sed and others are employed throughout, some installed as part of the Developer Tools on Mac OS, others on Unix, etc... You may want to familiarize yourself with the work we have done, even if only to come up with even more insightful ways to improve or redo it.
 
Last edited:
Mickazoid, I understand that you have a lot on your plate right now getting your program into a web-based version. (That would seen to render the previous discussion about a Windows port moot, BTW.) I did have a suggestion, though. The code for nroute.c (trade map generation) is available at http://traveller.wikia.com/wiki/Nroute.c and it seems to use a lot of the various code modules you are using in your project. After several iterations of improvements in gcc and various Unix dependencies, the code is sadly nonfunctional at present - at least to someone with my limited skill set. It will compile but not run.

I doubt it would take very long for you to upgrade the code and add it to your project. I think the community would find it useful. Please consider it for a later upgrade. Thanks.
 
Tech support request. In mid-install per instructions and asked to modify line 224 of CoreFont.pm. In my editor, line 224 is:

# there is a -ttfile or -afmfile/-pfmfile/-pfbfile

-- a comment. To which line do I add:

univers universbold

Thanks. Sorry for the bother.

Kem
 
Mac, OS 10.7.3. There is a Mac install guide (a html file) in the install folder; this was the only step I had a problem with. The rest were easy (great directions!)

The XCode editor line numbers must not match the numbering on Mickazoid's editor, and I'm not skilled enough to know which line of the .pm file to modify.
 
Hi DrKem - glad you are rocking with the install!

You can just add those two font names into the subroutine 'loadallfonts' in CoreFont.pm, amidst the other fonts:

Code:
sub loadallfonts
{
    foreach my $f (qw[ 
        courier courierbold courierboldoblique courieroblique
        georgia georgiabold georgiabolditalic georgiaitalic
        helveticaboldoblique helveticaoblique helveticabold helvetica
        symbol
        timesbolditalic timesitalic timesroman timesbold
        univers universbold
        verdana verdanabold verdanabolditalic verdanaitalic
        webdings
        wingdings
        zapfdingbats
    ])
    {


Mac, OS 10.7.3. There is a Mac install guide (a html file) in the install folder; this was the only step I had a problem with. The rest were easy (great directions!)

The XCode editor line numbers must not match the numbering on Mickazoid's editor, and I'm not skilled enough to know which line of the .pm file to modify.
 
Thanks for the quick reply! After all that, the code in CoreFont.pm matches the code in your post exactly. At some point, the file must have been modified to contain univers and universbold. So much for instructions, step 9. :)

Work will be interfering with my hobbies for a couple of days, but then I plan to run your software with a .sec file I created for the new Mongoose Traveller Pirates of Drinax adventure series. Any tips on running the program with an existing .sec file?

Kem
 
Using an existing sector file is easy.

./SectorMaker.sh Orion dense mature 1 Orion.sec 2

This call will ignore the world density and tech level, and use the existing Orion.sec (which must be in /sectors/autogen) to create the PDF.

Use of the '1' will make it generate borders and routes if you have don't have the Orion_route.txt or Orion_alliances.txt files already.

The '2' will just give you the UPP description without the animal info.

If you have a list of world names and locations but not UPPs, Mickazoid's instructions imply that she incorporated some of the changes I made for the Ubuntu version to the Mac version, so that you can use a names file to generate the UPPs for those worlds. Her instructions don't seem to include how to lay out the names file though, so check here for that:

http://frontiers.forthekill.com/sectorMaker/SectorMakerInstallGuideUbuntu.html

Good luck!
 
Like a lot of what is discussed here, this is over my head. I see everyone is suitably impressed and to do that here then it must be really awesome.

Great work!
 
I have to agree with Khan Trav; we clearly have a number of Computer-5 members out there.

Was unable to run the shell script. Problem with the SW4 binaries; the error messages indicate incompatible architectures (two are PPC, one is i386.) Starting to get over my head here again, but I think the architecture needs to be x86_64 for Lion.

I know Apple recently supplied a bad OS 10.7.3 upgrade causing issues with legacy software, but I should have the repaired version. I don't think that is the problem. Do the binaries all need to be recompiled for x86_64?

Kem
 
Yes they do indeed - recompile the binaries from the .c files using gcc and you should be fine. I will post an updated archive w/intel and powerpc binaries.
 
Back
Top