Editing eps files on a Mac

Scott and I need to edit some .eps files. Scott has Adobe Illustrator. I do not. Adobe no longer sells Illustrator. Instead Adobe offers a subscription for $21/month. They also offer a free trial. Given that I edit documents infrequently, I don’t want to pay for a subscription. (It cost over $200 before they switched to a subscription which is also more than I want to pay for my infrequent access.) For a while, Scott was editing all the documents to get around this problem.

Viewing eps files

This is easy. Viewing eps files works in Mac Preview

Creating/editing eps files

Inkscape allows creating/editing eps files (and svg files and other formats.) It works on most operating systems.

Here’s how I installed it on my Mac. (I donated money to Inkscape. But not $20 a month!)

  1. Install XQuartz
  2. Install Inkscape
  3. Log out and log back into Mac

Using Inkscape to create a file

The basic tutorial on the tutorials page gave me everything I needed to get started. It took a little time to get used to zoom mode being enabled when I wasn’t expecting it and selecting elements. But I was quickly able to create my image and exporting it to an eps file.

Using Inkscape to open a file

Inkscape gives an error when trying to open a file:

Failed to load the requested file xxx.eps

Luckily, there is an easy workaround. Macs can open an eps file in preview mode. You can save that to PDF and then open the PDF in Inkscape. I was able to edit the shapes and text from the imported PDF. Thank you to this blog post for the tip!

converting word to markdown

Scott and I used Microsoft Word for our Hands On Lab at Oracle Code One. This worked “mostly” fine. The quotes are because we had a one merge conflict when writing the instructions.

At the conference, an attendee (Barry Evans) said he had some improvements to the docs and he’d submit a pull request. Less than useful in Word so I asked him to email me with change tracking. i thought better of that and decided to convert to Markdown.

It wasn’t as bad as I thought:

  1. First, I used the Word to Markdown converter to do a first level pass
  2. Then I manually split it into a page per step (cut/paste) and changed the table of contents to links.
  3. Next, I converted the images to local ones in the repo.
  4. Finally, I did cleanup on code that didn’t format right, lists that were broken and using better code tags.

I used Visual Studio Code as the markdown editor. (I’ve been trying to get more comfortable with VS Code). I learned:

  • Having the markdown file in the left pane and a split view with the preview is nice. They even stay in sync with content/paging.
  • Command up/down goes to the top/bottom of the doc.
  • Home/End goes to the beginning/end of a line.
  • You can test markdown links directly in the preview editor.
  • The preview editor shows images so I could easily spot typos.

I tagged the repo version with the Word doc in case I ever want to go back to what it looked like.

 

cleaning up docker

It’s been a while since I used Docker on my machine so I decided to clean things up. When I launched Docker, it prompted me to upgrade. Half a gig but easy to get that out of the way at least.

Then I ran “docker images” and was reminded that I haven’t done a good job of keeping this clean. I had:

  • the original docker-whale play
  • a bunch of experiments from when I didn’t know what I was doing (some of which have unnamed layers so I don’t even know what they are)
  • some Java 9 early access edition stuff
  • following along with the “Kubernetes in Action” book when I was the Technical Development Editor
  • a lab I went to

Note: i’m not sure if any of this is a good way of doing things. But it worked for me.

Deleting the images the slow way

Yuck. I decided to delete all the images. For some, it was easy. Just run “docker rmi <imageHash>”.

For some, I got

Error response from daemon: conflict: unable to delete xxx (cannot be forced) - image has dependent child images

I also tried running “docker rmi $(docker images -a -q)” to delete all the images. This deleted some, but gave the same dependent child images error.

Great, I don’t know what they are.  Luckily, StackOverflow had a command to find the children.

for i in $(docker images -q)
do
    docker history $i | grep -q xxx && echo $i
done | sort -u

I also got:

Error response from daemon: conflict: unable to delete xxx (must be forced) - image is referenced in multiple repositories

For these, it was just a matter of running “docker -rmi –force xxx.”

Deleting the images the fast way

I deleted the rest of the images with:

“docker rmi –force $(docker images -a -q)”

Containers and volumes

I did a far better job of cleaning these up!

docker ps -a

docker volume ls