Posted on :: Tags: , , , , ,

I have a Telegram bot to save files to my zettelkasten. It’s always there, waiting for my muses to visit.

Currently, it only supports text. When I send a message, the bot adds it to a new file or appends it to a file modified within the last 30 minutes, which simplifies multi-paragraph inputs.

I need some more features to make it more useful.

I want it to save audio and image files to my inbox as well. I plan to run Xvc pipelines on these files to convert audio notes to text and make images searchable via OCR or tagging.

The first step to achieve this is to understand what kind of files Telegram can upload and download. I want to track these files with Xvc to avoid bloating the Git repository. I have a script that processes these files, but currently, it only commits changes to Git. I want to determine whether a file should be tracked by Xvc or Git.

I skimmed the Telegram API documentation and found that it supports a wide range of file types. This led me to change my approach: I will track only .txt and .md files with Git and use Xvc for everything else.

In the future, I plan to add a --binary-only option to xvc file track to track binary files only. This will help me to track only non-text files when using globs as targets. I might also extend this to a general predicate to decide which files to track based on their size, modification time, or other properties.