It is currently Wed Jun 19, 2013 9:47 am

All times are UTC + 1 hour




Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: PB IDE Plugin : Print colored sources from IDE
PostPosted: Sun Aug 02, 2009 3:10 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
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:
;
; 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).
;




:)

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Last edited by Flype on Thu Aug 27, 2009 1:24 pm, edited 12 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 9:57 am 
Offline
User
User
User avatar

Joined: Wed Nov 16, 2005 7:51 pm
Posts: 88
Location: France
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:

_________________
PureBasicien tu es, PureBasicien tu resteras.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 10:19 am 
Offline
PureBasic Expert
PureBasic Expert
User avatar

Joined: Wed Oct 29, 2003 4:35 pm
Posts: 9859
Location: Beyond the pale...
Looks great Flype - some excellent work.

Thanks. 8)

_________________
I may look like a mule, but I'm not a complete ass.

eScript
Arctic Reports
nxSoftware


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 11:22 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
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 :?:

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Last edited by Flype on Sun Aug 02, 2009 1:26 pm, edited 3 times in total.

Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 11:29 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
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.

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 3:40 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 05, 2004 4:04 pm
Posts: 633
Location: Germany
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:

_________________
Zip_It V1.1
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 3:55 pm 
Offline
Addict
Addict
User avatar

Joined: Thu Jun 24, 2004 2:44 pm
Posts: 4740
Location: Berlin - Germany
For Germany you can use: DD.MM.YYYY or the international Form YYYY-MM-DD

_________________
PureBasic 5.11 | Windows 7 SP1 (x64) | Linux Mint 15 (x64) | RealSource

The use of EnableExplicit is free of charge and avoids errors.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 4:18 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
thanks guy :wink:

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

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 4:34 pm 
Offline
Enthusiast
Enthusiast

Joined: Wed May 05, 2004 4:04 pm
Posts: 633
Location: Germany
yes... that's correct

_________________
Zip_It V1.1
Image


Top
 Profile  
 
 Post subject:
PostPosted: Sun Aug 02, 2009 5:55 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
Beta 2 - See 1rst post.

Code:
; [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).

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 22, 2009 11:25 am 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
First post updated.

August Release with Source code provided

http://dl.free.fr/gLxnfOf1k


Quote:
-------------

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

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

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 22, 2009 1:25 pm 
Online
Enthusiast
Enthusiast
User avatar

Joined: Mon Apr 25, 2005 9:28 pm
Posts: 558
Location: $300:20 58 FC 60 - Vietnam
: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:

_________________
“Fear is a reaction. Courage is a decision.” - WC


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 22, 2009 4:34 pm 
Offline
Addict
Addict
User avatar

Joined: Tue Jul 22, 2003 5:02 pm
Posts: 1496
Location: Nantes, France
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:

_________________
No programming language is perfect. There is not even a single best language.
There are only languages well suited or perhaps poorly suited for particular purposes. Herbert Mayer


Top
 Profile  
 
 Post subject:
PostPosted: Sat Aug 22, 2009 5:45 pm 
Online
Enthusiast
Enthusiast
User avatar

Joined: Mon Apr 25, 2005 9:28 pm
Posts: 558
Location: $300:20 58 FC 60 - Vietnam
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

_________________
“Fear is a reaction. Courage is a decision.” - WC


Top
 Profile  
 
 Post subject:
PostPosted: Thu Aug 27, 2009 10:01 am 
Offline
Enthusiast
Enthusiast

Joined: Mon Jun 09, 2003 10:08 pm
Posts: 635
Location: Nottingham
@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

_________________
Anthony Jordan


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 18 posts ]  Go to page 1, 2  Next

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 2 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  

 


Powered by phpBB © 2008 phpBB Group
subSilver+ theme by Canver Software, sponsor Sanal Modifiye