Pyut 6.7.0 Release

Pyut 6.7.0 Released

 It is a UML class diagram editor.

Included a few usability enhancements as noted by the following issues:
* 330
* 369
* 405

Additionally,

Updated to software license from GPL 3.0 to AGPL 3.0.
Discontinued support for version 8 and 9 of the .put file format.
Updated the Edit submenu menu items to properly conform with Apple guidelines

See the full release notes at:

https://github.com/hasii2011/PyUt/wiki/Version-6.7.0

Download at:

https://github.com/hasii2011/PyUt/releases/tag/6.7.0

Manually Mount/Unmount Disks on OS X

Introduction

I like to have several disks plugged into my Mac-book M1 docking station. However, I do not like to have them actually mounted at all times because occasionally the USB hub or the Mac powers itself down and then the OS issues the dreaded “Disk Not Ejected Properly”. For Time Machine disks this is particularly onerous because of how hard it is to properly “repair” them.

The Hard Way

In the past, I would keep the ubiquitous graphical disk utility that OS X provides active on my dock. Then as depicted in the following figure, I would mount and unmount the various drives.

To me this is tedious and necessitates keeping the application active and constantly interacting with it.

The Easier Way

Disk Identifier

OS X has a shell command that you can access via its Terminal application. Since, I am a developer and constantly access the terminal application to check-in, build, and/or run other developer tasks it is a natural fit for me to mount/unmount disks via the command line.

This magical command is named diskutil. The simplest format of the command to mount a volume is

diskutil mount DiskIdentifier

Where do you find the disk identifier for a particular disk you wish to mount. For that we go back to the graphical disk utility, See the following figure.

The fully qualified disk identifier is /dev/disk5s2. The full command specification is:

diskutil mount /dev/disk5s2

Shell Alias

Now the above seems quite verbose compared to a few simple clicks. However, I now give you the magic of shell aliases. I use the bash shell. In this shell you can specify a text shortcut, aka an alias for a long command like the above.  The easiest way to enable these for bash is to place them in your .bash_profile. This file is in your home directory.  My home directory is

/Users/humberto.a.sanchez.ii

I place the following two lines there:

alias mountg='clear; diskutil mount /dev/disk5s2'

alias umountg='clear; diskutil umount /dev/disk5s2'

From this point forward to mount the disk named SuperGiganto, I type

mountg

To unmount it I type

umountg

Tasks to Set up new M1 MacBook Pro

These notes document the actions I needed to re-setup my new MBP to use as

  • Productivity Computer
  • Python Developer
  • Java Developer

These steps are not intended to be used in this particular order. They are simply a set of notes of the steps I needed to get the task done. This helps me remember what customizations are on the M1 MBP. Additionally, other users/developers can zero in on particular applications to know what challenges they will have when they migrate form an Intel MBP to an M1 MBP.

Initial Attempt

I intended to manually restore my new MBP so as to explicitly know the customizations. Also, I did not want to get any cruft from a TimeMachine restore

Initiallly I used Time Machine (via the Migration Assistant) to move everything. It left all of my of Intel apps that it proposed to run with Rosetta2; Currently, I am refusing this option (25 May 2022)

I reset because I wanted a case-sensitive APFS. I manually reformatted the internal drive as case-sensitive APFS. However the installer reformatted it as case-insensitive and the install paused on activation. I had to connect my MBP via my ethernet wired connection. Install then activated the OS. I then went back to wifi

Second Attempt

The OSX installer reset my disk to case-insensitive. I left it alone. Once OS X installed I only reloaded my data from my latest time machine backup. The results were better because migration assistant transferred all of my archived mail.

HomeBrew

On Intel platforms, HomeBrew installs at /usr/local/bin with symlinks to ../Cellar on the Intel platforms

It avoid conflicts on M1 Macs by installing at /opt/homebrew/bin with symlinks to ../Cellar

This is in case you want to keep the old Intel binaries and run them with Rosetta2.

I uninstalled the old intel brew.

However, many of my scripts have #!/usr/local/bin/bash

So instead of changing all of my scripts I created a symlink

# Assume the current directory (<em>cwd</em>) is /usr/local
sudo mkdir bin
sudo chown humberto.a.sanchez.ii bin
# Now cwd is /usr/local/bin

