Backend
by slowmaker of http://programmingforfun.net
(also hangs out at http://www.donationcoder.com)

Backend is essentially a command line or program launcher utility designed to
help programs--text editors, in particular--handle different file types
automatically. It could, in theory, provide the necessary 'glue' to give
automatic file handling to other applications as well, perhaps for a portable
file manager or some such thing.

I go through periods of manically trying out different text editors and/or
IDEs, and one of the obstacles in the past has been the pain of losing
auto-handling by file type, or the even greater pain of having to create
different batch file workarounds for every stinkin' editor. So I developed
Backend to facilitate auto-handling of different file types between different
text editors in a usb-drive portable way. Since many text editors can at least
pass the current file name automatically to programs they launch, Backend is
based around dissecting that single parameter and letting you specify what to
do with the parts.

Usage examples
==============
PSPad (for each user highlighter, add External Applications entry)
"e:\_apps\_dev\backend\backend.exe" "%File%"

Notepad++ (a saved Run command)
e:\_apps\_dev\backend\backend.exe "$(FULL_CURRENT_PATH)"

metapad (primary external viewer)
\_apps\_dev\backend\backend.exe

TED Notepad (Text filters)
\_apps\_dev\backend\backend.exe "%F"

NoteTab Light (Custom Launch under Tools in Options dialog)
\_apps\_dev\backend\backend.exe "^**"


In each case, I gained auto-handling of multiple file types with a single
editor command, which was exactly the original goal of this project.
Ironically, the most flexible editor of the above examples, PSPad, was the
most tedious to set Backend up with, because it already has its own brand of
auto-handling, so I had to paste the Backend command line in for each and
every file type. Still, it was easier than the old way.


Backend.ini
===========
Backend relies on backend.ini. You WILL have to edit this file; my default
settings are almost guaranteed to be different from your needs.

Backend.ini defines actions by groups named for either extensions or file
names (file names only apply if no extension exists in the given file). Group
names intended to match extensions (i.e. most of them) should be prepended
with a period.

Each group should have one key named 'action' which defines the command line
to be passed to the OS, possibly substituting values for the variables
recognized by Backend.

     Variables
     ---------
     #app_drive_letter#   drive on which Backend.exe resides (usb drive, presumably)
     #drive_letter#       drive letter extracted from first arg
     #folder_path#        path (no file name or drive letter) extracted from first arg
     #file_name#          file name (no extension or path) extracted from first arg
     #file_extension#     file extension extracted from first arg
     #all_other_args#     everything after the first arg
  
Example Backend.ini entry:
[.fb]
action=#app_drive_letter#:\freebasic\fbc.exe -s gui "#drive_letter#:\#folder_path#\#file_name#.#file_extension"

Example Backend.ini entry, splitting things up for a more complex build:
[.pb]
action=#app_drive_letter#:\_apps\_dev\_builders\purebasic-make.bat "#drive_letter#:\#folder_path#" "#file_name#" #app_drive_letter#


This archive should contain these files
=======================================
backend.exe
backend.ini
backend.txt
src\make.bat
src\backend.pb
src\backend.ico

License
=======
This software is "optional donation" freeware for private, educational, or
commercial use. This means you don't have to pay anything at all for it, but
you *can* pay for it if you like it and want to encourage the developer. If
you want to donate, visit http://www.donationcoder.com and donate through them,
 or visit http://programmingforfun.net and contact me if you cannot or will
not donate through DonationCoder (but why on earth not? they're a great
crowd...).

If you want to donate but your accounting department won't let you without
some sort of formal billing statement, contact me and we'll see if we can work
something out.

Distribution is allowed as long as you do not change the contents of the
archive and are not charging for my software *specifically*; charging for your
collection as a whole is fine, as long as the collection does not consist
solely of my software.

The source code should be included in this archive. I retain full copyright to
this source code, but you are free to read it, get ideas from it, even use
small portions that you find particularly useful in your own projects as long
as you give clear attribution to me. You are *not* allowed to just recompile
the whole thing under a new name (i.e. rebranding).

Release History
===============
Release 1 - automatically handle files based on extension and ini file settings.