• I've started working on post visibility support in Tanzawa. It's the first big feature I've worked on in a while. Also a great opportunity for me to up test coverage to make sure visibility is consistent between RSS/Feeds/Streams/Micropub.

    Adding post visibility support
  • The Week #52

    • One year of The Week without missing a single post ๐ŸŽ‰. Creating this weekly post got me back into blogging regularly again and gave me an opportunity each week to reflect on life. Initially I thought I'd reference previous posts more, but in practice I don't. One year ago I had just gotten my Apple Watching, helping me start my 4:30-ish wake ups,ย  just grokking micropub, and running into issues with Wordpress. Now I still wake up at 4:30 (mostly naturally), wrote a micropub server, and ditched Wordpress for a custom blogging engine. What a year.

      If you're trying to start a blog or you have a blog and want to blog regularly, I can't recommend a weekly roundup enough. Keeping the format a simple bullet list makes it easier to write as you don't need a fancy narrative or worry about how to connect the points. You can just write.
    • We booked a weekend trip to Atami for before the Olympics later this month. But with the huge landslide that happened, I don't think we can feel good relaxing when there's search and rescue happening a kilometer away. Hopefully we can reschedule it for a later date.
    • In Covid-19 news this week, Kanagawa prefecture has finally rolled out it's "cancel-waiting" notification system via LINE this week. The idea is when there's a cancellation for a vaccine appointment, they'll contact people who've registered with the system and you can take the appointment with your phone. It helps reduce vaccine wastage.
    • Meanwhile in Edokawa-ku in Tokyo, they delayed sending out the vaccine voucher to foreign residents by an entire week because "we needed to prepare translations". It boggles my mind. Foreigner residents can read Japanese, too? Even if we can't we can figure it out for a week while you prepare documents?ย 

      Note this also was true for older residents who should already have their vouchers,ย  but don't because they're not Japanese. If this wasn't for a life saving shot weeks before a massive international sporting event, I'd be a bit more understanding.
    • I fixed a few bugs with Tanzawa and have been getting some good issues opened in the repository that's helping me find issues in my (lack) of documentation. I'm starting to think I need to make a more "formal" documentation, but not quite sure what to use / where to host it yet. The "default" for the Python community is readthedocs (and thereby Sphinx?), but I have yet to look into how to set that all up.
    • I got completely caught up on Trying, a good sitcom about a couple in the UK trying to adopt a child. It's a really good show. And I enjoy the main character's accent. AppleTV+ may not have the quantity of shows that Netflix does, but you can count on quality.
  • ๐Ÿ”— Django & Celery in production

    DjangoCon JP 2021 ็™บ่กจ่ณ‡ๆ–™

    Djangoใง้žๅŒๆœŸๅ‡ฆ็†ใ‚’ๅฎŸ็พใ™ใ‚‹ใŸใ‚ใซใ€ใ‚ˆใไฝฟใ‚ใ‚Œใฆใ„ใ‚‹Celeryใ€‚ใŸใ Djangoใปใฉ็Ÿฅ่ฆ‹ใŒๅ…ฑๆœ‰ใ•ใ‚Œใฆใ„ใชใ„ใŸใ‚ใ€ใชใ‚“ใจใชใไฝฟใฃใฆใ„ใ‚‹ใจใ„ใ†ๆ–นใ‚‚ๅคšใ„ใฎใงใฏใชใ„ใ‹ใจๆ€ใ„ใพใ™ใ€‚ใใฎใ‚ˆใ†ใชๅ ดๅˆCeleryใ‚’ไฝฟใˆใ‚‹ใ‚ˆใ†ใซใ™ใ‚‹ใพใงใฏ้ †่ชฟใงใ‚‚ใ€ๅฎŸ้š›ใซ้‹็”จใŒใฏใ˜ใพใฃใŸใ‚ใจใซๅ›ฐใ‚‹ใ“ใจใŒๅ‡บใฆใใพใ™ใ€‚ไพ‹ใˆใฐใ€ใƒญใ‚ฐใฎไฟๅญ˜ใ€ใƒชใƒˆใƒฉใ‚คใฎ่จญ่จˆใ€ใƒ‡ใƒ—ใƒญใ‚คๆˆฆ็•ฅใชใฉใ€‚
    ใ“ใฎใƒˆใƒผใ‚ฏใงใฏใ€Celeryใ‚’Djangoใƒ—ใƒญใ‚ธใ‚งใ‚ฏใƒˆใงๅฎŸ้š›ใซ้‹็”จใ™ใ‚‹ใ†ใˆใงใฎๅฝน็ซ‹ใคTipsใ‚’ใŠไผใˆใ—ใพใ™ใ€‚
    Some good tips about Celery Production tips from Django Congress 2021 in Nagano this year (I couldn't attend). Most of the information is in the docs in English, but it's handy to see it condensed, even if it's in Japanese. A couple key points:

    • Use **kwargs for your tasks input. This makes it easier to make updates to your tasks once they're already running in production if your input needs to change.ย 
    • Reminders about all of the handy kwargs you can pass to tasks in regards to retry. Especially handy autoretry_for where you can pass a tuple of exceptions that will cause the task to automatically retry
    1. Tagged with
    2. python
    3. django
  • Perfect timing from aaronpk with this Swarm Checkin Import tool. I had been recently thinking about how to import my historical Swarm checkins to my blog so I could build a fun map. Will have to fiddle with this in the next week. Thank you .
  • Gathering Requirements for Native Crossposting in Tanzawa

    Ru made a feature request for Tanzawa to be able to syndicate / cross post from Tanzawa to other sites natively. I think it's a great idea and spent some time to collect my thoughts about what that could look like.

    My thoughts were posted on GitHub, but I'm copying them here so I always have a copy and in case people who read my blog but don't followย  the Tanzawa GitHub have any input.

    ---ย 

    Agreed โ€“ being able to syndicate content directly from Tanzawa would be ideal. All syndication is currently manual (it doesn't hurt enough to automate it, yet).

    Base Thoughtsย 


    If we can figure out what the workflow would look like, I think we can define some base requirements for the feature. A couple of general thoughts about syndication:

    • I don't think posting should be syndicated automatically on publish. There's a couple of reasons for this:ย 
      • Tanzawa doesn't support any kind of background tasks. Posts that have a bunch of links take a while to complete it tries to send webmentions. Adding more external requests could increase the response time to longer than the request timeout allows quite easily. This is especially true because webmentions require 2 requests per save (before content update and after content update). We could probably process webmentions concurrently to speed this up, but that feels like a bit much at this point? It may be easy with asyncio, but I'd need to research it.
      • When I was posting with Wordpress there was a syndication checkbox (via brid.gy) and found it you'd get errors if you saved twice as the post had already been syndicated. Because there also wasn't a preview, it was always a bit of a gamble for how it would post.
    • Syndication is a separate concern from authoring posts themselves. And as such warrants dedicated screens to make it _right_.ย  Initially I had thought it might work well to handle syndication via a modal on the edit post page, but the more I think about it, it would box us in.
    • Brid.gy is still super handy for backfeeding likes/replies as webmentions. I still think brid.gy is useful / "required" unless we were to build in some kind of polling mechanism, which is difficult without support for cron/background tasks. ( It could be done "easily" with a django management command, I'm hesitant to introduce undue complexity).
    • "Syndication" feels a bit jargony to me. Is "Cross post" (or something similar)ย  a better term to use in the interface?
    • Each syndication destination is going to require some kind of settings (API keys, mostly). These can / should be managed via the Django admin?

    Workflow


    Create ofย  Syndication/Cross Posts

    This is assuming that all syndication can be handled with the same form.

    • Creating a new syndication would happen from the edit post button. The button should be on the meta menu (on the right), below the publishย  buttons and only display once the post is published (you can't syndicate a draft).
    • Clicking this button would take you to dedicated syndication page.
    • The top of the page would be a form. The form would display the syndication text and up to 4 photos (with the caption).

      The syndication text is free text and pre-filled with either the post title + link or the first 280 chars of the note. Above the text field itself would be a segmented control (tabs? radio button?) that when clicked would let you toggle between the different presets.

      You may not want to syndicate each photo, so perhaps a checkbox is warranted to let you select which photos will be sent.
    • Finally at the bottom there's some checkboxes for which networks to syndicate to. As you can only syndicate a post once per network, posts that have already been syndicated to would be disabled with text explaining that you've already syndicated to that network for this post.
    • Once syndicated they'd store the url of the syndication and create a TSyndication record.

    Syndication List

    I think we'd want a separate section for syndication, like we do with "Posts / Files" on the left for syndications / cross posts.ย 

    Clicking that would show you a list of your most recent syndication activity ( syndication destination (link to twitter etc..), syndicated text, link to the related post).ย 

    Selecting a crosspost would show you a (readonly?) version of the syndication Create form.

    ---

    Does that sound about right? Anything you'd change or we should consider (especially regards to Mastodon,ย  I don't have an account/haven't used it before).
Previous 276 of 719 Next