File: html.l

package info (click to toggle)
picolisp 25.12-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 7,388 kB
  • sloc: ansic: 3,092; javascript: 1,004; makefile: 107; sh: 2
file content (19 lines) | stat: -rw-r--r-- 567 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
# 29oct23 Software Lab. Alexander Burger

# View HTML buffers
(let? *Class (isa '+Buffer This)
   (dm view> (Win)
      (=: view T)
      (with Win
         (let
            (Y (- (: posY) 13)
               N (- (length (: buffer text)) 15) )
            (scratch (tmp "html")
               (in (list "w3m" "-cols" *Columns (: buffer file))
                  (rdLines) ) )
            (unless (: buffer view)
               (goto 1 (*/ Y (length (: buffer text)) N)) ) ) ) )
   (dm save> (Win)
      (super Win)
      (when (: view)
         (view> This Win) ) ) )