← Home Archive Habituate Also on Micro.blog
  • MicroPublisher or Micropublisher?

    I keep going back and forth on this: should the name of this app be MicroPublisher or Micropublisher?

    The Case for Uppercase

    I originally called the app capital-p MicroPublisher, because I’m a Pascal Case kind of person. As a Swift programmer, this is the variable name I would give for the app.

    Additionally, the word “Publish” is a bit easier to parse at a glance which could make it ever so slightly more recognizable in a list of apps or search results.

    The Case for Lowercase

    Yet I can’t escape the fact that the web standard is called Micropub, with a lowercase ‘p’. I always notice when people mess up the arbitrary capitalization of words like Xcode, iPhone, and macOS. Is naming the app MicroPublisher akin to naming an Xcode extension “xCoder”?

    I realize that I’m surely overthinking it. Which is why I’m going ahead with my preferred name: MicroPublisher. But let the record show that the name wasn’t chosen without consideration.

    → 9:13 AM, May 17
  • On Micropub publishing in IA Writer

    This week, IA Writer added native publishing to Micropub endpoints. This is quite relevant to my interests because I host my blog on Micro.blog, I use IA Writer to write my blog posts, and I’m currently working on an app to publish to Micropub endpoints from the iOS system share sheet. So I was excited to try it out this morning.

    In summary, despite some initial confusion authenticating and some nitpicks (discussed below), I like their implementation. I’m planning to steal some of their ideas for Micropublisher (which I’m making great progress on and will write more about soon).

    Trouble Authenticating

    This is the prompt IA Writer shows when you add a Micropub account:

    “URL… of what?”, I asked. One feature of Micro.blog is that your blog content has 2 URLs:

    • Your hosted blog username.micro.blog. On top of that, I have a custom domain name which, as far as I understand, is equivalent to this URL.
    • Your Micro.blog feed at micro.blog/username.

    I first tried typing in thecope.net: “Access denied”

    Next I tried https://micro.blog/cope: “IndieAuth Not Found”

    Maybe just micro.blog?: “Access denied”

    Next I created a manual authentication token for IA Writer so I could enter it manually, but I still needed to type in a URL, so the issue remained.

    Finally, I tried cope.micro.blog: It worked. I was sent to confirm the authorization on Micro.blog and came back to IA Writer with the account successfully configured.

    How I Would Solve This

    My trouble with the URL wasn’t a huge problem, but it was a bit of added friction to the experience. What I would change about IA Writer’s design is to provide separate account types for “Micro.blog” and “Micropub”. The two options would do exactly the same thing, but when the user selects “Micro.blog” the modal could be customized in 3 minor ways:

    1. Remove the helper text “Micropub servers that don’t support this feature will publish immediately” because Micro.blog does support drafts and it’s an unnecessary complication.
    2. Change the URL placeholder text to suggest the right URL format to use: username.micro.blog.
    3. Remove the option to “Enter Token Manually” which shouldn’t be necessary for Micro.blog.

    It would also be great to see Micro.blog as an equal companion to Ghost, Medium, and WordPress (Manton Reese and Daniel Jalkut discussed this topic on this week’s Core Intuition, and I think this is a reasonable solution to the issue that would be easy to implement for IA Writer).

    Inspiration for Micropublisher

    It was possible that using the Micropub integration in IA Writer would discourage me from finishing Micropublisher because the lack of this feature is what sparked the idea for the app in the first place. But I’m actually more motivated than ever about this project. I can take all my nitpicks of IA Writer’s implementation to improve the design of Micropublisher.

    Now back to work.

    → 7:52 AM, May 17
  • Introducing MicroPublisher

    Many bloggers who write on iOS use custom automation scripts and shortcuts to publish to their blogs. This can be a fun automation project for programmers, but not a viable or elegant solution for everyone else.

    After playing with the Micropub API on Monday, I began working on an app to post to a Micropub endpoint with a system share sheet action. If everything goes according to plan, then this post will be published from IA Writer’s share sheet using this app.

    (Update after publishing: everything went according to plan).

    My working title for the app is MicroPublisher. I’m not sure if I’ll ever polish MicroPublisher for the App Store, but that’s my current goal. At the very least, I’m using this project to learn SwiftUI (which I’ll write about later because it’s really awesome).

    A lot of work remains on this project, which will give me a lot to write about on this blog (which will give me more ways to test the app. A virtuous cycle).

    → 11:31 AM, May 6
  • Fun with Micropub

    Last night (while waiting to watch the season 3 finale of Westworld), I wrote a Python script to post to my blog from iOS.

    Many have done this before, so I found many examples online to get me started. What surprised me was just how simple the Micropub API makes it to post.

    Here’s the basic example in Python:

    import requests
    
    response = requests.post(
    	url=endpoint_url,
    	headers={
    		"Authorization": “Bearer “ + api_token,
    		"Content-Type": "application/x-www-form-urlencoded; charset=utf-8",
    	},
    	data={
    		"h": "entry", 
    		"content": text_of_post
    	}, 
    )
    

    And in Swift (if you’ll allow the Alamofire dependency):

    import Alamofire
    
    AF.request(
        endpointURL,
        method: .post,
        parameters: [
            "h": "entry",
            "content": textOfPost
        ],
        encoding: URLEncoding.queryString,
        headers: [
            "Authorization": "Bearer \(apiToken)"
        ]
    )
    

    Something so simple but powerful promotes creativity, and it gives me The Itch to make something.

    Is there an iOS app publish to a Micropub endpoint from a share extension? A search for “micropub” on the App Store would indicate ‘no’. But how difficult would it be to make this? Afterall, the difficult code is already written above.

    Something for me to think about…

    → 10:08 AM, May 4
  • RSS
  • JSON Feed
  • Micro.blog