I read this article today. Just wanted see if it would work in Pythonista. Ie. reading a ui.WebView back to you. It does work. For example, if you are on iOS11x and run the script below and do a 2 finger pull from the top of the screen the iOS speech controller shows up.
When just trying it, say in Safari, it becomes clear about its limitations or frustrations. Your choice in IOS settings is about reading the whole screen or the hilited text. My example I used here is not too bad for full screen reading. The Pythonista 3 Website. But if you go to say a news website, it wants to read all the crap when in read all screen mode. Also to just read the hilited text is not so great on an ios device as its very difficult to hilite blocks you are interested in(maybe there are some tricks for this I dont know about).
Anyway, I was thinking a smart one out there could maybe use BeautifulSoup etc... to look at what is important about the page (using tags etc, or other magic) and hilite the appropriate blocks. Basically, having what is read to you is only the article, not ads, picture captions etc...
Anyway, this is not important. I just could imagine this would appeal to some of the programmers out there.
import ui
_url = 'http://omz-software.com/pythonista/'
class MyClass(ui.View):
def __init__(self, *args, **kwargs):
super().__init__(*args, **kwargs)
self.make_view()
def make_view(self):
wv = ui.WebView(frame=self.bounds)
wv.load_url(_url)
self.add_subview(wv)
if __name__ == '__main__':
f = (0, 0, *ui.get_screen_size())
v = MyClass(frame=f)
v.present(style='panel', animated=False)
