gbCodeLib - Overview|
gbCodeLib provides a variety of features for managing snippets - creating, editing,
browsing, searching, importing, exporting and sharing - including keeping a history of all
A simpler, no-install version of gbCodeLib is also available that can simply be copied to
a USB Flash Drive and run from that drive. It's called gbFlashLib and is a great way maintain
access to your snippets when you're working away from your own PC.
The following information is kept for each source code snippet:
Short text description of the snippet
Programming language to which the snippet belongs
Language category to which the snippet belongs
Time snippet was last changed and saved
- Binary Object
Copy of a file associated with the snippet
- Unique ID
An internally maintained unique identifier for the snippet
- Custom Fields
Up to 6 fields with user-defined content
The main window includes a Tree view which lists all
snippets grouped by Language and Category. When a snippet is selected
in the Tree, its details are displayed in the main window. All gbCodeLib
capabilities are accessed from this window.
The snippet source code is displayed in a source code editor which provides
very powerful display and editing features. Color syntax highlighting,
macros, undo/redo, search/replace, shortcuts and split screens are
just a few of the features supported by the source code editor.
The gbCodeLib source code snippet database can be searched for a text string
using the controls found in the optional Search frame. Options are provided
to limit the scope of the Search and a list of recently used search terms is maintained.
Boolean 'and/or' search is also supported (limit of 2 terms)
Two special built-in searches are supported. The button with "*.*" will display
all code snippet titles within the selected scope. The button with the
bookmark symbol (flag) will display all bookmarked code snippet titles within the
An individual snippet resulting from a Search can be displayed by clicking on the snippet
title or the Tree display can be limited to the results of a search. Snippets
resulting from a search can also be bookmarked.
Single Language Display
While gbCodeLib can display any number of Languages/Categories/Snippets in the
Tree, an option is provided to restrict display to a single language.
gbCodeLib supports the export of snippets to HTML file formats, including full
color syntax highlighting. An individual snippet, or entire language may be
selected for export.
gbCodeLib can optionally keep a copy of all saved versions of a snippet.
The revision level is maintained automatically by gbCodeLib. Revisions are
kept in a separate repository file.
Users may select any file (text or binary, such as source code files and images) to be
associated with a source code snippet. A copy of the file is kept in the gbCodeLib
resource database and may be viewed with the built-in object viewer. Objects can be
extracted to a folder of choice.
gbCodeLib comes with built-in syntax support for several languages, kept as
XML formatted files in an installation subfolder. These files may be edited
to change the way gbCodeLib displays snippets from a language. Language definition
files may be also added to provide syntax support for any language.
The language files can be edited manually, or you can use the utility
gbXML which provides a graphical interface
for creating language definition files. gbXML is accessible from the gbCodeLib
The primary snippet database is located in the gbCodeLib installation
folder. This is referred to as the 'local' database.
A copy of the local database may be saved to one or more folders.
These copies are referred to as 'remote' databases. The snippet database in
any one folder can be designated as the 'current' remote database.
gbCodeLib provides a one-click method for switching between the local snippet database
and the current remote database. This feature is often used to provide a common,
shared database between multiple users.
Source Code Import
Updates to the source code distributed with gbCodeLib are kept
online. gbCodeLib can access the online version and display
updates for addition to the gbCodeLib database.
Additionally, gbCodeLib can import source code from files on
your local PC. Source code for most programming languages is
kept in text files, which gbCodeLib can scan and present to
the user for import into the gbCodeLib snippet database. gbCodeLib
can detect whether such snippets already have matches in the
gbCodeLib snippet database.
Online Server Search
From within gbCodeLib, users can search the online database at the gbCodeLib
server or at any other server where the gbCodeLib database is uploaded and
accessible. Searching a user database additional requires the placement of a
simple Perl script into the users' CGI-BIN folder. The Perl script is provided
as part of the gbCodLib distribution. It may be modifed by the user to provide
additional search capabilities.
Snippets found as a result of the search can be imported into the local
A copy of the Perl script is also provided online.
For users who want access to their snippets via the Internet,
gbCodeLib provides an internal FTP capability for transferring
the gbCodeLib snippet database to the user's server.
The user may then use gbCodeLib's built-in tools to synchronize
a local snippet database with the server copy.
gbCodeLib supports up to six user-defined fields. The user can
optionally display 3 or 6 of the custom fields in the main window.
The field titles can be defined and used in printing snippets or
exporting HTML pages. The data in the fields is handled as text strings.