Every story and comment from the Hacker News API, in a layout borrowed from 2001.
A comment on mpv a free, open-source, and cross-platform media player. Parent comment
Could be something as simple as:
file_path="${1}" mime="$(file --mime-type --brief "${file_path}")" ext="${mime#image/}" mv "${file_path}" "${file_path%.*}.${ext}"
There are no comments on this comment yet.
Could be something as simple as:
That does no checks (e.g. is the file an image) and may not work on something on something like a video, but it’ll do for common image types such as png, jpeg, webp, heic, gif…