4 votes

What programming/technical projects have you been working on?

This is a recurring post to discuss programming or other technical projects that we've been working on. Tell us about one of your recent projects, either at work or personal projects. What's interesting about it? Are you having trouble with anything?

2 comments

  1. skybrian
    (edited )
    Link
    On repeat-test, I was all set to do a release, but I wanted to explain what the API differences were in the changelog. So I wrote some code to parse the output of ‘deno doc —json’ and turn it into...

    On repeat-test, I was all set to do a release, but I wanted to explain what the API differences were in the changelog. So I wrote some code to parse the output of ‘deno doc —json’ and turn it into a short, diffable summary of an API. I used repeat-test’s Domain class to do JSON validation (sort of like Zod) and discovered places I wanted to improve the API.

    Here’s the schema. I wouldn’t expect anyone to switch from Zod, but I think it’s looking pretty nice. It’s unfortunate that TypeScript can’t infer recursive types, so many type definitions in the schema has to be written out twice. But that does make it easy to compare the two. (I should add comments about what all these types are for, though.)

    2 votes
  2. fxgn
    Link
    I use Telegram for all of my communication, and I want my chats to be safely backed up in case something happens to Telegram or to my account. Telegram Desktop includes chat export functionality,...

    I use Telegram for all of my communication, and I want my chats to be safely backed up in case something happens to Telegram or to my account.

    Telegram Desktop includes chat export functionality, but:

    • It requires you to press a button, you can't automate it in any way
    • You need to keep your computer running with Telegram open while the chat is exporting, which can take a long time if there's a lot of media to download
    • It doesn't export chats incrementally, so if you've already exported a chat a while ago and only want to export new messages without duplication, you need to manually select date ranges

    I wanted a solution that I could schedule to run on a server and have all my chats safely backed up. So I made one.

    https://github.com/flexagoon/ream

    I also made it fully compatible with TDesktop's export JSON. From the readme:

    It is a standalone re-implementation of Telegram Desktop's export functionality. The output from ream must be fully equivalent to the output from Telgram Desktop, and any difference in the resulting json (except for filenames) is treated as a bug.

    This was a pretty fun project as it required me to dig into Telegram Desktop's messy C++ codebase to figure out how it's export works, and learning more about the weird custom MTProto protocol that telegram uses for it's API

    2 votes