Friday, May 8, 2020

How to Put a the Bing Image of the Day as Your Mac Wallpaper


I like going to bing.com due to the great images that are featured on the webpage, that change daily. For Windows 10, there's even a Bing Wallpapers app that will put the Bing Image of the Day as your computer screen's desktop wallpaper. Unfortunately, for Windows 7 and Mac users, there is no official app that can do this.

For Macs, there is an app in the App Store called Bing Wallpaper or something like that, that costs $4.99. I did some research and created my own app to accomplish this using a Python script and iCal Automator event. I have never used Python before but have made iCal events.  Here's what I did:

I got a Python script called bing.py from:
https://github.com/declangao/Bing-Wallpaper-for-Mac

Thanks, declangao! Here's the description:
"A simple Python script capable of batch-downloading and setting Bing picture of the day as wallpaper on your Mac OS X."


I then did some research on how to run a Python script on my Mac. It was easy. I learned a bit about MS-DOS and command lines back in my college undergrad days, so I know how to use Teminal commands on a Mac.

To run a Python script on a Mac using Terminal:
change directory to your desktop: cd Desktop
run the Python script: Python bing.py (or your own simpler filename.py) [.py file must be on Desktop]

I ran the Python script and my Mac wallpaper did indeed change to the current day's Bing wallpaper. So the script worked!


Next:
To create a Python Unix executable file, that opens a new Terminal window and executes a Python file: generally follow these directions:

https://martechwithme.com/convert-python-script-app-windows-mac/#formac
https://martechwithme.com/schedule-python-scripts-windows-mac/#formac

martechwithme.com's directions had me create a new text file and input these lines:

#!/bin/sh
Python /Users/norbertwu/Documents/Python_test/test.py  [I created a folder called Python_test in the Documents folder]

then save the file to the folder Python_test, save without an extension
in Terminal: enter "chmod 755 /Users/norbertwu/Documents/Python_test/test

This changes the permissions for the file so that it becomes a Unix executable file. However, I discovered that I needed to add the extension ".command" to this file, so that this would open a new Terminal window and execute the python commands.


So my steps were:
create a file called test_python and put the following text in it:

#!/bin/sh
Python /Users/norbertwu/Desktop/test.py [wherever the python script is located]


In Terminal, do the command chmod 755 on the test_python file.
Then rename the test_python file to test_python.command.

Done! By double-clicking the test_python.command file, a new Terminal window is opened and the Python script executes.


I opened the bing.py file and saw the first line was: #!/usr/bin/env python
So all I did was go to Terminal: cd Desktop [the file bing.py was on the Desktop]
chmod 755 bing.py

Then I changed bing.py file to bing.command (actually bingtest.command).
Thus, bing.command became an executable file.


Next, I used Automator:
martechwithme.com writes: Finally, if you want a real application file instead of a simple Unix executable that you will be able to schedule, we can do so by launching Automator.

Launch Automator: After launching the program, choose to create an “Application”.

In the list of actions on the left side, get the parameter “Get Specified Finder Items”. Once you added it to your right panel in Automator, you should be able to “Add” an item to this action. At this point, you want to browse through your files and select your Unix Executable.

After that, we need to add a new action, namely “Open Finder Items”. This will trigger to open the file selected previously in its default application.

All that’s left is to save. Choose a name that you will recognize and you will now have your own .app file ready to be launched! 

I ended with an Automator file called changeBingWallpaper.app which just runs the bing.py executable file.


You can create an iCal event that will run an AppleScript or Automator action at a given time, and have that event repeat at the same time every day.

I then created an iCal event (can do it in iCal or Automator): let's do it in Automator:
https://martechwithme.com/schedule-python-scripts-windows-mac/#formac has tips:

choose Automator, then New file -- Calendar Alarm.

This will create a separate calendar overlay in iCal, and put an event in there.

We then need to add an Alert. A “Custom” one precisely, following the screenshot below:

A Custom Alert allows us to set a different action at the time of event. One of these actions is “Open a file”

Choose the file .app you would wish to open once the event is triggered and set the “Alert” to trigger “At time of event”

Finally and to ensure that scripts are launched periodically, it is time to define the “Repeat” setting of the event.

You can hide the Automator calendar overlay, or show it, as you wish.


This opened a Terminal window every day at 8am, ran the Documents/Python_scripts/bingtest.command file and then left the Terminal window open.

To close the "hanging" Terminal window: I went to Terminal preferences: choose "close when script exits."
I did not want a notification window or to see the iCal window after this iCal event, so I did the following:
no iCal notifications in System Preferences and/or in the iCal Automator calendar, right click, turn off Alerts


There are a ton of other ways to do this, involving various programs like LaunchControl, etc.

Even Fidelity Investments Lies and Puts Links in Emails!

I've been a client of Fidelity Investments for many years.  They generally try to hold themselves to a fairly high standard, but like all companies, are constantly trying to get me to get paperless statements.  My banks are bad about this too -- every other time that I log into my bank's website, I get a popup asking me to go paperless before I can do my banking business online.  It's irritating.

However, today I got an email from Fidelity that is just too duplicitous.  Obviously, it's another attempt to have me go paperless (which saves them money, since they don't have to mail me statements).  But come on!  Don't use a deceitful reason to try to get me to go paperless!  Take a look:


"We’ve heard from many clients that they are concerned with receiving paper mail in this current environment. If you’re concerned as well, you have an alternative. You can switch to eDelivery—it’s safe, it’s easy, and it offers many other benefits as well."


This is such a load of crap! No one is worried about getting the virus in the mail. Don't lie and treat your customers like idiots. We customers can simply not touch paper statements or trash them! We know that we can get electronic statements by going to your website, but we want paper statements! Quit trying to get us to go e-delivery!






Not only does Fidelity lie in this email to its customers, but it has at least three links that ask you to "Agree" or log into your account. This, after Fidelity and all banks repeatedly tell customers to NEVER click on a link in an email.


****
Here's what Fidelity says in this webpage:
https://www.fidelity.com/security/look-out-for-suspicious-emails

"Cyber criminals try to gain your personal information via numerous deceptive means such as legitimate-looking emails with fake web links, phone numbers, and attachments. This method of email fraud is called phishing.

Avoid opening links or attachments in an email you are not expecting. Phishing emails will often ask you for personal information in an effort to obtain access to your financial assets and identity. Responding with sensitive information (like account numbers, passwords or social security numbers) is never a good idea."


****
You can't trust any company in this day and age to actually have integrity. Not even Fidelity Investments.