maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   MeeGo / Harmattan (https://talk.maemo.org/forumdisplay.php?f=45)
-   -   [Announce] qtbigtext- large text viewer (https://talk.maemo.org/showthread.php?t=86793)

thedead1440 2012-10-02 07:13

Re: [Announce] qtbigtext- large text viewer
 
Quote:

Originally Posted by wolke (Post 1275162)
its waiting on stding for some reason. perhaps your input was not a terminal?

I only use it via SSH...Quiting and repeating after 1min made it work well...

It must just be a system bug or maybe due to "undue stress" caused by my frequent opening and closing it :p

wolke 2012-10-02 07:21

Re: [Announce] qtbigtext- large text viewer
 
:(
could be a real bug; there is no simple way of doing non-blocking i/o in python.
os.read() doesnt block for me, but it doesnt make guarantees.

do let me know if it comes up again, til then ill pretend it didnt happen.

wolke 2012-10-02 07:24

Re: [Announce] qtbigtext- large text viewer
 
i only use it on ssh as well, with another script i call bigtext.

which makes me think of a feature i want! using stdin properly, or communicating via dbus or something, and having it QUICKLY show new text instead of taking 2 whole seconds.

wolke 2012-10-02 07:25

Re: [Announce] qtbigtext- large text viewer
 
bigtext ~/somefile
bigtext hey
bigtext

Code:

#!/bin/bash
source /etc/profile
pkill -f .*qtbigtext.py.*
if [ "$1" == "-k" ]; then
  exit 0
fi
if [ "$#" -eq "1" ] && [ -e $1 ]; then
  exec cat "$1" | /opt/qtbigtext/qtbigtext.py 1>/dev/null 2>/dev/null &
else
  exec /opt/qtbigtext/qtbigtext.py "$@" 1>/dev/null 2>/dev/null &
fi


thedead1440 2012-10-02 07:33

Re: [Announce] qtbigtext- large text viewer
 
brilliant works much better ;)

My ssh window too is now not made to be unavailable thanks to this...

This way is much easier to use it too! Thanks!

thedead1440 2012-10-02 07:40

Re: [Announce] qtbigtext- large text viewer
 
wolke, I managed to force the bug to appear :p

Its really not an issue...If you want to see how i forced it see here


Edit: I don't think we can call it a bug but more like an user-inflicted issue?

wolke 2012-10-02 07:45

Re: [Announce] qtbigtext- large text viewer
 
no thats a bug

ladoga 2012-12-25 01:06

Re: [Announce] qtbigtext- large text viewer
 
1 Attachment(s)
Any ideas how to wake up the device when qtbigtext.py runs?

Here's a modified bigtext script with probably the most useless --help and no added functionality whatsoever :)
Code:

#!/bin/sh

pkill -f .*qtbigtext.py.*
if [ "$1" == "-k" ]; then
        exit 0
fi
if [ "$1" == "--help" ]; then
        echo -e "Usage: `basename $0` [TEXT OR FILE]"
        echo -e "Display text as large as possible, with all the text fitting."
        echo -e ""
        echo -e "Options:"
        echo -e "  -k                kill qtbigtext process and exit"
        echo -e "  --help        display this help and exit"
        echo -e ""
        echo -e "If no arguments are given, display text in ~/MyDocs/qtbigtext.txt"
        echo -e "Configuration file is at ~/.config/qtbigtext.conf"
        exit 0
fi
if [ "$#" -eq "1" ] && [ -e "$1" ]; then
        cat "$1" | /opt/qtbigtext/qtbigtext.py > /dev/null 2>&1 &
else
        /opt/qtbigtext/qtbigtext.py "$@" > /dev/null 2>&1 &
fi

Also using accented charachters doesn't work (utf-8)?

wolke 2013-08-20 03:15

Re: [Announce] qtbigtext- large text viewer
 
uploaded to openrepos:
https://openrepos.net/content/telesh...text-harmattan

wolke 2013-08-28 08:04

Re: [Announce] qtbigtext- large text viewer
 
version 0.3: teensy update

updated for python3 and python2 compatibility, added my bigtext script to /usr/bin


All times are GMT. The time now is 18:17.

vBulletin® Version 3.8.8