0

When I printed a page, as per the manual:

Printing, Mailing, and Saving rendered files to disk.

Rendered HTML documents, and plain text files, may be printed using the 'p' command while viewing the document. After pressing the 'p' key a menu of Print Options will be displayed.

It displayed quite differently when viewed again, from how lynx rendered it when browsing. The page is served from an IP phone, a Cisco/Linksys SPA 942 hard phone, which displays its settings through a web interface.

I just want to grab/crawl/scrape the settings page in the easiest way possible from lynx. I'm after, in particular, the settings for one of the extensions, so I have to click a few links to get to the right setting.

I tried the "print" option, but the formatting was very wrong. It's a simple web page, just forms. The print option jumbled everything together.

I could do a screen print from Firefox, but thought lynx might have some special capability here? Or, perhaps, just save page in Firefox, or some variant...

The page is quite long, so copying one "page" at a time from the terminal is clumsy. All in all, between the different settings, there are probably twenty pages, each twenty lynx "pages" long in the terminal.

Some version of dump with crawl to output them to file?

Printing to the "printer attached to the vt100 terminal" actually did quite well. As literally as possible "printed" to the terminal with just a small hiccup that it had trouble going past some empty fields -- but "page down" seemed (?) to work. Unfortunately, not able to print the actual page I'm after, can't seem to "click" a specific link...

  • 1
    This works on my SPA3102. In Firefox: File > Save Page As... and then Save As Type: Web page, HTML only. The single page contains all the settings, so ensure you're logged in with Advanced Settings on the Voice tab. – roaima Jan 4 '17 at 13:43
0

The lynx.cfg file (rendered as HTML here) goes into some detail about what you can do with a "PRINTER":

PRINTER, DOWNLOADER & UPLOADER DEFINITIONS: Lynx has 4 pre-defined print options & 1 pre-defined download option, which are called up on-screen when 'p' or 'd' are entered; any number of options can be added by the user, as explained below. Uploaders can be defined only for UNIX with DIRED_SUPPORT: see the Makefile in the top directory & the header of src/LYUpload.c .

For 'p' pre-defined options are: 'Save to local file', 'E-mail the file', 'Print to screen' and 'Print to local printer attached to vt100'. 'Print to screen' allows file transfers in the absence of alternatives and is often the only option allowed here for anonymous users; the 3rd & 4th options are not pre-defined for DOS/WINDOWS versions of Lynx. For 'd' the pre-defined option is: 'Download to local file'.

The 'p' and 'd' keys tell Lynx to print (or save) the formatted page as you might see it on the screen, or download the source. The command-line options -dump and -source do much the same thing.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.