πŸ—» James Van Dyne

✈️Trips πŸ—ΊοΈMaps ✏️️Blog πŸ”—οΈοΈLinks πŸ‘‰Now πŸƒRuns
  • 🏑Home
  • ✈️Trips
  • πŸ—ΊοΈMaps
  • ✏️Blog
  • πŸ”—οΈLinks
  • πŸ‘‰Now
  • πŸƒRuns
  • ✏️Articles
  • πŸ“€οΈReplies
  • πŸ’¬Status
  • πŸ”–οΈοΈBookmarks
  • πŸ—ΊCheckins
  • πŸ“…The Week
  • πŸ–₯Tech
  • 🌲Sustainability
  • πŸƒRunning
  • 🧠Thoughts
  • πŸ‡―πŸ‡΅Japan
  • πŸ’‘TIL
  • β›°Tanzawa
  • 🏑Home
  • ✏️Articles
  • πŸ“€οΈReplies
  • πŸ’¬Status
  • πŸ”–οΈοΈBookmarks
  • πŸ—ΊCheckins
  • πŸ“…The Week
  • πŸ–₯Tech
  • 🌲Sustainability
  • πŸƒRunning
  • 🧠Thoughts
  • πŸ‡―πŸ‡΅Japan
  • πŸ’‘TIL
  • β›°Tanzawa
  • Feb 13, 2021
    by James
    Figured out (I think) the issue with my Feedly feeds and images. I use BeautifulSoup and Django templates to rewrite the image tags generated by Trix to be lazy loading and offer optimized formats on the backend.

    picture = BeautifulSoup(
        render_to_string("trix/picture.html", context),"html5lib"
    )

    The issue is that the the "html5lib" causes my <figure> tag to be wrapped in <html> and <body> tags. Browsers are smart enough to filter this out. But these other parsers are not.

    Changing this line to use the "html.parser" prevents wrapping my template in html tags and should solve the issue.

    picture = BeautifulSoup(
        render_to_string("trix/picture.html", context), 'html.parser'
    )
    πŸ”—permalink
  • Feb 13, 2021
    by James
    Made good progress on the embed based64 image -> file save in tanzawa -> content rewrite. Now working on my handling of json micropub requests.Β 

    This handler is a bit large. I can't wait for it to be working so I can refactor it down to something a bit more manageable.
    πŸ”—permalink
  • Checkin to ChΓ’teraisΓ© (γ‚·γƒ£γƒˆγƒ¬γƒΌγ‚Ό ζˆΈε‘šθΈŠε ΄εΊ—)

    ChΓ’teraisΓ© (γ‚·γƒ£γƒˆγƒ¬γƒΌγ‚Ό ζˆΈε‘šθΈŠε ΄εΊ—) 35.40331014222004 139.5210586226513
    Feb 12, 2021
    by James
    in Yokohama, Kanagawa, Japan

    Birthday cake. πŸŽ‚

    πŸ”—permalink
  • Feb 12, 2021
    by James
    Those that are familiar with micropub know that there's two ways to use the endpoint. One is as a regular json api and the other is a plain-old form submit endpoint. Almost all integrations these days are done with json apis, so the idea of support a form api seems antiquated at first.

    But once you realize that any site can publish to your site, including file attachments(!), with a simple form on their website, it doesn't seem so antiquated after-all. It feels quite liberating. In fact, it may be my favorite part of micropub.

    Currently regular json requests can create a post. And form requests with file attachments can also create a post. Tanzawa automatically inserts the photo into the post and does its exif stripping, lazy loading, and other image loading optimizations.

    Testing with the Quill article interface - image attachments are sent in base64 encoded strings in the img tag. Extracting those images, saving them to disk, and rewriting the html will take me another day to complete.

    ---

    Feedly is still mangling my posts. Besides the figure tag messing things up for feedly, another theory I have is that it doesn't like text content not wrapped in a <p> tag. Trix (the editor Tanzawa uses) wraps all content in a <div> tag and text is raw inside of it. I pushed an experiment to rewrite that <div> to a <p> tag in the RSS feed. Hopefully this fixes it.

    Mangled posts in Feedly
    πŸ”—permalink
  • πŸ”— A Teenager Has Remade Myspace and Everyone Is Loving It

    Feb 11, 2021
    by James
    Coded entirely by 18-year-old An, 'SpaceHey' harnesses nostalgia and a distaste for modern social media to bring the Old Internet back from the dead.
    Happy to see SpaceHey getting more users. I don't use it, but the world needs more social places online where you aren't you're free to customize it to your heart's content.
    1. Tagged with
    2. nostalgia
    3. computing
    4. social media
    πŸ”—permalink
  • Feb 11, 2021
    by James
    I've noticed some errors when Feedly parses my Tanzawa RSS feed. Namely that it doesn't show any content when I include an image. I have no idea why it's stripping all text from the posts.

    Other fixes to the RSS feed include removing a / from the guid and setting the permalink to false, since the guid was not a url. As the guid change, most reads will show old posts as new - sorry about that.

    This mostly a test post to see if adding titles for my statuses (the first 128 characters of plain text) will make Feedly parse properly when I include an image.

    IfΒ  this doesn't work, I have a theory that Feedly may not like <figure> tags, so I may try to rewrite my html content to be simpler for rss feeds.

    A photo of my new titles in NetNewsWire
    πŸ”—permalink
  • Feb 11, 2021
    by James
    Micropub is going to be a larger task than anticipated. As such I think I'll roll it out incrementally, expanding the capabilities of the micropub endpoint as Tanzawa can support them natively.

    Today I managed to get my first post from Quill to Tanzawa!

    A first post to Tanzawa originating outside of Tanzawa!


    πŸ”—permalink 1 interaction
  • Feb 10, 2021
    by James
    Added support for verifying and revoking tokens. One thing I like about API development vs regular page/form development is the inputs and outputs are clearly defined. You don't need to worry about things like layout or looks. It's either valid or it's not.
    πŸ”—permalink
  • Feb 09, 2021
    by James
    With the basic indie auth login flow working, the next couple of days will be dedicated of fully fleshing out apis to support revoking tokens (e.g. on logout ) and checking token validity.Β  I added basic tests for the authentication -> access token call today, so I can be confident that while I make these changes, I won't break anything.

    I also added Bearer token based authentication today, which I've plugged into my micropub endpoint stub. My goal is to have the full indieauth/micropub api ready for release by Friday, at least on a basic level.

    Importing data from OwnYourSwarm like I want will require a few more models and planning because posts will need to support geo-coordinates and so forth.
    πŸ”—permalink
  • Feb 09, 2021
    by James
    Woohoo! First successful IndieAuth login with Tanzawa.Β  πŸŽ‰πŸ™ŒπŸ»

    Tanzawa logged in to OwnYourSwarm
    πŸ”—permalink 2 interactions
Previous 156 of 358 Next
Reply by email
Powered by
πŸ”Tanzawa

← An IndieWeb Webring πŸ•ΈπŸ’β†’
Photo of James Van Dyne James Van Dyne Japan

Web developer living in Japan.