Hacker Newsnew | past | comments | ask | show | jobs | submit | 037's commentslogin

Very interesting, I’ll definitely give it a try!

Another approach I recently discovered is an old but beautiful Unix-style tool for renaming files: vidir - edit a directory in your text editor. It’s part of the moreutils suite [1].

You get the list of filenames in your editor – edit them as you like, save, exit, and it renames the files. It uses whatever editor is set in your $EDITOR env var, so it doesn’t have to be vi/vim.

You can also pipe in a list of files, e.g. `find . -type f | vidir -`, to edit just the files you want - and you can even change paths (add, rename, remove directories) in the editor to move files around easily.

To try it quickly on macOS: `brew install moreutils`

[1] https://joeyh.name/code/moreutils/


> You get the list of filenames in your editor – edit them as you like, save, exit, and it renames the files. It uses whatever editor is set in your $EDITOR env var, so it doesn’t have to be vi/vim.

I'm not sure how "powerful" vidir is, but I recently found this functionality in yazi [1] and it became one of those "you think you don't need it until you try it" features

[1] https://github.com/sxyazi/yazi


This is also integrated into Emacs with dired, and it’s pretty neat [0].

[0]: http://xahlee.info/emacs/emacs/rename_file_pattern.html


oh wow, this feels like https://github.com/stevearc/oil.nvim


if you can forgive a shameless plug, I wrote https://github.com/ddlsmurf/fled some time ago and it serves me very well to this day. (It's not half as advanced as OP's tool but still useful)


Would you mind sharing some tips on how to set that up? A code snippet or a link to the relevant docs would be super helpful.


Certainly, the bulk of the functionality is provided by URLDispatcher:

https://www.hammerspoon.org/Spoons/URLDispatcher.html

Here's a cleaned up version of my config... I also mapped global cmd-shift-1/2/i to focus my profile and incognito windows (and create a window if none already existed):

https://gist.github.com/beaugunderson/d1ca2218b9b272f3ac3573...


Thanks a lot — that’s way more than I expected!


I love that it’s a command line tool — I’ll try it soon.

I use OpenIn for this [1] (it’s paid, but a one-time purchase at a very reasonable price). It works with URLs too, supports “browser profiles”, and lets you create logic using JavaScript (e.g., do X if the filename contains Y, or do Z if a modifier key is pressed).

It works really well and even has the ability to “fix” what external apps have changed. I plan to use this on new Macs to reconstruct my app associations and rules.

I do wish the rules were defined in plain text files — sometimes it’s hard to follow the logic through the UI and the way it handles things.

Another comment mentions Hammerspoon (which I used in the past — it was very nice). Maybe I can rebuild part of my current setup with it.

[1] https://loshadki.app/openin4/


I loveee hammerspoon. And had a subscription to OpenIn a bit back. Advanced scripting isn’t going to happen, even paging out to another script. Recently committed to Regex which would cover most of that. I’ll look into how it “fixes” old associations.


Walking back my regex commitment, just a heads-up/apology if you had your hopes up. Want this to stay as a CLI and not a dynamic app. Let me know if there's anything else you could see useful that would fit within that scope!


If you use a VSCode-based editor, a good alternative can be the "REST Client" extension: https://marketplace.visualstudio.com/items?itemName=humao.re...

I’ve been burned a few times by these clients — difficult backups, changing licensing/commercial terms, hard to version — so now I prefer a few simple .http files that I can version in Git and easily read, even if the extension disappears.


That extension is excellent! Been using it for few years already


it’s so good. no context switching with a different app. also, there’s a fairly compatible version for emacs with the same name.


Can you save the full request details and full response details in one click as one file with this extension?

This is the feature I use the most.


Just tried. You can save the full response to a single file with one click, but it doesn’t include the original request.

I found an issue asking for the same feature: https://github.com/Huachao/vscode-restclient/issues/1311


> Their Raspberry Pi collection is so extensive, it's starting to look like a fruit stand!

Lol :D


> Yes, it is possible to use Prompt Caching with your Batches API requests. However, because asynchronous batch requests can be processed concurrently and in any order, we cannot guarantee that requests in a batch will benefit from caching.

https://docs.anthropic.com/en/docs/build-with-claude/prompt-...


An alternative from the developer of Coolify. It’s no longer for sale, but the page mentions he’ll open-source it:

https://safetyper.com/


Funny, I realized within the first few minutes that I’m not interested in Rye, but I couldn’t stop watching because I loved the mechanical keystroke sounds so much. I don’t use a mechanical keyboard for various reasons (I tried), but those sounds…

(Not saying having them in the video for everyone is a good thing—I respect the fact that some people can find them annoying)


Well you are perfectly entitled to watch ASMR videos of people typing on a loud keyboard :D

I personnally do like a mechanical keyboard and the sound of them when I am using it, but don't use it much unless I am the only one at home out of respect to my kids and partner, especially in the morning[1]. And I would also switch keyboard to record a video or do a videocall as I don't want the sound of it to be so present.

I think this is just a negative point on a video as it makes a busy foreground sound over what looks like a bad microphone recording in the background. That should be the opposite, the voice should be the foreground sound to your ears.

[1] partner has irregular work schedule so might want to sleep longer in the morning when came late the night before.


I studied the mechanism, and while it’s true that some tape must be wasted, I think there is room for improvement (with a different idea or even small changes, given that I have a Dymo that uses the same mechanism but wastes much less tape). I simply believe there aren’t enough incentives to research something that saves tape.


I have the Brother P-Touch CUBE PT-P300BT and “pwned” it (not really) some time ago. Using this code as a starting point [1], I set it up with a FastAPI backend serving an HTML+JS frontend on a Raspberry Pi Zero 2 W. I connect to it using a browser, design the label, and it prints via Bluetooth. One of the first options I added to the interface is the “no feed” checkbox, which I use when I know I’ll print more than one label in sequence before cutting.

My idea is to add another endpoint to the API so that using Whisper or Siri, I can say, “Print Eggs and today’s date” or “Print Coffee in medium size.” I use something similar with an Alfred workflow, but voice commands would be nice in the kitchen.

I hate when someone talks about a project I’m interested in but doesn’t share any code. However, the entire thing is so ugly that I’ll never permit any other human being to see it. I’ll incorporate a Dead Man’s switch to delete everything or burn the Raspberry Pi, if needed.

Anyway, it’s all very simple once you realize that Fabric.js [2] handles 80% of the interface and functionalities on the frontend. Probably with Aider [3] and Claude Sonnet 3.5, you can make it during breakfast (or 7 years: I’m a dev, so I’m VERY bad at time estimations).

[1] https://gist.github.com/vsigler/98eafaf8cdf2374669e590328164...

[2] https://github.com/fabricjs/fabric.js/

[3] https://github.com/paul-gauthier/aider


I love this idea. It never even occurred to me to try something like this but that just makes stumbling on comments like yours even better.


Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: