omz:forum

    • Register
    • Login
    • Search
    • Recent
    • Popular
    1. Home
    2. filippocld

    Welcome!

    This is the community forum for my apps Pythonista and Editorial.

    For individual support questions, you can also send an email. If you have a very short question or just want to say hello — I'm @olemoritz on Twitter.


    • Profile
    • Following 1
    • Followers 0
    • Topics 13
    • Posts 107
    • Best 15
    • Controversial 0
    • Groups 0

    filippocld

    @filippocld

    19
    Reputation
    2013
    Profile views
    107
    Posts
    0
    Followers
    1
    Following
    Joined Last Online

    filippocld Unfollow Follow

    Best posts made by filippocld

    • New Syntax Mode

      I don't know how it can be used for, but is theoretically possible to create a new syntax mode like the python and javascript ones (OMPythonSyntaxHighlighter and OMJavaScriptSyntaxHighlighter respectively) that highlights Swift Language (it can be whatever language, swift is just an example) ?

      Thanks in Advance,
      Filippo

      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.x Progress Update

      Also why does webbrowser open MobileSafari and not the inapp browser?

      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.x Progress Update

      You can't stop the script if an input() is running

      posted in Pythonista
      filippocld
      filippocld
    • Is my device jailbroken?

      Today i bring you a cool little script that can be useful to some of you. It basically tests if your device is jailbroken. Hope you enjoy :-)

      See Script

      posted in Pythonista
      filippocld
      filippocld
    • RE: [share code] SliderWithLabel class for ui.Slider() featuring editable label

      I modified in my script this line to set the label textcolor. I think it is easier to use this than sliderclass.label.text_color

      self.label.text_color = kwargs['text_color'] if 'text_color' in kwargs else 0.7
      
      posted in Pythonista
      filippocld
      filippocld
    • RE: Accessing obj-c help

      Just put this instead of print app

      print app.applicationIdentifier()
      
      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.x Progress Update

      @omz about the breakpoints: maybe doing a long press would add a breakpoint and a single press just edit?

      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.x Progress Update

      I'd like if you could add breakpoints by simply tapping on the line number ( like in Xcode)

      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.x Progress Update

      @Webmaster4o Honestly your solution does not make sense to me. If you really want to switch versions fast just put the

      #!/usr/bin/env python3
      

      line at line 1 of the script

      posted in Pythonista
      filippocld
      filippocld
    • Volume Based actions[Share Code]

      This is a script to run some actions when a volume button is pressed:
      The volume setting technique is taken from @omz script for setting the volume.

      It basically verifies if the volume changed(increased or decreased) and does two actions ( one for increased and one for decreased)

      Here is the Script

      posted in Pythonista
      filippocld
      filippocld

    Latest posts made by filippocld

    • RE: Crash for unknown reason; faultlog not populated on restart

      It also happened to me when the app or the script running try to access a restricted part of the memory or when there is not enough RAM

      Since your script does not crash on my ipad pro 2017 (4GBs of RAM) too, i believe it's the second option

      posted in Pythonista
      filippocld
      filippocld
    • RE: Support for Markdown opening via Files in iOS 11

      It is possible, @omz just has to set “.md” as a compatible file extension in the Editorial’s info.plist file

      Even better would be a QuickLook extension, which lets you preview the file directly in the Files app

      posted in Editorial
      filippocld
      filippocld
    • RE: Workflow question: Possible to save URL of all open preview/browser tabs?

      I believe you have to this from a Mac by reading all iCloud tabs, if i try and succeed i'll tell you :-)

      posted in Editorial
      filippocld
      filippocld
    • RE: Editorial Features

      @rtorot there's the objc_util module and with it you can do anything if you know objective c and ctypes

      posted in Editorial
      filippocld
      filippocld
    • RE: Editorial Features

      The big advantage of editorial is that you can extend all the app's functionality through the Python programming language. (And by all i mean you could theoretically make an app in editorial, if you know how to use Objective-C).
      But there are more user friendly modules such as the ui module which lets you create simple user interfaces.

      If you don't know how to use python there is still a block based workflow system which is pretty powerful. And you can still build UIs with that.

      Editorial also includes an handy web browser (i am not sure if 1Writer has it)

      Plus if i am not mistaken there's an update coming in the future :-)

      posted in Editorial
      filippocld
      filippocld
    • RE: Python 3.6 and objc_util syntax

      Yeah, it takes a bit more but it's usable. Let's hope for some speed in the future :-)

      posted in Pythonista
      filippocld
      filippocld
    • RE: Python 3.6 and objc_util syntax

      Maybe it can be used for most cases. I'd really like this syntax

      posted in Pythonista
      filippocld
      filippocld
    • RE: [share/in work] side bar replacement

      What does ObjCInstance(self).tag=hash('SideBar') do?

      posted in Pythonista
      filippocld
      filippocld
    • [iOS 10] User Notifications not Working

      When iOS 10 was released i did this script to show a notification. The problem is the two action buttons are not shown. Does anyone know what is the problem?

      from objc_util import *
      import random
      
      load_framework('UserNotifications')
      
      nc = ObjCClass('UNUserNotificationCenter').currentNotificationCenter()
      nc.requestAuthorizationWithOptions_completionHandler_(4L, None)
      
      err = None
      d = NSDictionary.dictionary() #empty dict
      
      # imgurl = nsurl('file:///private/var/mobile/Containers/Shared/AppGroup/09FE1A2B-E1E5-4112-B78F-665929FD7600/Pythonista3/Documents/Objective-C/swift.png') #gets deleted somehow...
      imgurl = nsurl('file:///var/containers/Bundle/Application/586AFA89-329A-4E66-9221-2D9EA78A4F46/Pythonista3.app/AppIcon60x60@3x.png')  # Must be a local file
      
      action = ObjCClass("UNNotificationAction").alloc()._initWithIdentifier_title_options_('firstButton', 'First', d)
      action.isAuthenticationRequired = True
      #action.isDestructive = True  # Red Text
      
      textaction=ObjCClass("UNTextInputNotificationAction").alloc()._initWithIdentifier_title_options_textInputButtonTitle_textInputPlaceholder_('textInput','Title',d,'InputButtonTitle','Placeholder')
      
      category = ObjCClass("UNNotificationCategory").alloc()._initWithIdentifier_actions_minimalActions_intentIdentifiers_options_('pythonista', [action,textaction], [action,textaction], d, d)
      
      nc.setNotificationCategories_([category])
      
      attachment1 = ObjCClass("UNNotificationAttachment").attachmentWithIdentifier_URL_options_error_('pythonistaimg', imgurl, d, err)
      
      content = ObjCClass("UNMutableNotificationContent").new()
      content.setCategoryIdentifier_('pythonista')
      content.title = 'Hello, iOS 10'
      content.subtitle = 'Introduction to Notifications'
      content.shouldAddToNotificationsList = True
      content.badge = random.randint(1, 100)
      content.body = "Let's talk about notifications!"
      content.shouldAlwaysAlertWhileAppIsForeground = True
      #content.attachments = [attachment1] #Commemted for debug purposes
      
      trigger = ObjCClass("UNTimeIntervalNotificationTrigger").alloc()._initWithTimeInterval_repeats_(1, False)
      request = ObjCClass("UNNotificationRequest").alloc()._initWithIdentifier_content_trigger_('pythonistaNotification', content, trigger)
      
      nc.addNotificationRequest_(request)
      

      The Notification is shown but has no buttons.
      I've seen people say "you have to specify a delegate" but i've seen others that don't use it. So I dunno

      Thanks in advance,
      Filippo

      posted in Pythonista
      filippocld
      filippocld
    • RE: Can I use Pythonista as iBackupBot to edit system files like 'com.apple.springboard.plist'?

      I am not 100% sure but since iOS is sandboxed I don't think it can be done

      posted in Pythonista
      filippocld
      filippocld