Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tag author date references and format references.yml entries #14

Closed
geealbers opened this issue Oct 7, 2021 · 6 comments
Closed

Tag author date references and format references.yml entries #14

geealbers opened this issue Oct 7, 2021 · 6 comments
Assignees

Comments

@geealbers
Copy link
Member

Instructions follow. I did an initial test for essay 1 in the add-author-date branch, which you can just take over and work in for the remaining essays.

Essays

For each essay, run a regex find and replace with the patterns below. This will wrap the author date reference in a single set of curly brakckes, which we can then use to go back and turn into shortcodes with a single global command. It will catch standard uses like "Bachhuber 2006"; entries with "et al.", like "Kuniholm et al. 1996"; and entries with a and b years, like "Emanuel 2014a" and "Emanuel 2014b". However, it will not work for multiple name entries, like; "Aruz, Benzel, and Evans 2008"; or for hyphenated names or dates like "Suchowska-Ducke 2015" or "Whitley et al. 2005–6". So, you need to go through one at a time and either do the auto-replace by clicking the Replace button if the pattern caught the full reference, or manually highlight the full reference and add the curly brackets that way.

Find:

([A-Z][a-z]+?[ et al\.]* [0-9]{4}[a-x]*)

Replace:

{$1}

References YAML

For each bibliography file, delete the "References Cited" heading and leave two line breaks at the top of the file. Run a regex find and replace using the pattern below, but update number in essay: 1 to reflect the actual essay number. Copy and paste the results into references.yml, and make sure it's all indented in properly.

Find:

\n\n(.+)?

Replace:

- id: ""
  essay: 1
  full: "$1"\n

Next, manually go through the references and create the appropriate id text. These ids will ultimately match those surrounded in curly brackets in the essays. So if you're not sure of the formatting, you can do a search in the essay itself to see how the editors formatted it. A couple examples:

- id: "Abbas 2017"
  essay: 1
  full: "Abbas, Mohamed Raafat. 2017. “A Survey of the Military Role of the Sherden Warriors in the Egyptian Army during the Ramesside Period.” *Égypte Nilotique et Méditerranéenne* 10:7–23."
- id: "Aruz, Benzel, and Evans 2008"
  essay: 1
  full: "Aruz, Joan, Kim Benzel, and Jean M. Evans, eds. 2008. *Beyond Babylon: Art, Trade, and Diplomacy in the Second Millennium B.C*. New York: Metropolitan Museum of Art."
- id: "Manning et al. 2001"
  essay: 1
  full: "Manning, Sturt W., et al. 2001. “Anatolian Tree Rings and a New Chronology for the East Mediterranean Bronze-Iron Ages.” *Science* 294, no. 5551 (December 21): 2532–35."
- id: "Waal"
  essay: 1
  full: "Waal, W. J. I. Forthcoming. “Distorted Reflections? Writing the Late Bronze Age in the Mirror of Anatolia.” In *Linguistic and Cultural Interactions between Greece and the Ancient Near East: In Search of the Golden Fleece*, edited by Michele Bianconi. Leiden: Brill."
@Erin-Cecele
Copy link
Contributor

Just a note that you need to hit the regex button in Find and Replace before using the suggested find formulas. That button looks like this .*

@geealbers
Copy link
Member Author

Oh, speaking of which, you may also need to hit the Match Case button as well Aa. (Sorry, forgot about that!)

@Erin-Cecele
Copy link
Contributor

@geealbers I was able to do the find and replace for the essays. But when I went to test the bibliography find and replace, it was a little funky. It seems to skip every other entry. I've included a screenshot. Not sure if that's helpful.

Screen Shot 2021-10-12 at 10 10 22 AM

.

@geealbers
Copy link
Member Author

@Erin-Cecele, I'm not sure what's going on but when I used the regex pattern on the same file as in your screenshot, it works for me. We might need to look at it together

@Erin-Cecele Erin-Cecele changed the title Tage author date references and format references.yml entries Tag author date references and format references.yml entries Oct 13, 2021
@Erin-Cecele
Copy link
Contributor

@dimrkh please closely read Greg's instructions above. I have done the first portion pertaining to the essays. We now need your help with the second part, References YAML.

  1. You will need to clone the Egypt-Classical-World repo (if you want to preview, don't forget to run quire install first.)
  2. When you open the repo in Atom, scroll down to the transmittal files folder (it comes right after the themes folder.) There are five essays in here, each one comes with a separate bibliography (i.e., 05b_Kelder bibliography_final.md.
  3. You will need to do the Find & Replace that Greg requests in each of these five bibliography files. When you do the F&R make sure to use "Replace All" rather than doing it one-by-one. Don't forget to turn on regex by pressing .* and Aa.
  4. Make sure to change the essay numbers as Greg requests (Kelder is essay 1, Villing is essay 2, Bommas is essay 3, etc.)
  5. Delete the information that's currently in references.yml but pay close attention to the spacing and indenting.
  6. Then copy-paste the information over from the individual bibliographies to the references.yml file (add a space to separate each essay's references - i.e., group all essay 1 references, add a space, group all essay 2 references, etc).
  7. Please follow the remainder of Greg's instructions regarding adding in the ids. If you need to cross check any of the author date names, scroll down to the end of each essay in the content folder and look at anything within the curly brackets {{ }}.

Let me know if you have any questions. Thank you for your help!

@Erin-Cecele
Copy link
Contributor

@geealbers This is complete aside from one open question in PR #20. Thank you @dimrkh for your help!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants