Page 1 of 2

PB IDE Plugin : Print colored sources from IDE

Posted: Sun Aug 02, 2009 3:10 am
by Flype
PureBasicPrint, a PureBasic IDE Tool for printing colored .PB files

This program is a tool to print colored source codes from the IDE.
You can easily add it to the ToolMenu and/or the ToolBar 8)

PureBasicPrint is nearly finished, so it is proposed here as a beta.

Download

Beta 1 : http://dl.free.fr/tOFlxLTL5
Beta 2 : http://dl.free.fr/oDx1fPTeZ

August Release (Source code provided) : http://dl.free.fr/gLxnfOf1k


PDF Sheet

http://dl.free.fr/mZiW3BHq1

Example of output sheets

http://dl.free.fr/r8Sn82RQl

PureBasicPrint is more or less inspired by these posts

http://www.purebasic.fr/english/viewtopic.php?t=17127
http://www.purebasic.fr/english/viewtopic.php?t=19876
http://www.purebasic.fr/german/viewtopic.php?t=5159


Image


PureBasicPrint output using a virtual printer (PDFCreator)

Image


Roadmap

Code: Select all

; 
; TODO :
; 
; [ ] Add       : Implements Line Spacing.
; [ ] Add       : Graphical User Interface (?).
; [ ] Add       : Installer (Copy files, ToolMenu, ToolBar, Shortcuts).
; [ ] Add       : Do not prints IDE Options at the bottom of the .PB file.
; [x] Add       : [ADDED] Better language support (English, Deutsch, Francais, Spanish).
; [ ] Add       : Linux/MacOS Compatible.
;                 Should be but the Syntax Hilighting SDK 
;                 is not available on Linux/MacOS at the moment.
; 
; [ ] Optimize  : Some redundant calculations can be optimized.
; [ ] Optimize  : Read IDE Options starting from end of .PB file.
;                 This should increase a bit the loading part especially with big files.
; 
; [ ] Known Bug : Line Wrapping do not works on large comments at the moment.
; [x] Known Bug : [FIXED] Color mistake when wrapping a line which is inside %CURSOR.
; [x] Known Bug : [FIXED] PageBreaks were processed even if outside of the %SELECTION.
; [x] Known Bug : [FIXED] Some problems with non-fixed fonts (line numbers).
; 


:)

Posted: Sun Aug 02, 2009 9:57 am
by Jacobus
It is a magnificent work. Thank you for it Flype. :)
But the usefulness seems me limited to a programmer code changes almost constantly. This will do the quantities of printed pages to keep up-to-date. However, for a backup of the rights and keep the paternity of source code, why not. It only remains that you do there a sacred job, yet bravo! :wink:

Posted: Sun Aug 02, 2009 10:19 am
by srod
Looks great Flype - some excellent work.

Thanks. 8)

Posted: Sun Aug 02, 2009 11:22 am
by Flype
Thank you jacobus and srod.

It's still work in progress and there are some bugs.

If someones can quickly help me, I need to know :

Bytes -> Translation for Francais -> Octets
Bytes -> Translation for Deutsch -> Bytes :?:
Bytes -> Translation for Spanish -> Octetos :?:

FormatDate() for English -> YYYY-MM-DD
FormatDate() for Francais -> DD-MM-YYYY
FormatDate() for Deutsch -> YYYY-MM-DD :?:
FormatDate() for Spanish -> YYYY-MM-DD :?:

Posted: Sun Aug 02, 2009 11:29 am
by Flype
Jacobus wrote:But the usefulness seems me limited to a programmer code changes almost constantly.
This will do the quantities of printed pages to keep up-to-date.
However, for a backup of the rights and keep the paternity of source code, why not.
Yes of course, printing 50 pages of PB codes is more wasting paper than useful.
But i think, it is especially useful for me when i print just a little part (some procedures, some importants routines) of the source code using %SELECTION argument.
And then i read it at lunch, in train, where i do not have computer but wanted to check/annotate some parts of my code.

Posted: Sun Aug 02, 2009 3:40 pm
by walker
Flype wrote: Bytes -> Translation for Deutsch -> Bytes

FormatDate() for Deutsch -> DD-MM-YYYY
that's it for german... If you need further help.....let me know :)
we use the english word for bytes too and the date is formated usually as in french :wink:

