Package: abk-bwp
Bing Wallpaper (currently MacOS only)Downloads daily Bing images and sets them as desktop wallpaperConfiguring the appPlease see the file abk_bwp/config/bwp_config.toml file. There are some setting you might want to change.
Like the image size, which should ideally correspond to the size of your display.
In the config file you will find also detailed explanation, what exactly each configuration item is for.Installing python dependencies:Installing with pyenv + virtual environment (Recommended)If you are like me and don't want to mix your python packages, you want to create python virtual environment before installing dependencies.
I use pyenv tool for that. Here are the steps on MacOS:install brew. Google for it if you don't have it alreadybrew install pyenv - will install pyenv toolbrew install pyenv-virtualenv - installs virtualenv pyenv versionpyenv versions - will show you currently installed python versions and virtual envs on your systempyenv install --list - will show you all available python versions you could install.pyenv install 3.8.9 - installs python 3.8.9 versionpyenv virtualenv 3.8.9 bwp - creates virtual environment [bing wall paper] with python 3.8.9cd <your_project_dir> - change into your project directory e.g.: cd abk_bwppyenv local bwp - setting the current directory to use [bwp] virtual environmentmake install - will install all needed python dependency packages into [bwp] virtual environment.make bwp - will download bing image and add title to the imageInstalling without pyenv or python virtual environmet. Note the app does not run with python 2.7If it is too many steps for you and just want to get it working "quick and dirty".
Warning: there might be some python packages, which might collide with already installed packages.cd abk_bwp - change to the project directorymake install - to install python dependency packages in default locationmake bwp - will download bing image and add title to the imageMakefile rulesThere are some Makefile rules, which are created for your convinience. For more help with rules type: make help
Here are some described in the tablemakefile ruledescriptionmake bwpexecutes the abk_bwp program, which dowloads Bing images and creates a desktop imagemake bwp_logexecutes the abk_bwp program, with tracing to the console and log filemake bwp_traceexecutes the abk_bwp program, with tracing to the consolemake bwp_desktop_enableexecutes the abk_bwp program, enables auto download (time configured in bwp_config.toml)make bwp_desktop_disableexecutes the abk_bwp program, disables auto download (time configured in bwp_config.toml)make bwp_ftv_enableWIP: executes the abk_bwp program, enables Samsung frame TV support (Not working yet)make bwp_ftv_disableWIP: executes the abk_bwp program, disables Samsung frame TV support (Not working yet)make installinstalls all required python packages for the appmake install_testinstalls all required python packages for app and additional packages to run the unit testmake install_devinstalls all required python packages for app and additional for test and developmentmake testruns unit testsmake test_vruns unit tests with verbosity enabledmake test_ffruns unit tests and fails fast on the first broken testmake test_vffruns unit tests fails fast on the first broken test with verbosity enabledmake test_1runs one specific unit testmake coverageruns unit tests with coveragemake coverageruns unit tests with coveragemake cleancleans some auto generated build filesmake settingsdisplays some Makefile settingsmake helpdisplays Makefile helpPython tracing:In order to debug python scripts, you could enable the traces in the
logging.yaml file by changing levels from CRITICAL to DEBUGScheduler / plist tracing / TroubleshootingThe project contains com.abk.bingwallpaper_debug.sh.plist file, which can be used to debug scheduler problems.Copy com.abk.bingwallpaper_debug.sh.plist to ~/Library/LaunchAgents/ directory.change to directory: cd ~/Labrary/LaunchAgentsload the scheduler with: launchctl load -w com.abk.bingwallpaper_debug.sh.pliststart the job with: launchctl start com.abk.bingwallpaper_debug.shcheck the job run: launchctl list | grep com.abk.bingwallpaper_debug.sh
if it return 0 the job ran successfullythe traces will be available in
/tmp/com.abk.bingwallpaper_debug.sh.stderr
and
/tmp/com.abk.bingwallpaper_debug.sh.stdoutafter troubleshooting don't forget to disable the job for the debug schedulerexecute following
launchctl stop com.abk.bingwallpaper_debug.sh
launchctl unload -w com.abk.bingwallpaper_debug.sh.plistdelete the debug file from ~/Labrary/LaunchAgents
rm com.abk.bingwallpaper_debug.sh.plist in: ~/Labrary/LaunchAgentsApp runs on:MacOS Monterey (local machine) / Python 3.10.6Linux Ubuntu 20.04  / Python 3.8.9Windows 10 / Python 3.8.9Pipeline Unit Tests ran on:Linux latest / Python 3.8.x, 3.9.x, 3.10.xMacOS latest / Python 3.8.x, 3.9.x, 3.10.xWindows latest / Python 3.8.x, 3.9.x, 3.10.x