omz:forum

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

    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 0
    • Followers 0
    • Topics 6
    • Posts 11
    • Best 0
    • Controversial 0
    • Groups 0

    lrr

    @lrr

    0
    Reputation
    879
    Profile views
    11
    Posts
    0
    Followers
    0
    Following
    Joined Last Online

    lrr Unfollow Follow

    Latest posts made by lrr

    • RE: How to override site-packages?

      Wouldn't killing the app accomplish the reloading?

      I renamed the package and changed all the internal imports to html3text, and have a working script now.

      It's Pythonista 2. I bought 3 but haven't gotten around to switching.

      The problem is that the built-in html2text can't deal with missing CSS definitions, which affects pretty much every page on the web, unless you implement your own handling of <link rel="stylesheet">.

      posted in Pythonista
      lrr
      lrr
    • RE: How to override site-packages?

      sys.path already includes the document folder as the first entry, but Python prioritizes modules over packages.

      I can't rename it because it consists of several modules that import each other.

      It's not my package but the current (less broken) version of the same repository as is included with Pythonista.

      posted in Pythonista
      lrr
      lrr
    • How to override site-packages?

      Among my regular Pythonista scripts I have an html2text folder with an __init__.py, but import html2text never uses it because PythonistaKit.framework/pylib/site-packages/html2text.py exists. How do I override it? sys.path seems correct. Killing the app didn't help. (Is there a nicer way to restart the interpreter?)

      posted in Pythonista
      lrr
      lrr
    • Switch editing modes manually

      Editorial has Markdown and Plain Text modes. How do I switch them without changing a file's extension?

      Specifically I sometimes want .txt displayed in monospace, sometimes proportional.

      posted in Editorial
      lrr
      lrr
    • Larger rows

      I'm building a Twitter client (because I need to copy multiple tweets to the clipboard). How do I fit more than two lines of text into a TableView?

      I tried cell.text_label.number_of_lines and cell.height to no avail.

      How do I get a different "style" so TableViewCell.detail_text_label isn't None?

      posted in Pythonista
      lrr
      lrr
    • Change indent on multiple lines

      I'm used to selecting multiple lines and hitting tab to indent them further, but this doesn't work in Pythonista.

      posted in Pythonista
      lrr
      lrr
    • RE: Change indent on multiple lines

      I think your regex breaks for the last line in files without a trailing newline.

      Here is one that restores the selection, so it can be run several times in a row. Use like this.

      posted in Pythonista
      lrr
      lrr
    • Lighter than Editorial?

      I have a script that I launch via the URL scheme and that opens another app, so Pythonista just flashes briefly across the screen.

      This should work just as well in Editorial. Which uses less time/memory?

      posted in Pythonista
      lrr
      lrr
    • Disable quote matching

      When I type " Editorial actually inserts "|", which is the first thing I disable in every text editor. But how?

      posted in Editorial
      lrr
      lrr
    • RE: Auto-generate table of contents

      You can put [TOC] at the top of your document, and use a few lines of Python instead of Editorial's renderer. The included markdown module has a toc extension.

      Or you could write a script to put an anchor tag next to each of your headings, and prepend a Markdown list to your document. This is worse in every way, but allows you to edit the TOC independent of the headings.

      posted in Editorial
      lrr
      lrr