GMLscripts.com

Discuss and collaborate on GML scripts
Invert

You are not logged in.

#1 2008-02-14 10:05:48

Alexander_Q
Member
Registered: 2008-02-14
Posts: 9

Script PDF

I often like to just browse through the scripts, even if they provide functions I never intend to use. I have discovered many new things this way, and have come to realise more efficient ways of doing things (because all of the scripts are written in such a way as to maximise efficiency).

Thus, I thought it would be nice to combine all of the gml scripts into a single giant PDF for general skimming. The file combines 235 scripts into a 2mb file, one script per page. With Xot's permission, I'll provide a link for it in this thread.

The real shame in doing this is that although space-formatting is maintained, none of the nice syntax coloring that is part of the site's versions is recreated in the PDF. Can someone come up with a way to make a PDF via the HTML and thus produce a pdf of the scripts with coloring intact?

Offline

#2 2008-02-14 18:09:33

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Script PDF

Welcome to the forums, Alexander_Q.

I've never really considered if there was a need for a PDF version of the script archive, but it's an interesting idea. I've added some automation to the site to compile all of the scripts into a ZIP. I also have experience creating PDF documents in PHP. And I use Beautifier to do the HTML code highlighting for the site which I think could be extended to output the necessary code to produce a nicely formatted PDF. With all these bits, it might be very simple to produce new PDF files as the site is updated ... once I build the system, which might take some time to perfect. I'll have to look into these possibilities. In the mean time, I'd like to see your PDF, Alexander_Q, and hear a little about how you created it.


Abusing forum power since 1986.

Offline

#3 2008-02-15 22:24:31

Alexander_Q
Member
Registered: 2008-02-14
Posts: 9

Re: Script PDF

Certainly xot, here is a link to the document in question:

http://www.users.on.net/~sol/GML%20Scripts.pdf

To create it, I first downloaded the zip file you mentioned and batch converted all of the extensions to ".txt". I then used a convenient open source program called PDF Forge to combine all of the text files into a single PDF (there is an option to place one-per-page, which is quite helpful).

Offline

#4 2008-02-15 23:38:23

xot
Administrator
Registered: 2007-08-18
Posts: 1,239

Re: Script PDF

Thanks for the link and explanation. I noticed that although source spacing is preserved in the document, it is lost when copying it to the clipboard. I wonder if there is a way around that.


Abusing forum power since 1986.

Offline

#5 2008-02-16 03:18:54

Alexander_Q
Member
Registered: 2008-02-14
Posts: 9

Re: Script PDF

You're right. That is quite strange... You would think that copying from a .pdf would preserve the formatting. Perhaps there is a .pdf setting which ensures the formatting information can be properly read.

Offline

Board footer

Powered by FluxBB