Kenneth,
I just wondered if there was a method to force dillo to treat a file given on the command line as HTML.
No, but read on!
I'd like to use dillo to view html attachments from my mail program, but since the temporary file doesn't have .htm[l] as an extension (actually, it is extension free) so dillo just displays the html instead of interpreting it.
When listing directories, dillo analizes the filename extension to know what type a file is. If there's no extension, plain text is used. Now, I just commited a patch to the CVS that when analizes the file's data when its filename doesn't have an extension. The process is more tricky than it seems at first sight. Because lots of trouble come when a filetype is misdetected. I added this commet to file.c: /* Content type info: as we may misdetect a lot of files, * every unknown type is rendered as "text/plain". * todo: a better approach could be to detect&reject thosetypes we know * for sure we don't handle (as gzip, bzip, ELF, etc) */ Now, dillo tries to detect the file type (among the few types it knows how to handle), but if forced (clicking the file), it renders as plain text. It works quite nice for me, and it should solve your problem.
I don't mind working on a patch if this capability doesn't already exist, but before embarking down that path I thought I'd check with the experts as I didn't see a reference to this "problem".
Well, if someone has time, it'd be good to detect gzip & bzip2 and not to try to render them as plain text (because it makes little sense and wastes memory cache). For that purpose, a little extension to a_Misc_get_content_type_from_data (based on /etc/magic logic) is required, and also arranging the details: for instance, showing "Compressed" as file type in directory listings, and sending a message to the status bar when those files are clicked. Something like: "Sorry, I don't know how to display this file" That'd be nice for now. Sometime in the future, this file type can be used to handle the file to other programs/viewers using the dpi gateway. Cheers Jorge.- PS: but please bear in mind that dillo is not a file browser! :)