|
gnotebook: Bluefish: GNOME's Happy HTML Hybrid
Press Releases: They're Not Just for the Subversion of Journalism AnymoreI live in dread of press releases. There's a general kvetch most writers (and readers) aim at them, which is that they're representative of a sad trend in the news media today, and one that a lot of journalism schools are complicit in. They appropriate "journalese" and turn it toward providing the antithesis of good journalism: directed, focused spin that encourages the lazy writer (and reader) to decide that because the language used is so similar to what a reporter might write, they're reliable sources of information. A good friend of mine who earned his journalism degree several years ago complained that his j-school classes were as oriented around training flacks to use newsy language in their press releases as they were in teaching budding journalists the nuances of reporting the news. His complaint was that his professors were encouraging the subversion of news writing by teaching flacks how to weasel past the filters many people have against obvious marketing language. If an advertisement reads like news, he argued, many people will take it as such out of simple conditioned response to the rhythms and cadences of writing style. I agree with him, but my real dread doesn't come so much from the part they're playing in the big blur between marketing and news writing as the form they tend to arrive in: horrible, bloated HTML spewed out of the many HTML editors out there today. I have to wade through that every time I post a release to LinuxPR, for instance, and they're often a nightmare of useless and redundant tags, or tags that have inexplicably been left in place even when the text they enclosed was removed. It's usually easier to just render the PR in a browser, cut and paste that into a text editor, and add the minimal amount of tags needed to make the thing presentable again. Problem solved, and it beats deleting the references to non-existent stylesheets (or, worse, stylesheets loaded from another server altogether), font-specifying tags that begin and end every paragraph, and so on. As tempting as it is, though, to mutter curses at the flack dutifully cranking out megabytes of questionably-constructed HTML documents with Word or StarOffice, I try to take a deep breath and remember that a lot of people, right or wrong, are simply stumped by actually using a markup language. It doesn't fit the dominant paradigm of computing over the last ten years, which involves providing buttons and WYSIWYG feedback to do everything. Remembering tags is harder for most than remembering to use an interface they're familiar with from their word processor. Is it the wrong way to do things? I think so. Is it a fact of life? Yes. So I look askance at a lot of HTML editors, wishing that they'd make at least make an attempt to bridge the gap between WYSIWYG simpicity and the generation of clean markup. Being afflicted by a dollop of laziness, myself, I tend to use GNU Emacs and a handy extension for it: html-helper-mode for my markup. It spares me having to type <p> every time I want a new paragraph by providing ALT-p as a shortcut to produce the tag, it has a bunch of handy tools for providing datestamps, enclosing a URL in an anchor tag, and shortcuts for most of the tags you'll need. It even defers to good HTML practice by breaking out logical and physical styles (<strong> as opposed to <b>). It's ideal for light markup, or for a quick jog to the memory for how a forgotten tag should work. Emacs, though, isn't the answer for everybody. In fact, there are few things more cruel than hyping it to the ceilings to a cherished friend and then disappearing for a week while they go through the process of training their fingers to cope with the sort of digit acrobatics required to make things work. A good partway solution would be to leverage the sort of comprehensive and consistent look and feel a GUI can bring to the computing experience without introducing the dumbing-down (and bad-HTML-inducing) elements of a lot of HTML editors. A hybrid between the friendlier interface provided by GUI's and the economy provided by a plain old text editor with good shortcuts, or even just a plain old text editor.
Bluefish: Makes HTML Accessible Without Producing JunkOne answer is out there in the form of Bluefish, a GNOME-oriented HTML editor that provides a huge array of menus and keystrokes for producing HTML that doesn't bury the tags under a WYSIWYG interface even as it makes it easy to check a document on the fly. Getting Bluefish Bluefish is available for download from a variety of mirrors, many of which are updated several times a day. It comes in tarballs, .deb's (which work fine with a Ximian GNOME-equipped machine running Debian Potato), and RPM's (i686 and Alpha). Building Bluefish isn't too tough, either, and the project FAQ provides thorough guidance on the process. Looking at Bluefish The goal of Bluefish isn't so much to write code for the aspiring HTML author as it is to provide an easy way to marshall the huge number of tags available for web content creation without keeping a reference book or cheat sheet on hand. To that end, it provides no less than 10 tabbed toolbars with buttons that provide everything from basic text formatting (it favors structural markup) to Javascript (it provides a handy mouseover template, for instance) to PHP (in the form of an online reference for common functions.) By clicking on toolbar buttons for many of the commands, a dialog pops up that allows the user to enter the information needed to produce a valid tag. Clicking on the IMG button, for instance, pops up a window that asks for width and height (expressed either as pixels or percentages of the original size), the location of the image, the ALIGN characteristic of the image, and VSPACE and HSPACE values. For people who have a rudimentary knowledge of HTML, these pop-ups provide useful reminders of the bare essentials needed for most tags, and they also help guard against the sorts of typos and unclosed tags that get through on even the best author. The actual HTML editing is done in a pane where the HTML itself is never obscured: the author sees syntax-highlighted markup as it's added. As with most GTK-based apps, the editor allows for the use of common Emacs navigation commands. Another feature common to many GTK-based applications and one that comes in handy with Bluefish is the ability to assign personalized shortcut keys to menu items quickly and easily by highlighting a given item with the mouse and entering the keystroke the user would like bound to the action the item represents. It makes a tool with a lot of menus and options very customizable, assisting new and experienced users in making the transition from other tools. Bluefish does a good job of providing a set of GUI tools for adding references to files in a given document. It provides a sidebar that lists files in a given directory. Dragging a filename into the editing window causes Bluefish to produce HTML appropriate to the file type. Dragging a .png for instance, creates an IMG tag with a helpful empty 'alt' parameter included. Dragging an HTML file creates an anchor tag requiring only that the author provide the text enclosed by the link. Bluefish doesn't stop at HTML creation: it also provides a useful set of options for previewing HTML both in a browser or a pop-up window. It's a good way for newer users to receive some feedback on what their HTML looks like without compromising with a WYSISWYG approach. Bluefish also allows for external programs to be invoked on a file in its edit buffer. By default, it includes the ability to run weblint, which parses HTML for non-standard code. Unfortunately, in the one indication of instability in the program I could find, clicking on the 'tidy' function causes Bluefish to crash, which is a useful reminder that, as with all programs under development, it's good to save frequently no matter how solid overall a program may seem. Wrapping Up Bluefish doesn't remove the need to understand how HTML works in general. To that extent, it isn't as "easy" as a WYSISWYG editor. On the other hand, even a HTML novice with just a rudimentary understanding of how a markup language works and a few basic rules about HTML in particular will find that it makes the job of producing pages much easier, and because it never obscures the HTML source involved in producing a document, it also provides a good learning experience. Another big plus for Bluefish is its online documentation, which is well written and cleanly presented, providing a thorough look at most of the program's features. Not only does it cover use of the program itself, but it provides development guidelines to coders who'd like to help out. Even though this part of the documentation isn't finished, it's impressive that it's there at all. It speaks well of the future Bluefish will likely enjoy as an ongoing project that the maintainer has taken the time to both document his code and manage his fellow volunteers. Bluefish marries the best of GUI's and traditional text editing into a customizable, useful package. Maybe if expose more people to it, those press releases I have to wade through won't be so terrible.
|