• @cvp, no, because I needed the ability to access the photo albums, so I rolled my own, here: https://github.com/mikaelho/onedriver/

  • @mikael said:

    inline date/time picker style, but could not get it to be anything except the good old big rollers.

    Sorry, I didn't understand. You did not succeed to get it?

    Édit: Perhpas, does Pythonista need to be upgraded?

  • @JonB It is different because split screen allows your Pythonista to run UI and we also are sure there is no limit of usage nor duration.
    I should still test this "simili-background" mode which is more like a music application or like download in safari or copy in Files app, all of them can use cpu without being visible on the idevice.

  • @mikael I started from the Pythonista doc about scene shader and then I used Google to find help about GLSL language and examples.

    And my little GLSL program has only 4 lines, that's not too much 🤕

  • @cvp @mikael possibly documented because Developer may not of done extensive testing with larger numbers of lines? or even testing difernt text wraping? just to cover the posibility of bugs between releases..?

  • I had discovered that if you search in your scripts a text containing long Unicode characters, the range of the selected text was erroneously computed. @jonB did find a corrected way to extract the selected text and thus, his customMenuItem.py module should be corrected. You will find my own version here new customMenuItem.py

  • @cvp. Helpful! Thank you.

  • @Olaf Thanks a lot, I didn't know this \1

  • Merci beaucoup !

  • @mikael i know its been a few but the subject was left open with the a workaround that didnt really fiit the needs of @Samer at this post. would safeAreaLayoutGuide() and Anchors being used here fix the the problem with safe area we had?

  • More visible without title and a transparent background...

  • @tomkirn yes, how did you find that? I too was going by the docs, happening across this tonight “fullscreen” fixes it. Thanks.

  • @mikael Ok, Thanks for the check. It is not so important as I can check each 0.1 second if the content_size width has changed. On my iPad mini 4, it takes 0.1 second for a chapter of 5 pages but 2 seconds for a chapter of 30 pages..
    This automatic multi-columns functionality is really nice to have book-like pages

    I think iBooks app performs something like that because if you change the font size, it takes some time before to show the total number of pages...

  • @mikael said:

    this being an 13.1 bug on iPad.

    Still there in 13.1.3

  • We can do the transform inside the def via ObjectiveC

    from objc_util import * import ui def GetUIImageOfPDFPage(path,pageid=1): UIGraphicsGetCurrentContext = c.UIGraphicsGetCurrentContext UIGraphicsGetCurrentContext.restype = c_void_p UIGraphicsGetCurrentContext.argtypes = [] CGPDFDocumentCreateWithURL = c.CGPDFDocumentCreateWithURL CGPDFDocumentCreateWithURL.restype = c_void_p CGPDFDocumentCreateWithURL.argtypes = [c_void_p] CGPDFDocumentGetNumberOfPages = c.CGPDFDocumentGetNumberOfPages CGPDFDocumentGetNumberOfPages.restype = c_void_p CGPDFDocumentGetNumberOfPages.argtypes = [c_void_p] CGPDFDocumentGetPage = c.CGPDFDocumentGetPage CGPDFDocumentGetPage.restype = c_void_p CGPDFDocumentGetPage.argtypes = [c_void_p, c_void_p] CGPDFPageGetBoxRect= c.CGPDFPageGetBoxRect CGPDFPageGetBoxRect.restype = CGRect CGPDFPageGetBoxRect.argtypes = [c_void_p,c_void_p] CGContextDrawPDFPage = c.CGContextDrawPDFPage CGContextDrawPDFPage.restype = None CGContextDrawPDFPage.argtypes = [c_void_p,c_void_p] CGContextScaleCTM = c.CGContextScaleCTM CGContextScaleCTM.restype = None CGContextScaleCTM.argtypes = [c_void_p, CGFloat, CGFloat] CGContextTranslateCTM = c.CGContextTranslateCTM CGContextTranslateCTM.restype = None CGContextTranslateCTM.argtypes = [c_void_p, CGFloat, CGFloat] ns_url = nsurl(path) document = CGPDFDocumentCreateWithURL(ObjCInstance(ns_url)) #np = CGPDFDocumentGetNumberOfPages(document) #print('CGPDFDocumentGetNumberOfPages=',np) # to check if document is ok page = CGPDFDocumentGetPage(document,pageid) kCGPDFMediaBox = 0 page_mediabox = CGPDFPageGetBoxRect(page,kCGPDFMediaBox) w = page_mediabox.size.width h = page_mediabox.size.height #print('mediabox=',w,h) # to check if mediabox is ok with ui.ImageContext(w,h) as context: cn = UIGraphicsGetCurrentContext() CGContextTranslateCTM(cn,0.0,h) CGContextScaleCTM(cn, 1.0, -1.0) CGContextDrawPDFPage(cn,page) return ui_image # Protect against import if __name__ == '__main__': full_path = '/private/var/mobile/Library/Mobile Documents/iCloud~com~omz-software~Pythonista3/Documents/Mes Livres/Les Blondes - La compil des vacances.pdf' ui_image = GetUIImageOfPDFPage(full_path,pageid=40) v = ui.ImageView() v.image = ui_image #v.transform = ui.Transform.scale(1,-1) # CGContext is up/down inverted v.present(hide_title_bar=True)
  • One more time, thanks to @dgelessus for his quick and useful help

    See here

Internal error.

Oops! Looks like something went wrong!