ln -s /opt/homebrew/bin/bash bash

Left over crud from old Intel apps

I used cleanmymacx to clean up crud left over from migration assistant not installing the old Intell apps

Since I did not install any apps I had to re-install the mac apps

  • Numbers
  • Pages

Apple Developer

I needed to store my Apple app signing credentials in my local keystore again.

xcrun notarytool store-credentials APP_PASSWORD --apple-id humberto.a.sanchez.ii@gmail.com --password XXXXXXX --team-id NA8Z96F8V9

Printer

I search and found it on our network and installed it via System Preferences, easy peasy.

Applications

The following is a list of applications I had on my original MBP. I re-installed only things I currently needed. The notes on each application describe the process. If I did not re-install it there are no notes

  • 1Password7
    • I needed to log into my.1password.com and get the new M1 app
    • I downloaded chrome to install password extension
    • The Safari extension was already installed
  • balenaEtcher – They had an unofficial M1 version that worked for me.
  • Chrome – re-download
  • Beyond Compare
    • Only Intel version available
    • M1 version in the works
    • Not used
  • CleanMyMac X
    • I Disabled the key on the 2016 MBP
    • The App must be universal as it just correctly executed
  • DB Browser for SQLite
  • Day One – Re-installed from App Store
  • DuckDuckGo – installed from Safari
  • FreeFileSync
    • Simple re-install
    • Fixed where the installer placed the binary with the following: ln -s /usr/local/bin/freefilesync /opt/homebrew/bin/freefilesync
  • Garmin Dash Cam Player
  • Garmin Express
  • Gemini 2 – Downloaded and deactivated on the old laptop and activated it on the new
  • Gimp-2.10
  • Google Chrome – Easy Install
  • HandBrake – Universal Binary
  • Image2Icon
  • IntelliJ IDEA – Downloaded the ARM binaries
  • kdiff3
    • brew intel app requires Rosetta 2
    • Not using
  • Keka
  • LibreOffice – Simple install download with updated .dmg
  • macDown
    • Installed via brew
    • brew install --cask macdown (intel binary)
    • Will not use
  • MakeMKV – easy install must be a universal binary
  • MakePass
  • Movavi – Seems like only the Intel version exists (ARM version in progress, will wait)
  • mu-editor
  • PaintBrush – Download and re-install
  • PlayOn Cloud Downloader
  • Pock – Not necessary since M1 does not have a touchbar (thank the lord)
  • PyCharm CE – Simple Install of new .dmg
  • Prime Video
  • qBittorent
  • Rectangle
  • Seashore
  • ShotCut – Downloaded M1 version
  • Shottr – Downloaded M1 version
  • SmartGit
    • Downloaded M1 version
    • Installed new GitHub keys
  • Snagit 2021
    • Downloaded via purchased e-mail link
    • License key in e-mail
    • Installed a kernel extension; Granted lots of permissions (camera, screen capture, etc)
  • Tiled
  • Todoist – Simple re-install (universal binary)
  • Tuxera Disk Manager
    • Installed new version
    • Used previous key
    • M1 Mac has a new way of enabling kernel extensions, had to do that
  • VLC – has an ARM version (Yippee)
  • VNC Viewer
  • VSCodium — brew install –cask vscodium
    • Had to edit /etc/shells; Had /usr/local/bin/bash (from old install)
    • edit /etc/shells to add /opt/homebrew/bin/bash
    • did: chpass humberto.a.sanchez.ii to change bash from /usr/local/bin/bash to /opt/homebrew/bin/bash
    • rebooted
  • WordPress
  • Xcode. 13.x – Installed via App Stre
  • Xmind – loaded new version
  • Yoink – re-installed from App Store
  • Zoom
    • reinstalled by opening a meeting link and asking to install
    • Needed Rosetta 2
    • I will use the browser version (ugh)

Uninstall old homebrew

I needed to manually remove brew using these instructions:

https://ralphjsmit.com/uninstall-homebrew

then reinstalled using these:

https://ralphjsmit.com/install-homebrew-macos

Homebrew asked me to do this:

