On my mac running Monterey 12.7.6, Spotlight forgot all about the "printers and scanner" app and others.
Fixed it by issuing the following command:
sudo mdutil -ai on mdutil -Ea
I'm blogging about programming, but ... hey look over there - it's something shiny!
On my mac running Monterey 12.7.6, Spotlight forgot all about the "printers and scanner" app and others.
Fixed it by issuing the following command:
sudo mdutil -ai on mdutil -Ea
I went to a seminar on how to get rid of all your extra stuff, kinda like Maria Kondo.
Here's the tips I learned:
1. Whenever you buy something, throw something else away.
2. Distribute legacy items now. Don't wait until later to give your kids your grandparents heirlooms and jewelry.
3. But, don't give family heirlooms to people who don't want them.
4. Donate, Donate, Donate - just get rid of all that stuff in your house.
5. Go thru your pantry and throw away expired food. Food started having expiration dates in 1984, so if an item has not expiration date, throw it away.
6. NOK - stands for Next of Kin. Have a folder with all the information for the people you leave behind with all the info they need - names of lawyers, accountants, brokers. And be sure to tell multiple people where that folder is. And where your will is.
7. You can donate art supplies to places like the Austin Creative Reuse organization.
8. Label all your keys.
9. List of friends to invite to your funeral.
10. Nobody wants your stuff - like this trophy from Toastmasters from 1983. Just take a picture of it, tell your family about it, and donate it so it can be disassembled and reused now.
I just picked up a tube of Mometasone Furoate from CVS. Cost me $44.21. I came home and checked on CostPlusDrugs.com. It's on $14.15 for the same amount and strength. Next time I'll wait and check CostPlusDrugs.com and GoodRx.com before having my doctor phone it in to CVS.
AESOR ILTNU DCYMPHBGKFWVQJXQ
How to find what words contain AESOR?
We can use the tool "grep" on unix with something like this which finds all five letters words with AESOR.
[Trigger warning: actual unix tools code😱:]
grep "^[a-z]\{5\}$" /usr/share/dict/words | grep a | grep e | grep s | grep o | grep r
One word pops out: “AROSE”.
DCYMPHBGKFWVQJXQ
using System; using System.Diagnostics; namespace ImageDescriptions { public class Utilities { public static string? executeShellCommand(string scriptFile, string arguments) { var processInfo = new ProcessStartInfo() { FileName = scriptFile, Arguments = arguments, UseShellExecute = false, RedirectStandardOutput = true, CreateNoWindow = true }; string? result = string.Empty; Process process = Process.Start(processInfo); // Start that process. while (!process.StandardOutput.EndOfStream) { result = process.StandardOutput.ReadLine(); System.Console.WriteLine("result: " + result); } process.WaitForExit(); return result; } ///Here's a program that reads a data file and then calls "SetTags()":/// Sets tags on a file in OS X. /// This is really awkward and brittle. /// /// Comma separated list, e.g., "red,black,green" /// file to which we add tags public static void SetTags(string? tagCsv, string filename) { System.Console.WriteLine($"SetTags: '{tagCsv}', '{filename}'"); var tagXmlString = string.Empty; if (tagCsv == null || String.IsNullOrWhiteSpace(tagCsv)) { return; } var tags = tagCsv.Split(','); foreach (var tag in tags) { tagXmlString += "" + tag.Trim() + " "; } var scriptFile = "/usr/bin/xattr"; var arguments = " -w" + " com.apple.metadata:_kMDItemUserTags" + @" """ + @" """ + " " + filename; System.Console.WriteLine($"executeShellCommand: {scriptFile}, {arguments}"); Utilities.executeShellCommand(scriptFile, arguments); } } }" + tagXmlString + @"
using ImageDescriptions; public class ImageDescription { public static void Main(string[] args) { if(args.Length < 1) { Console.WriteLine("usage: ImageDescriptionA line from the data file looks like this:"); Environment.Exit(1); } string filename = args[0]; FileStream file = File.OpenRead(filename); var lines = File.ReadLines(filename); foreach (var line in lines) { Description description = new Description(line); Console.WriteLine(line); Console.WriteLine(description); Utilities.SetTags(description.tags, description.name); } } }
2013-01-23-0702-IMG_8252.jpg "Dessert pie with fruit -tags:dessert,fruit,healthy,pie"
I'm playing with tags for labeling photos and found this MacOs command to search for all files with a tag, like "awana":
mdfind 'kMDItemUserTags == "Awana"'
By the way macos tags are stored in the binary file '.DS_Store' in the same directory as your files, and as an Extended Attribute (EA) of the file.
I've been working on my greatgrandmother's photos and find jewels from 1910 like this one:
Unfortunately, many of the photos from 110 years ago do not have any names written on the back.
As I think about how to preserve my family's story for the next 110 or 300 years, I'd like to write the description on the back of my digital pictures by injecting EXIF image descriptions into the photos themselves.
To do this I downloaded the free command line tool "exiftool" for my mac.
Then, I added photo captions into jpeg files with this command:
exiftool -imageDescription="My image description" mypic.jpg
but got errors like this:
"Error: Bad format (0) for IFD1 entry 0"
I purchased the tool "metaImage" from the Mac store to add descriptions into the jpeg, but it wouldn't inject the caption into my files. I contacted their tech support and got a quick solution.
Jérémy Vizzini from neededapps.com (creator of "metaImage") solved the problem for me. The issue was my jpeg files were corrupt. (Some of the photos were from 2003, so the EXIF standards may have changed, or not have been rigoriously followed decades ago). Jérémy gave me this snippet of exiftool code to fix the jpeg:
exiftool -all= -tagsfromfile @ -all:all -unsafe -icc_profile mypic.jpg
This fixed the problem. Thanks Jérémy! Now my jpegs will be ready for the next 300 years.
How do you archive your photos to preserve them for 300 years?