Show N'Tell: AcquisitionsEditor.py
Fred Zimmerman
algorithmic book publishing. Getting too much message spam here, pls. use contact form at NimbleBooks.com if you want to chat about work.
Maintaining relationships with authors is an important task for publishers, but it can be challenging, and takes a lot of attention to detail. I’m sorry to admit that I have my ups and downs on that score, and sometimes I drop the ball; so this weekend I created a Python class to put me on a smoother upward trajectory. I’ve been working on automating publishing workflows for twelve years now—about time to become an overnight success!—and I was impressed by how far I was able to get in a couple of three-hour sessions adding up to 7 hours 12 minutes. I’ve come a long way, but more importantly, so has technology: OpenAI and Github Copilot may not have made me “10x” more productive, but I’d say it was near “5x”.
Goals, Design, and Scope
My goal was to set up an automated tool that will “touch” every contracted author on a regular schedule and will help me ensure that all mutual commitments are met on time. Practically speaking, I was envisaging a Python script that I could run using?launchctl, the MacOS replacement for the?cron?scheduling utility for *nix systems. I had a pre-existing design that provided a helpful context:?BookPublisherGPT,?the python library that is the latest incarnation of the algorithmic publishing systems I began building with PageKicker. BookPublisherGPT (or?bpg?as I abbreviate it) contains a number of classes, including one that I call Masthead. Masthead contains agents whose role corresponds to familiar publishing job titles. To this structure, I added AcquisitionsEditor.
BookPublisherGPT
classes
...
Masthead
> AcquisitionsEditor
ContributingEditors
CopyEditor
Editor-in-Chief
...
Metadata4CodexBooks
SyntheticReader
...
Defining the scope of the role required a bit of research. When prompted with
In book publishing, what is the name for the editor who is responsible for managing relationships with authors?
Google Bard offered three drafts by default (something that costs extra with the OpenAI API that I normally use). I started with this one:
The editor who is responsible for managing relationships with authors in book publishing is called the?Acquisitions Editor?or?Acquisitions Manager. They are responsible for finding new authors and their manuscripts, evaluating their work, and negotiating contracts. They also work with authors to develop their ideas and help them to produce the best possible books.
In some publishing houses, the Acquisitions Editor may also be responsible for editing the author's manuscript. However, in larger houses, this role is typically handled by a separate editor.
The Acquisitions Editor is a key member of the editorial team and plays a vital role in the success of a publishing house. They are responsible for finding the next great books and helping authors to bring their stories to life.
Here are some of the responsibilities of an Acquisitions Editor:
I tend to think of scouting for new talent as part of my role as Publisher, and evaluating manuscripts is handled mostly by the Synthetic Reader class. I also already have a CopyEditor agent who is responsible for taking the manuscript from acceptance to publication. So define the AcquisitionEditor’s role more narrowly: once the manuscript has been handed “over the transom”, the AE is only responsible for seeing that the main contractual deliverables occur, and that the author is happy at and after publication.
Objects, Methods, and Functions
I typically separate a Masthead member class into four or more modules, like so:
classes/Masthead/AcquisitionsEditor # directory
../../AcquisitionsEditor.py - the class, its objects and methods
../../AcquisitionsEditorUtilities
../../acquisitionseditor2email.py - command line that sends emails on behalf of AE
pages/Acquisitions_Editor.py - a presentation layer that provides web UI using Streamlit - stored in a top level directory parallel to classes/
There are three objects that are central to the AcquisitionsEditor class: the?contractable_work,?a document; the?contractable_works_dataframe (cwdf); and?EditorActions,?a collection of actions the automatic AE can take.
In this “0.1” version I’ve deliberately kept the attributes of?contractable_work?to a minimum:
title,?author,?original_ms_filepath,?status,?contract_acceptance_date,?contract_offer_date,?contract_signed_date,?manuscript_due_date,?manuscript_acceptance_date,?publication_actual_date,?final_publication_assets_filepath
Getters, setters, and deleters can operate on?contractable_work?(document) attributes one at a time. Batch operators are also available to fill in missing values, etc.
The ContractableWorksDataFrame subclass is focused on creating the dataframe and manipulating it by filling in missing values, sorting, and so on.
I save the cwdf in a simple csv file, which I read and edit using LibreCalc because it handles csv files more cleanly and consistently than Excel.
The?EditorActions?subclass contains the main author-facing functionality, including daily, weekly and monthly status checks; reports on pending, complete and overdue tasks; and LLM prompts composing letters to authors. Similar subclasses of “all at once” actions are found for other classes in?Masthead?such as?CopyEditor?and?MarketingManager.
I use an OpenAI prompt and the?gpt-3.5-turbo?model to compose a letter to each author:
领英推荐
You are writing a pleasant, professional letter to the author of a book that is under contract with your publishing company. The purpose of the letter is to update the author on the status of the book, whose contract details are provided below.
RUN, SPOT, RUN! by C. Beagle is accepted and awaiting c/e.
In exactly three complete paragraphs, reiterate your enthusiasm for the book as it stands and your desire to see it published. Do NOT encourage the author to revise the book. Thank the author for his or her patience and cooperation. Provide the author with bulleted suggestions on how to prepare for the book launch.
A command-line script called?acquisitioneditor2actions.py?opens the saved?cwdf?and relies on the status info in the dataframe to select the appropriate?EditorActions?methods.
Then, the fun part …
I run this script from the command line:
$ python classes/Masthead/AcquisitionEditor/acquisitioneditor2actions.py
and it:
Here is a sample draft. (I treat myself as a contracted author for books I have made public commitments to write.) GPT-3.5 is over-the-top sometimes, so I usually edit these letters along the lines illustrated
Dear Mr. Zimmerman,
I hope this letter finds you well. I am writing to update you on the status of your upcoming book,?The State of the Art of Algorithmic Book Publishing 2024 (SOTABOOK).?We at Nimble are eagerly awaiting its manuscript and are thrilled about working with you towards its successful publication. Your unique?storytelling style?ability to procrastinate?has left an indelible impression on us, and we firmly believe that your work will be a valuable addition to the?literary?publishing?world.
We would like to express our sincere gratitude for your patience and cooperation throughout this process. Publishing a book is indeed a journey that requires time, dedication, and understanding from all parties involved. Your professional demeanor has made it easier for us to navigate through this process smoothly. Rest assured that we are doing everything in our power to ensure the success of?SOTABOOK.
As we move closer to the launch date of your book, there are several things you can do in preparation:
Once again, thank you for entrusting us with bringing SOTABOOK into print. We look forward not only to its successful release but also witnessing reader’s appreciation of your?exquisite narrative?unique?skillset.
While opinions will vary about the verbose style of this letter, I hope we can all agree that it is darned useful to push a button and have eight of these in my outbox ready to edit and send.
TK
Some of the code will follow in an email for paid subscribers on Substack.
To come in future releases of this class:
TALK TO ME
Do you want more Show N' Tell? More AI? More books? More business?
Cordially,
Fred Zimmerman