Skip to content

Commit

Permalink
Merge branch 'main' into version-bump
Browse files Browse the repository at this point in the history
  • Loading branch information
reknih committed Oct 2, 2024
2 parents bf56991 + 76fa976 commit d955fbc
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 33 deletions.
12 changes: 2 additions & 10 deletions docs/file-format.md
Original file line number Diff line number Diff line change
Expand Up @@ -188,14 +188,6 @@ This section lists all possible fields and data types for them.
| **Description:** | Abstract of the item (e.g. the abstract of a journal article). |
| **Example:** | `abstract: The dominant sequence transduction models are based on complex...` |

#### `annote`

| | |
|------------------|-----------------------------------------------------------|
| **Data type:** | formattable string |
| **Description:** | Short markup, decoration, or annotation to the item (e.g., to indicate items included in a review). For descriptive text (e.g., in an annotated bibliography), use `note` instead. |
| **Example:** | `annote: The researchers at NYU explore in this paper ...` |

#### `genre`

| | |
Expand Down Expand Up @@ -361,8 +353,8 @@ This section lists all possible fields and data types for them.
| | |
|------------------|-----------------------------------------------------------|
| **Data type:** | formattable string |
| **Description:** | additional description to be appended after reference list entry |
| **Example:** | `note: microfilm version` |
| **Description:** | short markup, decoration, or annotation to the item (e.g., to indicate items included in a review). |
| **Example:** | `microfilm version` |

### Data types

