Possible to automate formatting for a list of covid-19 articles?

Hello, I’m part of a team of physicians, PhD’s, and med students writing and publishing a daily summary of COVID-19 scholarly articles.

Right now formatting the summary burns a lot of time every day. I heard about drafts and am wondering if I can create an Action that would format the summary in the following way

The article summaries are always sent in as follows:
Title [hyperlink to Pubmed]
Date; PMID: ########
Summary (or) Summary Statement (or) BLUF: [Text]

[Sometimes, a full abstract is copied below, with headers, sometimes images are coppied with a header such as “Table 1,” or “Figure 1.”]

An example would be:
DIC in COVID-19: Implications for Prognosis and Treatment?
Seitz R, Schramm W.
J Thromb Haemost
2020 Apr 28; PMID: 32344469
Level of Evidence: 5 - Expert Opinion
Article Type: Letter to the Editor
Summary: The authors discuss the need for parameters to predict likelihood of developing disseminated intravascular coagulation in critically ill COVID-19 patients, and recommend closer investigation of bradykinin-mediated and complements/interleukin-mediated pathways.

[this article does not have an associated abstract or any flowcharts/images, but sometimes there will be an abstract or a figure below the summary, and sometimes not]

The actions I want to do are:

  1. All text: Single Spacing. In MS Office this seems to convert hyperlinks to plain text and change the font. I don’t want to get rid of the hyperlinks.

  2. All text: format to font “Georgia” and size 12.

  3. Title: Increase size to 14, change color to Blue, underline and bold

  4. Authors through date/PMID line: Change color to grey

  5. Summary line through the next title: Change color to black, bold headers (Just about every header will have the word “Summary,” “Summary Statement,” “BLUF,” “Abstract,” “Introduction,” “Methods,” “Results,” “Discussion,” “Conclusion,” “Table 1,” or “Figure 1.”

  6. Apply double spacing between Summary and Abstract, and between abstract/figure legend and title of next summary.

Would it be tough for a complete newbie (me) to create a script that could automate this process for the list every day?

1 Like

Drafts only works with plain text. A lot of the formatting you are asking for (colors, fonts, etc.) are only available in word processor style rich-text, so Drafts may not be a fit for you needs.

Drafts can slice and dice plain text all day long, and could markup your text in Markdown or similar, but it is not setup for processing Word-style documents.

Drafts really operates on plain text, and doesn’t provide a mechanism for changing MS Word formatting options.

You might see if you could automate this with Keyboard Maestro (assuming you’re on a Mac.)

Even if you don’t go the Keyboard Maestro route, you could make this process a lot faster using MS Word’s styles.

Awesome, thanks for letting me know!

However - via actions - you could inject styling via HTML.

When we say “plain text” we really mean “Markdown”. Markdown allows the embedding of HTML.

So, an action to wrap selected text - like so -might be acceptable:

<span style=‘your styling’>Your text</span>

or use Text Expander snippets

1 Like

That works for fresh text as you can pop up a fill-in-the-blank’s dialog. Does it work for existing text you need to wrap?