The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

rickumali (134) [Avatar] Offline
I've decided to write a short blog-type post every week here on this forum. These posts are exclusive to this forum, and they will primarily be about the writing of the book.

There are over 330 figures and screen shots in this book. I know because not only did I make the figures or take the screenshots, I also had to rename these files.

When I first started this project, and I had to draw a figure or take a screenshot, I saved the corresponding file into something that made sense to me at the time. For example, figure 1 in chapter 1 is from a file named single_point_of_contention.png. Easy enough!

But a few chapters later, I learned that the production process demands that all figure and screen shot files follow the convention CC_NN. CC is for chapter, and NN is for the figure number in that chapter. So single_point_of_content.png had to be renamed 01_01.png. Again, easy enough: a renaming exercise.

However, I realized I had a severe issue after I learned I needed to renumber certain chapters and figures. This does happen in the editing process. 01_01.png might end up being 02_01.png. Or vice-versa! It led to a momentary bit of insanity. I realized I needed a script that could do the renaming on-demand.

The first few lines of that script:

# Chapter 01 - Before You Begin
cp single_point_of_contention.png $image_dir/01_01.png # Frowny faces
cp distributed.png                $image_dir/01_02.png # Happy faces

# Chapter 02 - An Overview of Git and Version Control
cp vc-personal.png                $image_dir/02_01.png # Revs not Vs
cp vc-personal-with-saves.png     $image_dir/02_02.png

With this convention, I still save files with an easy-to-remember name, but when I need to rename them, I run the script and generate the correctly named files. Any renumbering can be done by editing the script. (Unfortunately, it's not as easy in a Word document. Renumbering figure captions was a tedious slog.)

I haven't had to deal with actual production folks yet, but I'm hoping this saves my sanity about a month from now!

Thank You everyone, for reading.

There won't be a BLOG post next week, due to the American holiday known as the Super Bowl.