• Activity
  • Votes
  • Comments
  • New
  • All activity
  • Showing only topics with the tag "command line interface". Back to normal view
    1. Minimal image self-hosting

      In the Tildes Minecraft weekly thread a little while back, there was some discussion about self-hosting images. I've finally done the thing, and figured I'd share the results. The primary goal is...

      In the Tildes Minecraft weekly thread a little while back, there was some discussion about self-hosting images. I've finally done the thing, and figured I'd share the results.

      The primary goal is to make something as simple as possible: I don't really care about galleries or albums, or different file formats, or fancy automatic deduplication etc. I just want to grab an image and throw it up on a link that I can share.

      I do care about easily importing images from various sources, and stripping image metadata.

      The simplest solution I came up with that addresses all these while requiring minimal changes to my existing self-hosted setup is this:

      • Serve a directory of static files from /var/www/i.allemangd.dev on a subdomain with a new server {} block in my existing nginx config.
      • Upload images to that directory via scp. Then access is controlled by SSH and VPN and I don't need to worry about authentication.
      • Convert everything to webp and strip metadata with imagemagick.
      • Don't worry about albums or galleries with the automated tool. I can manually edit the folder structure or rename via ssh/sshfs, but the automated tool just dumps images to a flat directory of $(uuidgen).webp.
      • Pull from the clipboard via xclip by default (I only need to support one platform), or via stdin, path, or url on the command line.
      • Everything in a short autoloded zsh function, and configure destination host/dir/url by environment variables in zshrc.

      The code is at https://git.allemangd.dev/me/imup. @creesch, @Durinthal, @hamstergeddon, @trim: you all participated in my call for recommendations, so have a ping here in case you're interested in the solution I've landed on.

      So, with all that, I'll move some of my minecraft screenshots off of imgur via this tool:

      $ imup \
        'https://i.imgur.com/ecokmB1.png' 'https://i.imgur.com/UNs1mlr.jpeg' 'https://i.imgur.com/83ChnpP.png' \
        2026-01-20_22.15.08.png  2026-01-21_23.06.18.png \
        --tag mc
      
      Output

      Note the ones from the screenshots folder are skipped, since I already ran imup * --tag mc in that directory. Also note that one of the imgur screenshots is skipped, because it came from one of those files.

      I expect the two workflows from here on will be one of:

      • Navigate to my minecraft screenshots directory and execute imup $(date -I)_*.png to share recent updates on the weekly thread. Now just run imup *.png.
      • Prt Sc; "Copy to Clipboard"; imup; Paste the url.

      Some adjustments I might make in the future are:

      • Instead of naming the file by a uuid, name the file by a hash. This way reuploading files won't explode the size of that directory - my "weekly update" thing could just be imup *.png in the screenshots directory. This is done.

      • Synchronize via rsync instead of scp. It should be faster. Instead I now synchronize via temporary sshfs. I think rsync in principle could be faster but this is easier.

      • Set up an sshfs mount with this connection so my minecraft screenshots folder links directly to the static files, like https://i.allemangd.dev/mc/<date>.png. Then no manual commands are necessary. I'm a little hesitant to do that, though, since I'm not sure what happens if I put sshfs to offline host in my fstab, and probably not all my screenshots need to be public. I think I will not do this for fear of accidentally leaking something via an automatically-uploaded file in that directory. Better to be explicit.


      UPDATE: I've rewritten the thing in Python. I now name the files by hash and have a simple linking scheme for "tags". Installation is as easy as uv tool install git+https://git.allemangd.dev/me/imup, and I can carry my config around in dotfiles.

      39 votes
    2. What are some common terminal aka CLI workflows?

      So, earlier today i read about Bagels (https://github.com/EnhancedJax/Bagels), which describes itself as "Powerful expense tracker that lives in your terminal". Not only is it really cool looking,...

      So, earlier today i read about Bagels (https://github.com/EnhancedJax/Bagels), which describes itself as "Powerful expense tracker that lives in your terminal". Not only is it really cool looking, but seems quite useful! I'm really loving the increased TUI-centric command line apps that are becoming more popular; well, it seems like they've become more popular, but i admit to not having any hard data/stats to back up my impression. However...As much as i love the command line/terminal/CLI....my daily workflows simply do not necessitate being in/using the terminal. (I only need such terminal apps on a rare basis, or i simply use old school unix/linux cli tools.) I mean, especially while on my mobile, there's not that much that i need to do from the command line. (Yes, i know there are mobile app terminal emulators, i'm simply saying that i have very little use for my daily needs.)

      So, besides the expense tracking that Bagel cites, I'm very curious to learn what other common, daily sorts of use-cases and workflows do people here have that could benefit from leveraging terminal/command line apps? Please share!

      15 votes
    3. I made a little CLI app for backing up my Tildes comments

      I made a little CLI app for backing up my tildes comments / topics. $ pip install xklb $ library tildes -h usage: library tildes DATABASE USER Backup tildes.net user comments and topics library...

      I made a little CLI app for backing up my tildes comments / topics.

      $ pip install xklb
      $ library tildes -h
      usage: library tildes DATABASE USER
      
          Backup tildes.net user comments and topics
      
              library tildes tildes.net.db xk3
      
          Without cookies you are limited to the first page. You can use cookies like this:
              https://github.com/rotemdan/ExportCookies
              library tildes tildes.net.db xk3 --cookies ~/Downloads/cookies-tildes-net.txt
      

      It creates a SQLITE file with HTML text in one of the columns. Nothing super fancy. Let me know what you think?

      9 votes
    4. Looking for a GitHub CLI tool

      And no, I'm not talking about git. I'm looking for a tool that I can use in scripts to automate non-git tasks on GitHub such as creating new repositories, drafting releases, uploading assets to a...

      And no, I'm not talking about git. I'm looking for a tool that I can use in scripts to automate non-git tasks on GitHub such as creating new repositories, drafting releases, uploading assets to a release, etc.

      I started dipping my toes into gh, GitHub's official cli tool, but when I created a repository it immediately cloned it, which is not what I want. I know I can just rm -rf the repo but ideally the tool I use would do only what I tell it and nothing more.

      Reading the docs for hub, it might do what I want, although I have some reservations about the project after reading this post written by the developer: https://mislav.net/2020/01/github-cli/

      I've also come across git-hub, which doesn't support creating repos AFAICT, and git-spindle, which doesn't support uploading assets.

      Are there any other command line GitHub clients I should consider?

      Which one do you use? What's your experience with it been like?

      5 votes
    5. Recommended RSS feeds/readers?

      Inspired by this post, I was wondering what RSS feeds you all subscribe to and how you read them. Here are mine: http://feeds.reuters.com/reuters/topNews...

      Inspired by this post, I was wondering what RSS feeds you all subscribe to and how you read them.

      Here are mine:
      http://feeds.reuters.com/reuters/topNews
      https://www.pbs.org/newshour/feeds/rss/headlines
      https://www.pbs.org/newshour/feeds/rss/world
      http://feeds.nature.com/nature/rss/current

      I'm just started using Newsboat, a CLI RSS reader, to read in a few feeds (Reuters was one of them :( ) and it's pretty refreshing to get a text-based newsfeed with no distraction. Though, the feeds I'm subscribed to only give me a brief blurb of the news...

      26 votes
    6. I made a (very, very) basic Tildes scraper and CLI browser ruby gem

      Here's the ruby gem page and here's the github. Right now it comes with a command line browser that can browse the front page and group pages with no sorting options, and you can view the contents...

      Here's the ruby gem page and here's the github. Right now it comes with a command line browser that can browse the front page and group pages with no sorting options, and you can view the contents of a topic (link or text) aswell as the comments. The methods defined in lib/tilde-scraper/api.rb can be used to scrape tildes pages into Group, Page, Topic, and Comment objects.

      Right now it's super basic and messy, but I figured if anyone was interested in it it would be the people here.

      9 votes