Re: [elinks-users] elinks popen and coloured dump

2006-06-19 Thread Jonas Fonseca
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote Tue, Jun 13, 2006:
> By  the  way, is it possible to have document colours except for visited links
> (would like to have them always in yellow)

Not really, only customization of the active link is supported. You
could however try to echo "a:visited { color: yellow; }" into
~/.elinks/user.css and set the appropriate colors to load it. But
document colours will probably override it in most cases and we don't
support the CSS !important thing.

-- 
Jonas Fonseca
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] elinks popen and coloured dump

2006-06-13 Thread lynx . abraxas
Hallo!


Thanks  for the hint. Cool thing! I just got stuck on finding a programme that
can convert coloured ascii to something my printer will also print in  colour.
So far it is just printing the escape-sequences as text.
Are there any tools to get coloured ascii to html, ps or something else?

By  the  way, is it possible to have document colours except for visited links
(would like to have them always in yellow)

Lynx


On 12/06/06 19:03:18, Jonas Fonseca wrote:
> [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote Sun, Jun 11, 2006:
> > Hallo!
>
> Hej,
>
> > I now got stuck on trying to print in colour. Is there  a  way  to  get  a
somehow
>  > formatted  coloured  dump?  (html, esc-sequenced, ...) I might be nice to
have
> > the option "Save formatted and coloured  document"  With  colour  I   mean
the
>  >  colours   elinks   uses   for  displaying  depending on one of the three
modes. I
> > tried to use /dev/vcs3 but the escape-sequences are not  in  there.  Using
elinks
>  >  http://www.czech-language.cz/alphabet/kodovani.html > cz.txt is behaving
as if
> > -dump 1 had been specified.
>
> ELinks uses isatty to detect both whether to read from stdin and whether
> to dump to stdout or use interactive mode. Recent ELinkses support
> dumping colors. Use something like:
>
>   $ elinks --dump-color-mode 1 URL > file
>
> where the --dump-color-mode option is aliased to the elinks.conf(5)
> option document.dump.color_mode, 0 is mono, 1 is 16 colors, and 2 is 256
> colors (if ELinks was configured with --enable-256-colors).
>
> --
> Jonas Fonseca
> ___
> elinks-users mailing list
> elinks-users@linuxfromscratch.org
> http://linuxfromscratch.org/mailman/listinfo/elinks-users
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


Re: [elinks-users] elinks popen and coloured dump

2006-06-12 Thread Jonas Fonseca
[EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote Sun, Jun 11, 2006:
> Hallo!

Hej,

> I now got stuck on trying to print in colour. Is there a way to get a  somehow
> formatted  coloured  dump?  (html, esc-sequenced, ...) I might be nice to have
> the option "Save formatted and coloured  document"  With  colour  I  mean  the
> colours  elinks  uses  for  displaying  depending on one of the three modes. I
> tried to use /dev/vcs3 but the escape-sequences are not in there. Using elinks
> http://www.czech-language.cz/alphabet/kodovani.html > cz.txt is behaving as if
> -dump 1 had been specified.

ELinks uses isatty to detect both whether to read from stdin and whether
to dump to stdout or use interactive mode. Recent ELinkses support
dumping colors. Use something like:

$ elinks --dump-color-mode 1 URL > file

where the --dump-color-mode option is aliased to the elinks.conf(5)
option document.dump.color_mode, 0 is mono, 1 is 16 colors, and 2 is 256
colors (if ELinks was configured with --enable-256-colors).

-- 
Jonas Fonseca
___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users


[elinks-users] elinks popen and coloured dump

2006-06-10 Thread lynx . abraxas
Hallo!


First  of  all I want to thank the developers for the absolutly great browser!
Well done!

I just noticed that the instructions for printing with elinks  are  no  longer
working.  For  piping  one  has  to use io.popen and no "|"-syntax. For me the
attached hooks.lua works well with cups lp.

I now got stuck on trying to print in colour. Is there a way to get a  somehow
formatted  coloured  dump?  (html, esc-sequenced, ...) I might be nice to have
the option "Save formatted and coloured  document"  With  colour  I  mean  the
colours  elinks  uses  for  displaying  depending on one of the three modes. I
tried to use /dev/vcs3 but the escape-sequences are not in there. Using elinks
http://www.czech-language.cz/alphabet/kodovani.html > cz.txt is behaving as if
-dump 1 had been specified.


Thanks
Lynx




_INPUT = io.stdin
_OUTPUT = io.stdout


function writeto (name)
  if name == nil then
local f, err, cod = io.close(_OUTPUT)
_OUTPUT = io.stdout
return f, err, cod
  else
local f, err, cod = io.open(name, "w")
_OUTPUT = f or _OUTPUT
return f, err, cod
  end
end

function writetop (name)
  if name == nil then
local f, err, cod = io.close(_OUTPUT)
_OUTPUT = io.stdout
return f, err, cod
  else
local f, err, cod = io.popen(name, "w")
_OUTPUT = f or _OUTPUT
return f, err, cod
  end
end

function write (...)
  local f = _OUTPUT
  if type(arg[1]) == 'userdata' then
f = table.remove(arg, 1)
  end
  return f:write(unpack(arg))
end

function cattop (output)
local doc = current_document_formatted (79)
if doc then writetop (output) write (doc) writeto () end
end

-- Email the current document, using Mutt (http://www.mutt.org).
-- This only works when called from lua_console_hook, below.
function mutt ()
local tmp = tmpname ()
writeto (tmp) write (current_document ()) writeto ()
table.insert (tmp_files, tmp)
return "run", "mutt -a "..tmp
end

-- Table of expressions which are recognised by our lua_console_hook.
console_hook_functions = {
reload  = "reload ()",
mutt= mutt,
}

function lua_console_hook (expr)
local x = console_hook_functions[expr]
if type (x) == "function" then
return x ()
else
return "eval", x or expr
end
end


-- Send the current document to `lpr'.
-- lp has 79 rows so elinks dumps 79 if possible!
function lp ()
local doc = current_document_formatted (160)
if doc then writetop ("lp -s -o cpi=20 -o lpi=10 -o page-left=9") write 
(doc) writeto () end
--cattop ("lp -o cpi=20 -o lpi=10 -o page-left=9")
end

-- Send the current document to `enscript'.
function enscript ()
cattop ("enscript -q -fCourier8")
end


-- Bind Alt-p to print.
bind_key ("main", "p", lp)
bind_key ("main", "Alt-p", enscript)


___
elinks-users mailing list
elinks-users@linuxfromscratch.org
http://linuxfromscratch.org/mailman/listinfo/elinks-users