Active Topics

 


Reply
Thread Tools
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#1
an app to display text as large as possible, with all the text fitting.


1) install deb
2) edit MyDocs/qtbigtext.txt {perhaps with redak}
3) run qtbigtext app launcher

it will show whats in the file in the largest possible font {that it all fits in}

OR run it in a terminal and see stdin or commandline args in the largest font possible.

{the deb is n9-specific, but the script will work anywhere you have pyside, like n900, laptop, etc.}

QTBigText Download

config file is at ~/.config/qtbigtext.conf

https://github.com/teleshoes/qtbigtext

the use cases i have in mind are:
1) talking to my deaf grandmother while she holds the phone and i type on my laptop over ssh
2) showing the bus driver my confirmation code

bundles inconsolata {a very pretty monospace typeface that is not mine or affiliated with me at all} and defaults to it.

to use in a terminal:
python /opt/qtbigtext/qtbigtext.py the text you wanna display
or
cat file | python /opt/bigtext/qtbigtext.py
or
python /opt/bigtext/qtbigtext.py
{shows ~/MyDocs/qtbigtext.txt}

python /opt/qtbigtext/qtbigtext.py there


python /opt/qtbigtext/qtbigtext.py The quick brown fox jumped over the lazy dog.

v0.4
+add command line args to override config settings
+add command line arg to bigtext to read from STDIN
+add optional visual separator for manual line breaks
+fix font calculation to be consistent to tenths of a point
+fix bug where rapid invokations of bigtext failed to start it
+re-try the previous font point size when setting text with dbus

v0.3.3
+fix leftover artifacts between runs

v0.3.2
+/usr/bin/bigtext script, python3 and python2 compatibilty

v0.2
+flopjoke's icon, new config options: wordWrap and textFile

v0.1
+config file for bg/fg color, typeface, min/max font point, and forcing height/width of text print space

v0.0.5
+green on black
{v0.0.5.1 is white on black, because the proper way to customize colors is to totally have another application version for them}

v0.0.4
+fail with a nice error if input is too big
+fixed bug where some text would be cut off

v0.0.3
+desktop launcher is included and shows MyDocs/qtbigtext.txt
+Inconsolata is bundled now

v0.0.2
+wordwrap

v0.0.1
+font calculations and basic display

to donate if you like it: paypal to elliot.wolk@gmail.com
__________________
~ teleshoes ~

Last edited by wolke; 2014-06-01 at 09:32. Reason: version bump
 

The Following 10 Users Say Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#2
this guy knows what im talking about, but i hate his soln

http://www.qtforum.org/article/32092...xt-length.html
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#3
im going to bundle inconsolata with this, and use that since it has a predictable height and width
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#4
mostly done, heres the code.
i need to add wordwrap, which is quite tricky.

it has a max font point size of 600 and a min of 4, and it binary searches for an optimal font, so it works with any monospace font.

edit: heres the url of the latest script, instead of an outdated code block
https://raw.github.com/teleshoes/qtb...c/qtbigtext.py
__________________
~ teleshoes ~

Last edited by wolke; 2012-09-13 at 05:49.
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#5
named the project qtbigtext, posted a deb for it, posted an inconsolata deb, and added some screenshots to the OP.

doesnt have wordwrap yet.
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#6
0.0.2 wordwrap
__________________
~ teleshoes ~
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#7
TODO:
1) {DONE} add a non-terminal way to use it. i could add an interactive gui, but there are already decent text editors out there, i personally dont give a **** about a gui, and i have no idea if anyone will find this app as useful as ive found it so far.

SO, ill check for a file in MyDocs called 'qtbigtext.txt', and use that if it exists {and no commandline args are present and stdin is not a pipe}.

if anyone DOES want an app like this, lemme know if you would find it sufficient to edit the file in, say, redak, and click the text viewer icon.

2) {DONE} bundle inconsolata with it. SIL's open font license vaguely hints at this being perfectly fine, but i need to look at it closely. {anyone can help me with that?}

3) add a config file for forcing the screen geometry, setting the typeface, and changing the bg/fg color.
__________________
~ teleshoes ~

Last edited by wolke; 2012-09-14 at 08:03.
 

The Following User Says Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#8
ok, im done. this app works perfectly well for me. no config, maybe someday.
__________________
~ teleshoes ~
 

The Following 3 Users Say Thank You to wolke For This Useful Post:
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#9
BUG: if the input is sufficiently large that it wont fit on the screen even at the minimum font point size, it crashes.
__________________
~ teleshoes ~
 
Posts: 986 | Thanked: 1,526 times | Joined on Jul 2010
#10
BUG: text will get cut off for some inputs
__________________
~ teleshoes ~
 
Reply


 
Forum Jump


All times are GMT. The time now is 06:48.