And that the problem isn't that they have "different political opinions", but that their "political opinions" include things like stripping human rights from trans people
Ah sorry lol, I happily assumed you're just a bit unfamiliar with bash and not programming in general – you're definitely doing a great job if that's the case, shell scripting isn't exactly easy in a lot of ways like you discovered with how spaces in file names can bork things sometimes. But yeah, 11min isn't terrible at all and if you don't have to run that script very often there's not much point in spending time optimizing it.
Just for future reference in case you end up scripting again, what I was thinking of was instead of processing every filename in $folder_name/**/*
one at a time, you could do it in parallel with some creative rewriting, meaning you'd possibly be able to take advantage of having a multicore CPU – but whether it'll actually be faster depends on a lot of things so it'd basically just have to be tried and timed.
Something along these lines, totally untested, the script can be further optimized and might not even run as-is, but should give you the idea. Starting off with the script, I modified it to just take a single file name as an argument:
#!/bin/bash
# exif_date_filter.sh
if [ $# -eq 0 ]; then
echo "Usage: $0 <filename>"
exit 1
fi
# Concatenate all arguments into one string for the filename, so calling "./script.sh /path/with spaces.jpg" should work without quoting
filename="$*"
start_range=20170101
end_range=20201230
DateTimeOriginal=$(/usr/bin/vendor_perl/exiftool -m -d '%Y%m%d' -T -DateTimeOriginal "$filename")
CreateDate=$(/usr/bin/vendor_perl/exiftool -m -d '%Y%m%d' -T -CreateDate "$filename")
if [[ "$DateTimeOriginal" =~ ^[0-9]+$ ]] || [[ "$CreateDate" =~ ^[0-9]+$ ]]; then
if ([ "$DateTimeOriginal" -gt $start_range ] && [ "$DateTimeOriginal" -lt $end_range ]) ||
([ "$CreateDate" -gt $start_range ] && [ "$CreateDate" -lt $end_range ]); then
/usr/bin/vendor_perl/exiftool -api QuickTimeUTC -d %Y/%B '-directory<$DateTimeOriginal/' '-directory<$CreateDate/' '-FileName=%f%-c.%e' "$filename"
echo "Found a value"
echo "Okay its $(tput setab 22)DateTimeOriginal$(tput sgr0)"
else
echo "FINISH YOUR SYNTAX !!"
fi
fi
So it's called as ./exif_date_filter.sh /some/image.jpg
Then, assuming you have GNU parallel
installed (should be easy to find on just about every distro), you could do… uh, I think just eg. find /home/user/Pictures -type f | parallel ./exif_date_filter.sh
to automagically run as many "copies" of that script at the same time as you have CPU cores
IF ITS POSTED HERE IT MUST BE TRUE
ESPECIALLY IF IT ISNT TRUE
This meme is the funniest Seinfeld episode.
Oh yes, although that's not what I'd call a high bar.
Then again if you're looking for classified materials WT forums might actually be trustworthy
it’s in a trustworthy internet forum
Well, it's in an internet forum at any rate
All I need is an offshore platform, then
Benefits… package? I hadn't thought of… uh… yeah it's great mate, terrific. Best benefits package ever.
Well that'd be awesome, but don't sweat it! Would make my life easier if the perf on the SD was at least in the same solar system as "OK", but there's a decent chance I could use Whisky (or CrossOver) for this
Feel like being a guinea pig for checking out how the current version of SC runs on the Deck? 😀
But more seriously speaking I think I'll give something like Whisky a go. My laptop's decently new so if I can wrangle the emulation it might be Good Enough™ when coupled with a PS4 controller for testing things out during a free fly week
Ah nice, thank you for the links.
~10fps in eg. cities sounds like it might be beyond my jank limit but hard to say how the overall perf would feel like. Hmm, I might look into trying to run it on my laptop but it's Apple ARM – I have a vague memory of seeing something like Proton / CrossOver pop up recently specifically for Apple silicon.
I take it you've never tried running SC on the Deck?
Not saying it’ll turn into 4k/60fps experience but it should be better.
Mate it's a Deck, that's not in the cards anyhow 😀 some of the benefits of having been at this stuff for about 40 years now are that I'm fine with extremely potato settings etc and I have a very high tolerance for lag and jank.
Is there any other way to test the performance without paying for a starter pack, besides free flights? Not that I mind waiting, Oct/Nov's going to arrive way faster than I'd like anyhow heh
I don't want to join a security service, that sounds stressful as fuck – I want my own security service.
Time to start a micronation! Job applications are open
I'd really love to try SC out because I've been itching for something like Elite: Dangerous that's… well… not ED, but my only gaming machine is a Steam Deck and I've understood the performance isn't exactly great. Seems like SC is pretty enjoyable already even though it's very much not finished
Ah yeah this suggestion is much better than mine. Reducing the number of calls to exiftool is probably the easiest way to speed things up, and giving it a glob instead of individual files is definitely worth trying because it can be quite a bit faster sometimes depending on what's being run
I would assume that exiftool is where most time is spent. Spitballing here and I'm just ever so slightly drunk (shut up I know it's Thursday) so don't take me too seriously, but maybe you could parallelize this somehow?
Something like modifying that script so that it takes a list of files as arguments (escaping might become a problem though because fucking bash) and then munges them, and then either in the shell or in another script you use eg GNU parallel
to run that script on yourdir/**/*
?
edit: you'd want to check if it's easier to use cli arguments or stdin in a script being run with parallel
, been a while since I used it. Could be either one is fine
Marc Andreessen, the cofounder of Andreessen Horowitz, said that AI could be the revival that comedy needs.
I'm not sure if I should be laughing or crying. Probably both.
It's like pure concentrated essence of 70's. I actually really do like it too; like I said in another comment it's not what I'd call a good movie as such, but the ridiculous camp is part of the fun for me. What's not to love about a weird-as-shit 70's dystopian scifi romp that's like Elysium on tons of LSD?
Sinimusta siirtymä
Tämän on kyllä huomannut omista kokkaretutuista; yksi lähti jo sille linjalle, että sukupuolivähemmistöjen pelkkä olemassaolo on "kärjistävää" ja että lihaa syövää valkoinen hetero on kirjaimellisesti vainotuin "vähemmistö" – ihan epäironisesti. Toivoipa jo että kaikki vähemmistöt yksinkertaisesti katoaisivat jotenkin taianomaisesti, ei ilmeisesti kehdannut vielä julkisesti unelmoida mistään Endlösungista.
Persututtuja on nykyään enää todella vähän, ei ole puolin eikä toisin ollut kauheasti intoa olla tekemisissä enää toviin, tämmönen sateenkaareva hörhö kun olen ja heillä mielipiteet olleet jo tovin sitä luokkaa että mulla ei tartteisi olla ihmisoikeuksia lainkaan
How can they not see this is what's coming‽
Anybody know who the original author is?
Author: https://www.instagram.com/adamtots/