join south africa and (sorta) japan, use YYYY-MM-DD as a default - sorts well, zero ambiguity… at least until some joker starts popularising YYYY-DD-MM, anyway
I’m a systems guy. ISO8601 or die. Whomever decided to put the most significant digits at the end of MMDDYYYY can get fired. From a cannon. Into the sun.
Everyone talks big game about the file names but forget how important standardizing on log time stamps is too. When I’m able to pipe a bunch of logs into sort, I get so happy.
I recall writing a script that produces that 01237 with smaller digits around it for the current date. It lists the numbers that occur in the date (0, 2, 3 and 9 for 2023-09-09), the smaller digits show at which position they show up in a YYYYMMDD format (the 0 shows up on positions 2, 5 and 7)
The script has not been pushed online cause it was so dang bad
I enforce ISO 8601 for the shared storage in my office. Before I got there, files were kinda stored in all kinds of formats, but mostly month first.
I tell the person under me she can store her files in her user any way she wants, but if it goes into shared storage, it’s ISO 8601. I even have a folder in there called !Date format: YYYY-MM-DD Description to help anyone else remember.
I refuse to believe anyone does this. I think the inconsistency comes down to how people speak. "The meeting will be held on the 10th of January 2023" = 10/01/2023 but "January 10, 2023" = 01/10/2023.
I don't know how you would have to torture your brain for it to feel at home with YYYY-DD-MM.
Understandable, but the keystrokes are helpful for human readable. I always have the “Suspicions Fry eyes” when I want to read 20230809 in a lot of files.
I actually need to standardize my code. I’ve got “learning F2” as something I want to do soon. The goal: use the exif data of my pictures to create [date in ISO 8601] - [original filename].[original file type termination]
So a picture taken the third of march 2022 titled “asdf.jpg” would become “2022-3-3 - asdf.jpg”
If you’re on Linux exiftool can get the creation date for you: exiftool -p ‘$CreateDate’ -d ‘%Y-%m-%d’ FILENAME, and you could run tgat in a loop over your files, something like:
<span style="color:#323232;">mkdir -p out
</span><span style="color:#323232;">for f in *.jpg
</span><span style="color:#323232;">do
</span><span style="color:#323232;">createdate=$(exiftool -p '$CreateDate' -d '%Y-%m-%d' "${f}")
</span><span style="color:#323232;">cp -p "${f}" "out/${createdate} - ${f}"
</span><span style="color:#323232;">done
</span>
Obviously don’t justbgo running code some stranger just posted on the internet, especially as I haven’t tested it, but that should copy images from the current directory to a subdirectory called ‘out’ with the correct filenames.
I don’t see any HTML when I look at that comment from Lemmy, but kbin seems to make a real mess of rendering code blocks. Basically that bit had a few lines of code they could yse to do what they wanted.
I’m using NixOS. Ext4 filesystem. As to language, I’m not entirely sure what you mean. If you refer to the character set in the filenames, I think there are no characters that deviate from the English alphabet, numbers, dashes, and underscores.
Oh ok so you’re more so working with folder structure etc, so bash for when you plug-in a card?
I’m thinking in more programmatic terms, there’s definitely some bash scripting you can execute. Or just go balls out and write a service that executes on systemctl
Even vs odd numbers are not as important as we think they are. We could do the same to any other prime number. 2 is the only even prime (meaning it is divisible by 2) 3 is the only number divisible by 3. 5 is the only prime divisible by 5. When you think about the definition of prime numbers, this is a trivial conclusion.
With 2, the natural numbers divide into equal halves. One of which we call odd and the other even. And we use this property a lot in math.
If you do it with 3, then one group is going to be a third and the other two thirds (ignore that both sets are infinite, you may assume a continuous finite subset of the natural numbers for this argument).
And this imbalance only gets worse with bigger primes.
So yes, 2 is special. It is the first and smallest prime and it is the number that primarily underlies concepts such as balance, symmetry, duplication and equality.
But why would you divide the numbers to two sets? It is reasonable for when considering 2, but if you really want to generalize, for 3 you’d need to divide the numbers to three sets. One that divide by 3, one that has remainder of 1 and one that has remainder of 2. This way you have 3 symmetric sets of numbers and you can give them special names and find their special properties and assign importance to them. This can also be done for 5 with 5 symmetric sets, 7, 11, and any other prime number.
Not sure about how relevant this in reality, but when it comes to alternating series, this might be relevant. For example the Fourier series expansion of cosine and other trig function?
True, but normally, you’d introduce trig functions before complex numbers. Anyhow: I appreciate the meme and the complete over the top discussion about it :D
lemmy.ml
Newest