• 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

Line 807
# Make the generated text of the cover a pdf
/usr/bin/pstopdf /tmp/$1seccover.ps -o /tmp/$1seccover1.pdf


PSTOPDF is located in usr/bin

/sectors/autogen only see the following files
a.sec
a_alliances.txt
a_desc.txt
a_route.txt

ERROR MESSAGE:
./SectorMaker.sh: line 807: /usr/bin/pstopdf: No such file or directory
Error: Failed to open PDF File: /tmp/Aseccover1.pdf
 
Last edited:
Also just to make sure you have all the data. I'm running this from a command line with the following.

./SectorMaker.sh A rift mature 1


Hopefully this is correct....
ch
 
capture the text of
ls -la /usr/bin/ps*

should look like:
Code:
-rwxr-xr-x   2 root  wheel  52699 Aug 19  2006 /usr/bin/psed
-r-xr-xr-x   1 root  wheel  38936 Aug 19  2006 /usr/bin/pstopdf
-rwxr-xr-x   2 root  wheel  36601 Aug 19  2006 /usr/bin/pstruct

Note especially the permissions should be -r-xr-xr-x and if they aren't, we can fix that
 
all is good on the permissions. But I did notice that the version is newer and there is no pstopdf but a pst2pdf file located in the directory.


linux-tn5z:/srv/www/cgi-bin # ls -la /usr/bin/ps*
-rwxr-xr-x 1 root root 645 Sep 21 2007 /usr/bin/ps2ascii
-rwxr-xr-x 1 root root 2086 Sep 21 2007 /usr/bin/ps2epsi
-rwxr-xr-x 1 root root 327 Sep 21 2007 /usr/bin/ps2pdf
-rwxr-xr-x 1 root root 264 Sep 21 2007 /usr/bin/ps2pdf12
-rwxr-xr-x 1 root root 264 Sep 21 2007 /usr/bin/ps2pdf13
-rwxr-xr-x 1 root root 264 Sep 21 2007 /usr/bin/ps2pdf14
-rwxr-xr-x 1 root root 952 Sep 21 2007 /usr/bin/ps2pdfwr
-rwxr-xr-x 1 root root 497 Sep 21 2007 /usr/bin/ps2ps
-rwxr-xr-x 2 root root 52997 Sep 19 2007 /usr/bin/psed
-rwxr-xr-x 1 root root 5796 Sep 21 2007 /usr/bin/psidtopgm
-rwxr-xr-x 1 root root 18380 Sep 21 2007 /usr/bin/psktool
-rwxr-xr-x 1 root root 8168 Sep 24 2007 /usr/bin/psmandup
-rwxr-xr-x 1 root root 8662 Sep 24 2007 /usr/bin/psset
-rwxr-xr-x 1 root root 5832 Sep 25 2007 /usr/bin/pstoedit
-rwxr-xr-x 1 root root 18172 Sep 21 2007 /usr/bin/pstopnm
-rwxr-xr-x 1 root root 18312 Sep 21 2007 /usr/bin/pstree
lrwxrwxrwx 1 root root 6 Aug 11 17:08 /usr/bin/pstree.x11 -> pstree
-rwxr-xr-x 2 root root 36601 Sep 19 2007 /usr/bin/pstruct

ch
 
Last edited:
Ok I think I've figured out the pstopdf and ps2pdf problems. now i get the following

ERROR
./SectorMaker.sh: line 851: /usr/bin/gensec3: cannot execute binary file
./SectorMaker.sh: line 255: ditto: command not found

LINE INFO
255:
# Remove the first line so it doesn't get chunked (part of the get_Sectormap() fucntion)
sed '1d' /tmp/$1_secdatapre > /tmp/$1_secdata

851:
# Save the first line of the sector file ('Version' tag)
sed q /tmp/$1secdataorig2 > /tmp/$1secdataorighead

Thanks for the help

CH
 
not sure if this is a problem or not. but can someone tell me if I need to give the following files some type of execute per,missions? The file extention is reporting as unknown as well.

File Type
mapsub3 Unknown
gensec3 Unknown
full-upp Unknown
subsec2 AWk Script

Thanks,

ch
 
I'm pretty sure I need to find a way to recompile the following files under suse 10 linux to get this application working.

File Type
mapsub3 Unknown
gensec3 Unknown
full-upp Unknown
subsec2 AWk Script


