Date: Sun, 20 Feb 2011 08:44:10 -0800 From: Chip Camden <sterling@camdensoftware.com> To: FreeBSD Mailing List <freebsd-questions@FreeBSD.ORG> Subject: Re: variable line-display pager? Message-ID: <20110220164410.GB66537@libertas.local.camdensoftware.com> In-Reply-To: <20110220084235.GA30569@thought.org> 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>
next in thread | previous in thread | raw e-mail | index | archive | help
--TakKZr9L6Hm6aLOc Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Quoth Gary Kline on Sunday, 20 February 2011: <snip> >=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 <cr> 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--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20110220164410.GB66537>