taken on gentoo linux with the fluxbox window manager, Flauxnther fluxbox theme, and Panther GTK2 theme using the gimp
optional, but suggested
- psyco is a Just-In-Time compiler which can speed up any python program by 1 or 2 orders of magnitude.
- win32all is used by the transparency, spellcheck, and printing features on windows.
- subprocess [windows installer for python2.3; ships with python2.4] makes process spawning easier and faster.
on any POSIX-compliant OS or windows 2000 or later, if you have all three of the above dependencies, installation is literally as easy as unzipping it. as soon as you decompress it, you can double click on flauxtext.pyw [or run "pythonw flauxtext.pyw" or "python flauxtext.pyw &"] and it should pop up happily.
flauxtext script in your path
if you want to be able to type 'flauxtext' on the command-line in any directory, just run 'mk_script.py'. this script detects your OS and writes an appropriate batch/shell script in your path.
on windows, the script is C:\windows\system32\flauxtext.bat and it contains the one line: start C:\path\to\flauxtext.pyw %1 %2 %3 %4 %5 %6 %7 %8 %9
on other systems, the script is /bin/flauxtext and it looks like
#!/bin/sh
/usr/bin/python2.3 /path/to/flauxtext.pyw "$@" &
for both scripts, 'flauxtext.pyw' is replaced with 'flauxtext.pyo' [which is compiled then] if you do not have psyco.
on POSIX, you can also add a line to your ~/.bashrc similar to
alias fl="python ~/.flauxtext/flauxtext.pyw"
configuration
the first thing you should do after opening flauxtext is open its config file by going to the "Help > Open my Files > Config File" menuitem.
this is a standard ini-style config file, parsed with python's standard ConfigParser module, with one [slightly dangerous] implementation detail: each value [string after the colons] is eval()ed, to turn that string into a python instance. if, instead of happy python code, you put something stupid like
keyname: os.system('rm -rf /')
or
keyname: os.system('deltree /y C:\\')
you will be very sorry.
this also necessitates quoting values which should yield strings after eval()uation:
Bashstub: '#!/bin/sh\n\n'
i took the comments out of the config section to make it easier to read and find things. the above link discusses each of the configuration variables, and is included with flauxtext.
- literal and regular expression find AND REPLACE!
checkbuttons for the ignore case, locale, multiline, and dotall regexp flags
combobox for selecting direction to find/replace
if you've selected any text before opening the find dialog, the selected text will appear in the 'find' entry box
[also, the "hilight all" and "replace all" only search through the selected text.]
- Dynamic MRU [you can open previously opened files from the File menu.] [it saves a newline-delimited list of files in history.flauxtext in its directory.]
- tabs [you can edit multiple files at a time.]
- goto line number dialogue [you give me a line number, or the word "end", and i'll go there.]
- insert file [open a file and insert its text into the current buffer at the cursor.]
- insert date/time [you can format this time string anyway you like in the configuration.]
- edit selected/all text:
- convert crlf to lf, and vice versa [you won't be able to see the difference in flauxtext, but if you try to open a file in MSNotepad that uses the wrong line termination character, you'll love flauxtext.]
- swap case [change selected capitalized letters to lowercase, and vice versa.]
- lower case [change all selected characters to lowercase.]
- rot13
- rot47
- add/remove a space/tab to the beginning of each selected line [for all my fellow python coders]
- rotate word wrap [wrap by word or character or not at all] default hotkeyed to control+r
- change font [you're editing text, so this only sets how you see the text.]
- toggle:
- tab bar [you can set where it is in configuration. this menuitem lets you hide or show the tab bar.]
- line numbers [you can set which side[s] they're on in configuration. this menuitem lets you show or hide them.]
- statistics [get numbers of certain things, like html tags, lines, common words, common charactersor, and any kind of parentheses.]
dynamic statistics [type a string or regexp pattern in the left text entry widget, and the right text entry will tell you how many matches there are.]
- F5 run [map an fnmatch pattern to a command pattern in 'runcmds' in config.flauxtext, hit F5, and i'll call the command associated with the fnmatch pattern matching the current file. extremely handy for scripters like myself.]
shift+F5 run with args [i'll open a dialog, and append whatever string you give me to the command set for the current file in my configfile]
alt+F5 run and get output [i'll open another buffer containing the output printed by your script]
alt+shift+F5 run with args and get output
- search for selected text using any of the following search engines: google, google images, sourceforge, freshmeat, merriam webster dictionary/thesaurus, OED, and wikipedia. [this submenu just passes strings to your internet browser, which you set in configuration.]
- SMTP [you can email the file you're currently editing to anybody so long as you have an email account and know your smtp servername. you can use the current file as either the body of the email, or attach it, and you can attach any number of any other kind of file.]
- FTP [upload the current file to your ftp space. if you don't know what ftp is, don't worry about it.]
- CVS [commit the current file to your cvs repository. if you don't know what cvs is, don't worry about it.]
- open selected url source [you hilight a url in the current buffer, and i'll open another buffer containing the html sourcecode for that website.]
- browse selected url [you hilight a url in the current buffer, and i'll open it in your internet browser.]
- open a command line terminal in the directory containing the current file
- open your file manager in the directory containing the current file
- open an SSH terminal [you give me the servername and username in configuration.]
- call gtk-chtheme [posix] or gtk2_prefs.exe [nt] to change your gtk skin.
- set permissions on the current file [if you own the file, this tool lets you change who can do what with the current file.]
- python help(module) [you give me a python module name, and i'll open its help documentation in a terminal.]
- make new ... opens a new buffer containing stubs from configuration
- open help documentation explaining how i use regular expressions in both find and replace
- open the source
- open this webpage in your browser, in case you should need it for some reason.
- open the pygtk reference in your browser, for when you go to hack my source or write your own pygtk app. feel free to hide this menuitem in configuration.
- email me from within flauxtext about the program.
- hacker-friendly: the source is decently commented, and the callbacks are alphabetized.
- command-line usage:
- Collaboration over teh intarweb [like gobby]
- Hex-editing
- Posting to UBBs
contact information
faulkner [at] users [dot] sf [dot] net
my full legal name does not include anything like 'faulkner'; it is just a web handle.
email me with your reason if you should need my legal name.