From owner-freebsd-questions@FreeBSD.ORG Sun Feb 20 16:44:15 2011 Return-Path: Delivered-To: freebsd-questions@FreeBSD.ORG Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 27818106564A for ; Sun, 20 Feb 2011 16:44:15 +0000 (UTC) (envelope-from sterling@camdensoftware.com) Received: from wh2.interactivevillages.com (wh2.interactivevillages.com [75.125.250.34]) by mx1.freebsd.org (Postfix) with ESMTP id E01178FC14 for ; Sun, 20 Feb 2011 16:44:14 +0000 (UTC) Received: from c-24-22-230-24.hsd1.wa.comcast.net ([24.22.230.24] helo=_HOSTNAME_) by wh2.interactivevillages.com with esmtpsa (TLSv1:AES256-SHA:256) (Exim 4.69) (envelope-from ) id 1PrCOI-0007KN-5Y for freebsd-questions@FreeBSD.ORG; Sun, 20 Feb 2011 08:44:11 -0800 Received: by _HOSTNAME_ (sSMTP sendmail emulation); Sun, 20 Feb 2011 08:44:10 -0800 Date: Sun, 20 Feb 2011 08:44:10 -0800 From: Chip Camden To: FreeBSD Mailing List Message-ID: <20110220164410.GB66537@libertas.local.camdensoftware.com> Mail-Followup-To: FreeBSD Mailing List References: <20110219233736.GA20393@thought.org> <20110219235240.GA2495@libertas.local.camdensoftware.com> <20110220002300.GA21231@thought.org> <20110220004200.GC2495@libertas.local.camdensoftware.com> <20110220004432.GD2495@libertas.local.camdensoftware.com> <20110220084235.GA30569@thought.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="TakKZr9L6Hm6aLOc" Content-Disposition: inline In-Reply-To: <20110220084235.GA30569@thought.org> User-Agent: Mutt/1.4.2.3i Company: Camden Software Consulting URL: http://camdensoftware.com X-PGP-Key: http://pgp.mit.edu:11371/pks/lookup?search=0xD6DBAF91 X-AntiAbuse: This header was added to track abuse, please include it with any abuse report X-AntiAbuse: Primary Hostname - wh2.interactivevillages.com X-AntiAbuse: Original Domain - freebsd.org X-AntiAbuse: Originator/Caller UID/GID - [47 12] / [47 12] X-AntiAbuse: Sender Address Domain - camdensoftware.com Cc: Subject: Re: variable line-display pager? X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 20 Feb 2011 16:44:15 -0000 --TakKZr9L6Hm6aLOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Gary Kline on Sunday, 20 February 2011: >=20 > Yes, this is much nicer that the more -15 that messes up the > text with it's [MORE...] white within black. But here you can't > just tap the spacebar; is there a way around that and > turning it into a space...? >=20 > Also, can you insert=20 >=20 > "^+++" >=20 > text >=20 > "^+++" >=20 > top And bottom? Pretty sure that the user would have the large > font to read aloug with that espeak read to hijm. Having the > top/bottom delimiters might make scanning the text easier. =20 >=20 > (It messed up with more. >=20 > Anyway, thanks foe something that actually works, :_) >=20 > gary >=20 >=20 >=20 >=20 > --=20 > Gary Kline kline@thought.org http://www.thought.org Public Service Un= ix > Journey Toward the Dawn, E-Book: http://www.thought.org > The 7.98a release of Jottings: http://jottings.thought.org >=20 Better? #!/usr/bin/env ruby require 'optparse' pagesize =3D 15 optparse =3D OptionParser.new do |opts| opts.banner =3D 'usage: npg [-n pagesize] file...' opts.on('-n', '--numlines pagesize', 'Specify page size in number of line= s') do |n| pagesize =3D n.to_i end end begin optparse.parse! rescue OptionParser::InvalidOption, OptionParser::MissingArgument =3D> e puts e puts optparse exit 1 end puts "^+++" loop do pagesize.times do if line =3D gets puts line else puts "^+++" exit end end print "More..." system "stty raw" STDIN.getc system "stty -raw" end --=20 Sterling (Chip) Camden | sterling@camdensoftware.com | 2048D/3A978E4F http://chipsquips.com | http://camdensoftware.com | http://chipstips.com --TakKZr9L6Hm6aLOc Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.11 (FreeBSD) iQEcBAEBAgAGBQJNYUTaAAoJEIpckszW26+RvN0H/1AigKwSmETWehKg7Nn6UxhL bdAOqqXswc5lcQ9MZd6ZI1bfwLlfrUtPSFzgfccXRxOuktXc0dQNLzyRzwioSskQ Z5kfuOz84AEvA1AK6vxsdwVo+a10y6AfGO+91quOYwAHaN2NRjxik2qydTjG0OKk PfHAHHkUjDkx0nD3a0T5OiqnSogH8s1n7r6nDwLnXxxQpN/juQbvU4WT+JF0vYTS dpmrekFDNAkLmqQx8/NHlOt9rVzfp8hkTOmldcejQymFySK0JnVUPRJbhkhVwx5T E1b6Y7HbkI1L396yYzPBG6XG1f2E3OxQZNRiNCRHjCQ5MBqWUgmD8uAvKCjl4xU= =ltH0 -----END PGP SIGNATURE----- --TakKZr9L6Hm6aLOc--