Posted: Sun Aug 02, 2009 3:55 pm
by ts-soft
For Germany you can use: DD.MM.YYYY or the international Form YYYY-MM-DD

Posted: Sun Aug 02, 2009 4:18 pm
by Flype
thanks guy :wink:

and for 'Page X' ? should be 'Seite'...

Posted: Sun Aug 02, 2009 4:34 pm
by walker
yes... that's correct

Posted: Sun Aug 02, 2009 5:55 pm
by Flype
Beta 2 - See 1rst post.

Code: Select all

; [x] Add       : [ADDED] Better language support (English, Deutsch, Francais, Spanish).
; [x] Known Bug : [FIXED] Color mistake when wrapping a line which is inside %CURSOR.
; [x] Known Bug : [FIXED] PageBreaks were processed even if outside of the %SELECTION.
; [x] Known Bug : [FIXED] Some problems with non-fixed fonts (line numbers). 

Posted: Sat Aug 22, 2009 11:25 am
by Flype
First post updated.

August Release with Source code provided

http://dl.free.fr/gLxnfOf1k

-------------

QUICK GUIDE

Feel free to do what you want with this package.
It's a PureBasic communauty gift.

-------------

If you want to test this package,


You'll need :


1/ PureBasic 4.3+
2/ Open "PureBasicPrint.pb"
3/ Go to compiler options -> executable arguments
4/ "PureBasicPrint.pb" MAGNIFICATION=1.5 COLORMODE=IDE PAGEBREAKS=1
5/ Read the PureBasicPrint.PDF sheet to learn more


-------------

Supported Command Line Arguments :

Parameter: "%FILE"
Parameter: "%TEMPFILE"

Parameter: CURSOR=%CURSOR
Parameter: SELECTION=%SELECTION

Parameter: REQUESTER=0|1
Parameter: PAGEBREAKS=0|1
Parameter: MAGNIFICATION=3
Parameter: MARGINS=LEFTxRIGHTxTOPxBOTTOM
Parameter: COLORMODE=IDE|IDEONWHITE|BLACKONWHITE

-------------

PureBasic IDE TOOL - Example of command line argument :

"%FILE" "%TEMPFILE" CURSOR=%CURSOR SELECTION=%SELECTION MAGNIFICATION=3 PAGEBREAKS=1 COLORMODE=IDE MARGINS=80x80x80x80

-------------

Posted: Sat Aug 22, 2009 1:25 pm
by flaith
:D Nice one Flype, but just a little suggestion: my background's IDE colour is gray, and when i print my code, a lot of ink is used :?
I know source code is provided, but there is a lot of code to read :wink:
And what about a requester before printing ? (i know it's almost in your todo list)

Thanks :wink:

Posted: Sat Aug 22, 2009 4:34 pm
by Flype
flaith wrote::D Nice one Flype, but just a little suggestion: my background's IDE colour is gray, and when i print my code, a lot of ink is used :?
I know source code is provided, but there is a lot of code to read :wink:
And what about a requester before printing ? (i know it's almost in your todo list)

Thanks :wink:
Hi flaith,

Both requested features are yet implemented.


my background's IDE colour is gray
--> use COLORMODE=IDEONWHITE inside the command line argument.


requester before printing
--> use REQUESTER=1 inside the command line argument.


from previous post :
5/ Read the PureBasicPrint.PDF sheet to learn more


:wink:

Posted: Sat Aug 22, 2009 5:45 pm
by flaith
Flype wrote:Hi flaith,

Both requested features are yet implemented.

my background's IDE colour is gray
--> use COLORMODE=IDEONWHITE inside the command line argument.

requester before printing
--> use REQUESTER=1 inside the command line argument.

from previous post :
5/ Read the PureBasicPrint.PDF sheet to learn more

:wink:
:lol: As usual, i really need to read more precisely, reading in diagonal is not the best way - Sorry Flype and thanks for answer me :D

Posted: Thu Aug 27, 2009 10:01 am
by akj
@Flype:

I am having trouble downloading your PureBasicPrint source code and .PDF file [perhaps due to a problem I'm currently experiencing of finding it impossible to enable cookies on my PC - possibly a virus].

Is there any other location from which I can download your source code and .PDF file. Alternatively could you provide them to me via a private message?

Thanks