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. Enjoy! -- Cheers Jorge.-
On Wed, Feb 17, 2010 at 10:54:32PM +0000, corvid wrote:
Jorge wrote:
Just committed a patch for "view source" as a filter dpi.
Nifty!
;)
I tried quickly viewing the source's source, and then the source's source's source, etc., and it gets confused after a little bit and gives me truncated pages.
The source's source is supposed to be a non-operation that slipped in; BTW it can be easily disabled in a_Nav_send_source(). The point is that each view source request erases the old page from the cache and thus doesn't need special handling to free memory. I'd like people to "test drive" and feel it. For instance, I found that numbered plain text is much faster on a 13MB page when compared to HTML. For common sized pages, HTML looks better and seems a good tradeoff. The numbering, ability to use text search and the flexibility of using an external viewer by tweaking the dpi gave me a good feel on the whole idea. -- Cheers Jorge.-
In the new tab opened by view source, I pasted in a new URL, clicked some link in it, then pressed back twice. Dillo was actively trying to load, but apparently not receiving anything. Then I clicked forward and got a segfault in the dpi. The core file says it died in the strtol(). Repeated my steps and got the same result.
On Thu, Feb 18, 2010 at 05:21:53AM +0000, corvid wrote:
In the new tab opened by view source, I pasted in a new URL, clicked some link in it, then pressed back twice. Dillo was actively trying to load, but apparently not receiving anything. Then I clicked forward and got a segfault in the dpi. The core file says it died in the strtol().
Repeated my steps and got the same result.
Yes, this is an interesting problem... I'm thinking of the alternatives. -- Cheers Jorge.-
On Thu, Feb 18, 2010 at 05:21:53AM +0000, corvid wrote:
In the new tab opened by view source, I pasted in a new URL, clicked some link in it, then pressed back twice. Dillo was actively trying to load, but apparently not receiving anything. Then I clicked forward and got a segfault in the dpi. The core file says it died in the strtol().
Repeated my steps and got the same result.
Committed an interim patch that shows how it could feel. Additionally disabled view source's source and view source reload. The latter one may be necessary; I'm not sure. -- Cheers Jorge.-
Hi. This is interesting. I can find string in HTML source on dillo and this is good benefit. Regards, furaisanjin
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. * 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. * 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 * Can we change "View Stylesheets" to also use the new DPI? Cheers, Johannes
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.-
On Sat, Feb 20, 2010 at 04:35:01PM -0300, Jorge Arellano Cid wrote:
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.
Ah ok.
* 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).
The point is not rendering speed. It's fast enough :) I was rather thinking about reducing complexity by separating content and style using CSS. The look could be basically the same as currently, but of course there might be some differences regarding wrapping and so on. Perhaps some web designer could help here?
* 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.
Yes, that would be cool. Maybe even links from page bugs to the corresponding line in view source. Cheers, Johannes
On Sun, Feb 21, 2010 at 06:11:55PM +0100, Johannes Hofmann wrote:
* 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).
The point is not rendering speed. It's fast enough :) I was rather thinking about reducing complexity by separating content and style using CSS. The look could be basically the same as currently, but of course there might be some differences regarding wrapping and so on. Perhaps some web designer could help here?
Just to explain what I have in mind I made a static HTML bookmarks page: http://www.ecademix.com/JohannesHofmann/tmp/dillo_bm.html Please have a look at the HTML, the style is not really polished as I'm not a designer :) Cheers, Johannes
participants (4)
-
corvid@lavabit.com
-
furaisanjin@gmail.com
-
jcid@dillo.org
-
Johannes.Hofmann@gmx.de