Can anyone tell me how to do this, or point me to a web site to that tells you the commands to recompile the files?

Thanks,

Ch
 
Ok, after all the google searching I've come a little farther, but now when i run the ./SectorMarker.sh I get the following error:

Code:
linux-tn5z:/srv/www/cgi-bin # ./SectorMaker.sh NORMACA  rift mature 1
./SectorMaker.sh: line 255: ditto: command not found
sed: can't read /tmp/NORMACA_secdatapre: No such file or directory
cat: /tmp/NORMACA_combo.msecpolity*.txt: No such file or directory
./SectorMaker.sh: line 931: ditto: command not found
./SectorMaker.sh: line 970: ditto: command not found
./SectorMaker.sh: line 1059: ditto: command not found

SectorMaker line info:
Code:
# Wipe pesky underscores
sed '/_/ s/_/ /g' /tmp/$1secdata > /tmp/$1secdataZ
ditto /tmp/$1secdataZ /tmp/$1_secdatapre

# Remove the first line so it doesn't get chunked
sed '1d' /tmp/$1_secdatapre > /tmp/$1_secdata

Can anyone help with this this????

Thanks,

CH
 
just popping in to say 'hi'

Aramis is correct and most helpful (as usual). Thanks Aramis!!! :D

Chris: it appears you don't have the binary 'ditto' installed as part of Suse Linux. Try replacing 'ditto' with 'cp'. All of the issues I see you confronting seem to be based on finding Suse Linux flavors of various unix apps. You're doing great!

Also, try to use a more descriptive sector name than 'A'. How about 'Arbaklar'?

And I also wanted to say how glad I am that Chris is making this work under Suse Linux as well. Hooray for kludgy scripts that rely on open source unix! Yay!!!

Here to answer any questions if needed, I've been very busy with a project that just launched last week.

:) :)
 
Last edited:
yep, no ditto command and does not look like they have an install for it, but cp works.

Now getting the follow...

Code:
linux-tn5z:/srv/www/cgi-bin # ./SectorMaker.sh nama rift mature 1
  .  nama Sector debug - sector map generation complete @ 32 seconds.
expr: non-numeric argument
enscript: do not know anything about media "Traveller"
ERROR: /undefinedfilename in (/tmp/namasubsecdataA.ps)
Operand stack:

Execution stack:
   %interp_exit   .runexec2   --nostringval--   --nostringval--   --nostringval--   2   %stopped_push   --nostringval--   --nostringval--   --nostringval--   false   1   %stopped_push
Dictionary stack:
   --dict:1138/3371(ro)(G)--   --dict:0/20(G)--   --dict:102/200(L)--
Current allocation mode is local
Last OS error: 2
ESP Ghostscript 8.15.3: Unrecoverable error, exit code 1
  .  nama Sector debug -  A subsector data / map parsing complete @ 41 seconds.

Now really stumped can find a reference to Media Traveller..

Oh, and I've upgraded from A for a sector name to nama =)

CH
 
The 'enscript' error indicates you may not have put 'enscript.cfg' or the 'hdr' files where they need to be in order for the text-to-postscript function to work. Check those out in the installation instructions and see where it's looking for them on your system.

That may, or may not, help the GhostScript crash, which could be caused by trying to read the file that enscript couldn't create properly.

Last, you may want to move this effort offline, to email, if others find the 'troubleshooting spam' from this exciting port distracting.
 
Last edited:
Good news!

Little update - after a little troubleshooting, it looks like Chris successfully ported the script to SuSE Linux.

Great job Chris!
 
I know this is a bit late but does this work on Windows ?

short answer: no. This is heavily Unix/Mac-based, requiring stuff that is readily available on those systems, and not on Windows.

long answer: well, there are probably Windows-based tools to accomplish similar things. But shell scripts in Unix/Linux/Macs are based on the shell they are using, and the Windows command shell, or even the power shell, do not have those supporting programs natively available. Not so say you could not find them....but it would take significant tweaking.

Now, you could use the Traveller map web site & I think you can pass it a SEC file to map, then be able to download the resulting map. But, as always, I could be misremembering things.

At least that's my understanding of it.
 
Thanks, it was worth a try.
Any chance of the link to that site your suggested ?
 
I know this is a bit late but does this work on Windows ?

you can find almost all the needed libraries on line... but it's going to take fiddling a good bit, and then it still might not work well.
 
Back
Top