Read the analytics documentation (and how to opt-out) here:
https://docs.brew.sh/Analytics
No analytics data has been sent yet (nor will any be during this install run).
==> Homebrew is run entirely by unpaid volunteers. Please consider donating:
https://github.com/Homebrew/brew#donations
==> Next steps:
– Run these two commands in your terminal to add Homebrew to your PATH:
echo 'eval "$(/opt/homebrew/bin/brew shellenv)"' >> /Users/humberto.a.sanchez.ii/.bash_profile
eval "$(/opt/homebrew/bin/brew shellenv)"
– Run brew help to get started
– Further documentation:
https://docs.brew.sh

Had to change the terminal to use /bin/bash in order for the two eval commands to work

Brew asked me to do this:

softwareupdate --all --install --force

What I Installed with Brew

  • /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"
  • ffmpeg
  • git
    • Xcode installed version 2.32.1
    • I overrode the above by installing the new brew version 2.36.1
  • epr – This is a Ruby Gem
  • espeak – brew install espeak
  • sqllite
  • heroku
  • cowsay – brew install cowsay
  • direnv
    • brew install direnv
    • Updated /etc/paths to remove /usr/local/bin added /opt/homebrew/bin
  • mp3check
  • openjdk
    • I need this for antlr
    • Set the following in my .bash_profile
      • export PATH="/opt/homebrew/opt/openjdk/bin:$PATH"
      • export CPPFLAGS="-I/opt/homebrew/opt/openjdk/include:$CPPFLAGS"
      • sudo ln -sfn /opt/homebrew/opt/openjdk/libexec/openjdk.jdk /Library/Java/JavaVirtualMachines/openjdk.jdk
  • pyenv - brew install pyenv
    • Needed to brew install openssl after running pyenv doctor
    • Needed to put the following in .bash_profile export PATH=”/opt/homebrew/opt/openssl@3/bin:$PATH export LDFLAGS=”-L/opt/homebrew/opt/openssl@3/lib” export CPPFLAGS=”-I/opt/homebrew/opt/openssl@3/include”
    • Manually uninstalled all the version that got copied over pyenv uninstall 3.9.9, etc, etc
    • Python 3.9.1
    • Python 3.9.9

Customization files

All of these files were copied over via Migration Assistant

  • pyut.ini
  • EPR_TOKEN.txt
  • pytrek.ini
  • ogl.ini
  • gitmessage.txt
  • mac-hist.txt
  • .gitIssueClone.ini
  • .gitConfig
  • .bash_profile
  • .bash_history
  • vaadin.designer.developer.license

Directories Under Home

Migrated via Migration Assistant

  • svnclones
  • scripts
  • pyut-diragrams
  • PycharmProjects
  • Movies
  • IdeaProjects
  • gitclones
  • EclipseNeonWorkspaces

Show dot files

I like to see the entire file system

defaults write com.apple.Finder AppleShowAllFiles YES killall Finder

Terminal

  • Had to manually put zsh as default shell as brew had changed it to /usr/local/bin/bash

Miscellanous developer tools

Export pull requests (epr)

sudo gem install export-pull-requests

Installed in /usr/local/bin; Not in path. I put in a symlink from /opt/homebrew/bin

## cwd is /opt/homebrew/bin
ln -s /usr/local/bin/epr epr`

pdftotext

See https://github.com/jalan/pdftotext

Used by my pyumldiagrams python library to compare pdf files.

brew install pkg-config poppler. (large large large brew install) pip install pdftotext

metamenus

wxPython for the metamenus project

Could not install wxPython w/o help from developers; Unlike all the other apps like gittodoistclone and Pyut that installed like a champ. See the instructions

pip install ../../Documents/BetterDownload/wxPython-4.1.2a1.dev5412+727f3aff-cp39-cp39-macosx_12_0_arm64.whl


Updated 18 June 2022 to correct many many typos and grammar errors;  Also, updated some entries as I gained more information

Python 3, Flask and SQL Alchemy to display FitBit data

This is an updated entry. The original entry from 2020 was fraught with errors. It was partially finished. I took the opportunity to update the software stack to Python 3.9.9 and the latest dependencies. They are now captured on the GitHub repository as noted in the document. Apologies to mobile readers of this site. I tend to post mostly PDFs to get the superior editing capabilities of LibreOffice. Additionally, I can revise the document and post new updates. It also lets me keep control and ownership of the original digital documents.