On Thu, Feb 18, 2010 at 07:08:50PM +0100, Johannes Hofmann wrote:
Hi,
On Wed, Feb 17, 2010 at 02:33:26PM -0300, Jorge Arellano Cid wrote:
Hi there,
Just committed a patch for "view source" as a filter dpi. The source is simple and is well commented. There're three modes: plain text, numbered plain text, numbered html. The latter one is the default. Just give the source a look to change modes.
It is very simple to tweak and improve. I remember somebody asked for "view source" in a favorite editor. From the dpi is simple. e.g. save to /tmp/source.txt and execl your editor.
Comments, patches, cool styles, etc are welcomed.
Very nice indeed! Here come some random thoughts:
* Some time ago we thought about using a common URI scheme for view source: http://en.wikipedia.org/wiki/View-source_URI_scheme Maybe it's worth a look again.
Yes, storing the viewed URI in the viewsource URI helps.
* Would it be possible to use a table in HTML so that one can cut/paste source without the line numbers? Not sure how that affects the rendering performance.
I don't know. The trick to make line numbers follow wrapped lines is to have a shared the row, which OTOH includes line numbers in copy/paste.
* It would be nice to unify the look'n feel of the various autogenerated HTML in dillo: * splash screen * directory listings * bookmarks * and now view source I would propose to simplify the HTML as much as possible (e.g. just <ul>'s for bookmarks and have a single common CSS snipplet in a single header file that is included by the various DPIs. Hopefully some webdesigner could then adapt this CSS to make things look nice. Also it would be handy to have some "id=dillo_bla" attribute in each of the pages so that users can change the look of bookmarks or view source individually in their ~/.dillo/style.css
A common style (or colors at least) sounds sensible. I'm happy with bookmarks as they are, but is no surprise as I coded them. Mine is very fast and < 28 KB, I assume yours is much bigger. In that case I'd prefer to have both options in the same dpi code (like viewsource, but configurable with an rc file).
* Can we change "View Stylesheets" to also use the new DPI?
Yes, and also "page bugs", and then get rid of FLTK's TextDisplay widget. -- Cheers Jorge.-