When I started writing my book, Practical Automation with PowerShell, I discovered how much time and energy is required to keep everything up to date. For example, if I changed a piece of code in the text, I had to make sure the code sent to the publisher and uploaded to GitHub matched. Not to mention the style guidelines I needed to follow.
Or, if I included a screenshot or diagram, I had to upload the original to another folder named to match the chapter and figure number in the book. As you can imagine adding, changing, or removing anything during the editing process would create a laundry list of other things I would need to check. And this is where PowerShell came to the recuse.
I used PowerShell to help me keep track of code, images, my table of contents, and numerous other portions of the book writing process. So, I thought I would share with you some of the code and techniques I used during the authoring process.
While you might not be writing a book, you may certainly find some of these useful in your day-to-day scripting needs.
Each post in this series will be linked to and detailed below. Be sure to check back often for updates.
Working with Images
- Comparing Images â The first post in this series is a function that allows you to compare two images. During the writing process, I had to ensure that the pictures in my Word documents matched the files I had uploaded to the publisher. This function allowed me to compare the two and ensure everything matched.
- Extracting images from Word – This post will show you have to use PowerShell extraction images from a Word document, copy them to a new location, and list the caption information for each image.
- *Converting Visio to PNG and SVG – During the writing process I had to create many Visio diagrams. Each diagram I created had to be embedded in the Word document as a PNG and I had to supply the graphics team with an SVG version. So, I wrote this function to export all Visio diagrams in a folder to PNG and SVG.
*newest post in the series
Up Next â Comparing Word documents â Ever end up with two copies of the same Word document? Well this post will show you how to use PowerShell to quickly find the differences between them.