split out feature for next release, prepare word wrapping development
This commit is contained in:
parent
8aa22fcafd
commit
ae0741265d
@ -5,58 +5,12 @@ Known Bugs:
|
|||||||
- for some users fenrir eats the orca key
|
- for some users fenrir eats the orca key
|
||||||
- in special cases next word skipps a word, "word<12 spaces>word2<12 spaces>word3 (storm_dragon)
|
- in special cases next word skipps a word, "word<12 spaces>word2<12 spaces>word3 (storm_dragon)
|
||||||
- Fenrir key sometimes wents crazy? (maybe this is if fenrir key is released before other keys)
|
- Fenrir key sometimes wents crazy? (maybe this is if fenrir key is released before other keys)
|
||||||
- For example, in screen, it just tells me bell in window, but doesn't tell me which one. (southernprince)
|
|
||||||
- spellcheck triggers twice if there are two spaces after an word and you arrow over them
|
- spellcheck triggers twice if there are two spaces after an word and you arrow over them
|
||||||
|
|
||||||
|
Glitches
|
||||||
|
- For example, in screen, it just tells me bell in window, but doesn't tell me which one. (southernprince)
|
||||||
- alpine seems to have problems (just small glitches) (southernprince)
|
- alpine seems to have problems (just small glitches) (southernprince)
|
||||||
- fenrir is not able to detect the current application inside of screen.
|
|
||||||
ps -e -H -o pid,pgrp,ppid,tty,cmd
|
|
||||||
http://stackoverflow.com/questions/24861351/how-to-detect-if-python-script-is-being-run-as-a-background-process/24862213
|
|
||||||
fd = os.open("/dev/tty5", os.O_RDONLY )
|
|
||||||
os.tcgetpgrp(fd)
|
|
||||||
|
|
||||||
|
|
||||||
- implement onScreenUpdate commands
|
|
||||||
read highlighted text mode
|
|
||||||
|
|
||||||
- implement commands
|
|
||||||
attributes_curr_char
|
|
||||||
generic list command (convert clipboard management)
|
|
||||||
next item
|
|
||||||
pref item
|
|
||||||
curr item
|
|
||||||
first item
|
|
||||||
last item
|
|
||||||
|
|
||||||
- implement braille
|
|
||||||
output to braille device
|
|
||||||
virtual buffer area for scroll left/right if the line is to long for device
|
|
||||||
commands for scroll left/right
|
|
||||||
print cursor in review
|
|
||||||
print cursor in textmode
|
|
||||||
flush message after X seconds and show current line (review over text)
|
|
||||||
make flush configurable
|
|
||||||
leve review mode on typing (show current textline)
|
|
||||||
capture input from braile
|
|
||||||
make routing keys assignable in keyboard
|
|
||||||
tweak current commands and output
|
|
||||||
http://mielke.cc/brltty/doc/Manual-BrlAPI/English/BrlAPI.html
|
|
||||||
https://git.gnome.org/browse/orca/tree/src/orca/braille.py
|
|
||||||
https://wiki.gnome.org/Attic/LSR/ScratchPad/Braille/BrlAPI
|
|
||||||
|
|
||||||
- implement autodetection of plugged and removed input devices (python-pyudev)
|
|
||||||
http://askubuntu.com/questions/508236/how-can-i-run-code-whenever-a-usb-device-is-unplugged-without-requiring-root
|
|
||||||
|
|
||||||
- add perApplicationTrigger trigger
|
|
||||||
per application commands
|
|
||||||
per application onScreenChange
|
|
||||||
per application onInput
|
|
||||||
- per application shortcuts
|
|
||||||
- configuration should be overwriteable with parameter and alternative paths
|
|
||||||
- write settings
|
|
||||||
- menue for settings configuration #storm
|
|
||||||
- translateable
|
|
||||||
|
|
||||||
- implement speechdriver generic
|
|
||||||
-------------DONE--------------------------------
|
-------------DONE--------------------------------
|
||||||
- move from VCS to VCSA and parese the Attributes
|
- move from VCS to VCSA and parese the Attributes
|
||||||
http://linux.die.net/man/4/vcsa
|
http://linux.die.net/man/4/vcsa
|
56
TODOv2
Normal file
56
TODOv2
Normal file
@ -0,0 +1,56 @@
|
|||||||
|
ToDo list for Fenrir Version 2.0
|
||||||
|
|
||||||
|
General:
|
||||||
|
- implement onScreenUpdate commands
|
||||||
|
read highlighted text mode
|
||||||
|
- translateable
|
||||||
|
|
||||||
|
- implement commands
|
||||||
|
attributes_curr_char
|
||||||
|
generic list command (convert clipboard management)
|
||||||
|
next item
|
||||||
|
pref item
|
||||||
|
curr item
|
||||||
|
first item
|
||||||
|
last item
|
||||||
|
|
||||||
|
Braille Support:
|
||||||
|
output to braille device
|
||||||
|
virtual buffer area for scroll left/right if the line is to long for device
|
||||||
|
commands for scroll left/right
|
||||||
|
print cursor in review
|
||||||
|
print cursor in textmode
|
||||||
|
flush message after X seconds and show current line (review over text)
|
||||||
|
make flush configurable
|
||||||
|
leve review mode on typing (show current textline)
|
||||||
|
capture input from braile
|
||||||
|
make routing keys assignable in keyboard
|
||||||
|
tweak current commands and output
|
||||||
|
http://mielke.cc/brltty/doc/Manual-BrlAPI/English/BrlAPI.html
|
||||||
|
https://git.gnome.org/browse/orca/tree/src/orca/braille.py
|
||||||
|
https://wiki.gnome.org/Attic/LSR/ScratchPad/Braille/BrlAPI
|
||||||
|
|
||||||
|
Driver:
|
||||||
|
- implement PTY driver
|
||||||
|
- BrlTTY driver
|
||||||
|
https://docs.python.org/3.2/library/pty.html
|
||||||
|
- implement speechdriver generic
|
||||||
|
- implement autodetection of plugged and removed input devices (python-pyudev) for evdev driver
|
||||||
|
http://askubuntu.com/questions/508236/how-can-i-run-code-whenever-a-usb-device-is-unplugged-without-requiring-root
|
||||||
|
|
||||||
|
Settings:
|
||||||
|
- configuration should be overwriteable with parameter and alternative paths
|
||||||
|
- write settings
|
||||||
|
- menue for settings configuration #storm
|
||||||
|
|
||||||
|
Application Profiles
|
||||||
|
- fenrir is not able to detect the current application inside of screen.
|
||||||
|
ps -e -H -o pid,pgrp,ppid,tty,cmd
|
||||||
|
http://stackoverflow.com/questions/24861351/how-to-detect-if-python-script-is-being-run-as-a-background-process/24862213
|
||||||
|
fd = os.open("/dev/tty5", os.O_RDONLY )
|
||||||
|
os.tcgetpgrp(fd)
|
||||||
|
- add perApplicationTrigger trigger
|
||||||
|
per application commands
|
||||||
|
per application onScreenChange
|
||||||
|
per application onInput
|
||||||
|
- per application shortcuts
|
56
play zone/wrapWord.py
Executable file
56
play zone/wrapWord.py
Executable file
@ -0,0 +1,56 @@
|
|||||||
|
#!/bin/python
|
||||||
|
# -*- coding: utf-8 -*-
|
||||||
|
|
||||||
|
# Fenrir TTY screen reader
|
||||||
|
# By Chrys, Storm Dragon, and contributers.
|
||||||
|
|
||||||
|
from core import debug
|
||||||
|
# X Y Word END BREAK
|
||||||
|
# -1, -1, '', True False
|
||||||
|
def getPrevWord(currX,currY, currText):
|
||||||
|
lineBreak = False
|
||||||
|
endOfScreen = False
|
||||||
|
if currText == '':
|
||||||
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
|
x, y, currWord, endOfScreen, lineBreak = getCurrentWord(currX,currY,currText)
|
||||||
|
if endOfScreen:
|
||||||
|
return x, y, currWord, endOfScreen, lineBreak
|
||||||
|
wrappedLines = currText.split('\n')
|
||||||
|
currLine = wrappedLines[y].replace("\t"," ")
|
||||||
|
return x, y, currWord, endOfScreen, lineBreak
|
||||||
|
|
||||||
|
def getCurrentWord(currX,currY, currText):
|
||||||
|
lineBreak = False
|
||||||
|
endOfScreen = False
|
||||||
|
if currText == '':
|
||||||
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
|
x = currX
|
||||||
|
y = currY
|
||||||
|
currWord = ''
|
||||||
|
wrappedLines = currText.split('\n')
|
||||||
|
currLine = wrappedLines[y].replace("\t"," ")
|
||||||
|
return x, y, currWord, endOfScreen, lineBreak
|
||||||
|
|
||||||
|
def getNextWord(currX,currY, currText):
|
||||||
|
lineBreak = False
|
||||||
|
endOfScreen = False
|
||||||
|
if currText == '':
|
||||||
|
return -1, -1, '', endOfScreen, lineBreak
|
||||||
|
x, y, currWord, endOfScreen, lineBreak = getCurrentWord(currX,currY,currText)
|
||||||
|
if endOfScreen:
|
||||||
|
return x, y, currWord, endOfScreen, lineBreak
|
||||||
|
wrappedLines = currText.split('\n')
|
||||||
|
currLine = wrappedLines[y].replace("\t"," ")
|
||||||
|
return x, y, currWord, endOfScreen, lineBreak
|
||||||
|
|
||||||
|
|
||||||
|
data = [
|
||||||
|
'das ist ein test lol\n',
|
||||||
|
' das ist ein test l \n',
|
||||||
|
' das ist ein test\n',
|
||||||
|
' \n',
|
||||||
|
' asdf asdf a\n',
|
||||||
|
'test test\n',
|
||||||
|
' te test\n'
|
||||||
|
]
|
||||||
|
|
Loading…
Reference in New Issue
Block a user