Expand Down
16 changes: 8 additions & 8 deletions src/csl/archive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ pub enum ArchivedStyle {
/// Deutsche Gesellschaft für Psychologie 5. Auflage (Deutsch).
///
/// Authors: Daniel Hirsbrunner.
DeutscheGesellschaftFRPsychologie,
DeutscheGesellschaftFürPsychologie,
/// Deutsche Sprache (Deutsch).
///
/// Authors: Philipp Zumstein.
Expand Down Expand Up @@ -374,7 +374,7 @@ impl ArchivedStyle {
"council-of-science-editors" => Some(Self::CouncilOfScienceEditors),
"council-of-science-editors-author-date" => Some(Self::CouncilOfScienceEditorsAuthorDate),
"current-opinion" => Some(Self::CurrentOpinion),
"deutsche-gesellschaft-für-psychologie" => Some(Self::DeutscheGesellschaftFRPsychologie),
"deutsche-gesellschaft-für-psychologie" => Some(Self::DeutscheGesellschaftFürPsychologie),
"deutsche-sprache" => Some(Self::DeutscheSprache),
"elsevier-harvard" => Some(Self::ElsevierHarvard),
"elsevier-vancouver" => Some(Self::ElsevierVancouver),
Expand Down Expand Up @@ -466,7 +466,7 @@ impl ArchivedStyle {
"http://www.zotero.org/styles/council-of-science-editors-brackets" => Some(Self::CouncilOfScienceEditors),
"http://www.zotero.org/styles/council-of-science-editors-author-date" => Some(Self::CouncilOfScienceEditorsAuthorDate),
"http://www.zotero.org/styles/current-opinion" => Some(Self::CurrentOpinion),
"http://www.zotero.org/styles/deutsche-gesellschaft-fur-psychologie" => Some(Self::DeutscheGesellschaftFRPsychologie),
"http://www.zotero.org/styles/deutsche-gesellschaft-fur-psychologie" => Some(Self::DeutscheGesellschaftFürPsychologie),
"http://www.zotero.org/styles/deutsche-sprache" => Some(Self::DeutscheSprache),
"http://www.zotero.org/styles/elsevier-harvard" => Some(Self::ElsevierHarvard),
"http://www.zotero.org/styles/elsevier-vancouver" => Some(Self::ElsevierVancouver),
Expand Down Expand Up @@ -554,7 +554,7 @@ impl ArchivedStyle {
Self::CouncilOfScienceEditors,
Self::CouncilOfScienceEditorsAuthorDate,
Self::CurrentOpinion,
Self::DeutscheGesellschaftFRPsychologie,
Self::DeutscheGesellschaftFürPsychologie,
Self::DeutscheSprache,
Self::ElsevierHarvard,
Self::ElsevierVancouver,
Expand Down Expand Up @@ -641,7 +641,7 @@ impl ArchivedStyle {
Self::CouncilOfScienceEditors => include_bytes!("../../archive/styles/council-of-science-editors-brackets.cbor"),
Self::CouncilOfScienceEditorsAuthorDate => include_bytes!("../../archive/styles/council-of-science-editors-author-date.cbor"),
Self::CurrentOpinion => include_bytes!("../../archive/styles/current-opinion.cbor"),
Self::DeutscheGesellschaftFRPsychologie => include_bytes!("../../archive/styles/deutsche-gesellschaft-fur-psychologie.cbor"),
Self::DeutscheGesellschaftFürPsychologie => include_bytes!("../../archive/styles/deutsche-gesellschaft-fur-psychologie.cbor"),
Self::DeutscheSprache => include_bytes!("../../archive/styles/deutsche-sprache.cbor"),
Self::ElsevierHarvard => include_bytes!("../../archive/styles/elsevier-harvard.cbor"),
Self::ElsevierVancouver => include_bytes!("../../archive/styles/elsevier-vancouver.cbor"),
Expand Down Expand Up @@ -799,7 +799,7 @@ impl ArchivedStyle {
Self::CurrentOpinion => &[
"current-opinion",
],
Self::DeutscheGesellschaftFRPsychologie => &[
Self::DeutscheGesellschaftFürPsychologie => &[
"deutsche-gesellschaft-für-psychologie",
],
Self::DeutscheSprache => &[
Expand Down Expand Up @@ -988,7 +988,7 @@ impl ArchivedStyle {
Self::CouncilOfScienceEditors => "Council of Science Editors, Citation-Sequence (numeric, brackets)",
Self::CouncilOfScienceEditorsAuthorDate => "Council of Science Editors, Name-Year (author-date)",
Self::CurrentOpinion => "Current Opinion journals",
Self::DeutscheGesellschaftFRPsychologie => "Deutsche Gesellschaft für Psychologie 5. Auflage (Deutsch)",
Self::DeutscheGesellschaftFürPsychologie => "Deutsche Gesellschaft für Psychologie 5. Auflage (Deutsch)",
Self::DeutscheSprache => "Deutsche Sprache (Deutsch)",
Self::ElsevierHarvard => "Elsevier - Harvard (with titles)",
Self::ElsevierVancouver => "Elsevier - Vancouver",
Expand Down Expand Up @@ -1075,7 +1075,7 @@ impl ArchivedStyle {
Self::CouncilOfScienceEditors => "http://www.zotero.org/styles/council-of-science-editors-brackets",
Self::CouncilOfScienceEditorsAuthorDate => "http://www.zotero.org/styles/council-of-science-editors-author-date",
Self::CurrentOpinion => "http://www.zotero.org/styles/current-opinion",
Self::DeutscheGesellschaftFRPsychologie => "http://www.zotero.org/styles/deutsche-gesellschaft-fur-psychologie",
Self::DeutscheGesellschaftFürPsychologie => "http://www.zotero.org/styles/deutsche-gesellschaft-fur-psychologie",
Self::DeutscheSprache => "http://www.zotero.org/styles/deutsche-sprache",
Self::ElsevierHarvard => "http://www.zotero.org/styles/elsevier-harvard",
Self::ElsevierVancouver => "http://www.zotero.org/styles/elsevier-vancouver",
Expand Down
2 changes: 1 addition & 1 deletion src/csl/taxonomy.rs
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,7 @@ impl EntryLike for Entry {
.map(|f| f.select(form))
.map(Cow::Borrowed),
StandardVariable::Annote => {
entry.map(|e| e.annote()).map(|f| f.select(form)).map(Cow::Borrowed)
entry.map(|e| e.note()).map(|f| f.select(form)).map(Cow::Borrowed)
}
StandardVariable::Archive => {
entry.map(|e| e.archive()).map(|f| f.select(form)).map(Cow::Borrowed)
Expand Down
12 changes: 6 additions & 6 deletions src/interop.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,23 +522,23 @@ impl TryFrom<&tex::Entry> for Entry {
}
}

if let Some(note) = map_res(entry.note())?.map(Into::into) {
item.set_note(note);
}

if let Some(note) = map_res(entry.annotation())?
.or_else(|| entry.addendum().ok())
.map(|d| d.format_verbatim())
.map(Into::into)
{
if item.note.is_none() {
item.set_note(note.into());
item.set_note(note);
}
}

if let Some(abstract_) = map_res(entry.abstract_())? {
item.set_abstract_(abstract_.into())
}

if let Some(annote) = map_res(entry.annotation())? {
item.set_annote(annote.into())
}

if let Some(series) = map_res(entry.series())? {
let title: FormatString = series.into();
let mut new = Entry::new(&entry.key, item.entry_type);
Expand Down
8 changes: 1 addition & 7 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -548,12 +548,6 @@ entry! {
"note" => note: FormatString,
/// Abstract of the item (e.g. the abstract of a journal article).
"abstract" => abstract_: FormatString,
/// Short markup, decoration, or annotation to the item (e.g., to indicate
/// items included in a review);
///
/// For descriptive text (e.g., in an annotated bibliography), use `note`
/// instead.
"annote" => annote: FormatString,
/// Type, class, or subtype of the item (e.g. “Doctoral dissertation” for
/// a PhD thesis; “NIH Publication” for an NIH technical report);
/// Do not use for topical descriptions or categories (e.g. “adventure” for an adventure movie).
Expand Down Expand Up @@ -974,7 +968,7 @@ mod tests {
"barb",
]
);
select_all!("*[abstract, annote, genre]", entries, ["wire"]);
select_all!("*[abstract, note, genre]", entries, ["wire"]);
}

#[test]
Expand Down
2 changes: 1 addition & 1 deletion tests/data/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,7 +156,7 @@ wire:
started out as a police drama loosely based on the experiences of
Simon's writing partner Ed Burns, a former homicide detective and
public school teacher.
annote: The wire is noted to be solid
note: The Wire is noted to be solid
genre: Drama
affiliated:
- role: executive-producer
Expand Down

0 comments on commit d955fbc

Please sign in to comment.