> Date: Mon, 24 Dec 2001 00:38:47 -0500
> From: Maciej Kalisiak <[EMAIL PROTECTED]>
> To: [EMAIL PROTECTED]
> Subject: pyurlview.py: a more flexible 'urlview'
>
> Hello mutters,
>
> After finding "urlview" a bit limiting I have written a somewhat more flexible
> version of it. I figured I'd share it with the community in case others are
> in a similar "needs-more-power" bind. Main improvements:
> - user-defined key bindings for everything (with Vi-style defaults)
> - any number of user-defined commands to run on URLs (e.g.: different
> keys for netscape, lynx, galeon, wget, xclip, whatever)
> - ability to show context of a given URL in menu
>
> You can get it at http://www.dgp.toronto.edu/~mac/projects/pyurlview.py
>
> This is a Python script (too lazy to do it in C and don't have the time), so
> you'll need Python. Tested under Python 2.1, not sure about earlier versions.
> Also uses the curses library for screen output.
>
> If passed a filename, this script scans the file for URLs, else it looks at
> stdin. Once running, press 'h' or '?' for a brief help on (default) keys.
>
> Comments, suggestions welcome.
Hi Maciej,
quite nice, with a few nits:
curses.wrapper () initializes color support, and I haven't found a
way to make it set the background transparent. besides, the colors
are quite unpleasant.
Traceback (most recent call last):
File "/home/roman/bin/pyurlview.py", line 346, in ?
main()
File "/home/roman/bin/pyurlview.py", line 339, in main
curses.wrapper(frob_urls)
File "/usr/local/lib/python2.1/curses/wrapper.py", line 44, in wrapper
res = apply(func, (stdscr,) + rest)
File "/home/roman/bin/pyurlview.py", line 219, in frob_urls
stdscr.move(h-1, 0)
_curses.error: wmove() returned ERR
Looks like this happens when the new size of the window is more than
2x the original, or less than 1/2 of the original. I'm talking about
resizing the window, of course.
and last, what's with that GPL everybody seems to be hypnotized?
--
FreeBSD 4.4-STABLE
8:04PM up 9 days, 6:42, 18 users, load averages: 0.13, 0.07, 0.03