Highlight is a source code syntax highlighter that convert source code into HTML and other formats with syntax highlighting. It comes with a nice GUI as well as a command-line executable.
The program implemented here utilizes the command-line version of Highlight as its backend. It exposes only limited number of features of the original program. However you may find it convenient in certain situations.
The program has three main windows: one for the source code, one for the HTML view and one for the HTML code. In the HTML view you can check the result rendered by the HTML engine. In the HTML code page, you can see its actual HTML code. The HTML view window and the HTML code window are embedded in the notebook window as separate pages under the source code window.
The upper window (a text control) and the lower window (a notebook) are two client areas of a wx.SplitterWindow. So you can resize them by moving the sash in the middle.
On the right, you have several options to choose such as source syntax, output type, theme, font and size etc. Output result can be sent to the clipboard either in HTML text or in bitmap image. It can be saved to a disk file as well.
To enter a source, you can use a file dialog by clicking on the file name text control. The source window is a drop target for files. So you can drag and drop a source file to the source window. You can also copy and paste text from other programs, or you can just type in your code in the source window. If the source came from a file, the source syntax is automatically selected by identifying the file extension. Otherwise you have to select it manually.
The image generated by the program is done by capturing the screen shot of the HTML view window. So you can control the size of the image and the contents by moving the sash and the vertical scroll bar.
If you select certain area of the source code, then you will have the output that matches with the particular area.
In Windows, this image capturing works on the primary display but may not on the secondary display if your display setting uses different scaling factors on each display.
<<source code>>
The program implemented here utilizes the command-line version of Highlight as its backend. It exposes only limited number of features of the original program. However you may find it convenient in certain situations.
The program has three main windows: one for the source code, one for the HTML view and one for the HTML code. In the HTML view you can check the result rendered by the HTML engine. In the HTML code page, you can see its actual HTML code. The HTML view window and the HTML code window are embedded in the notebook window as separate pages under the source code window.
The upper window (a text control) and the lower window (a notebook) are two client areas of a wx.SplitterWindow. So you can resize them by moving the sash in the middle.
On the right, you have several options to choose such as source syntax, output type, theme, font and size etc. Output result can be sent to the clipboard either in HTML text or in bitmap image. It can be saved to a disk file as well.
To enter a source, you can use a file dialog by clicking on the file name text control. The source window is a drop target for files. So you can drag and drop a source file to the source window. You can also copy and paste text from other programs, or you can just type in your code in the source window. If the source came from a file, the source syntax is automatically selected by identifying the file extension. Otherwise you have to select it manually.
The image generated by the program is done by capturing the screen shot of the HTML view window. So you can control the size of the image and the contents by moving the sash and the vertical scroll bar.
If you select certain area of the source code, then you will have the output that matches with the particular area.
In Windows, this image capturing works on the primary display but may not on the secondary display if your display setting uses different scaling factors on each display.
<<source code>>
Comments
Post a Comment