site cleanup

This commit is contained in:
Emiliano Heyns
2021-06-13 20:45:16 +02:00
parent bfa3d4c850
commit d2a621b08b
8 changed files with 51 additions and 47 deletions

View File

@@ -7,9 +7,8 @@ import glob
def split_and_mark(names):
common = set(names['zotero']).intersection(names['jurism'])
for stars, client in enumerate(['zotero', 'jurism']):
stars = '*' * (stars + 1)
names[client] = [field + stars for field in set(names[client]) - common]
for client, marker in {'zotero': 'Z', 'jurism': 'JM'}.items():
names[client] = [field + f'<sup>{marker}</sup>' for field in set(names[client]) - common]
return sorted(names['zotero'] + names['jurism'] + list(common))
fields = {}

View File

@@ -7,6 +7,9 @@ theme = "learn"
metaDataFormat = "yaml"
defaultContentLanguageInSubdir= true
[markup.goldmark.renderer]
unsafe= true
[params]
editURL = "https://github.com/retorquere/zotero-better-bibtex/edit/master/site/content/"
description = "Make Zotero more useful for us LaTeX holdouts"

View File

@@ -91,7 +91,7 @@ To generate your citekeys, you use a pattern composed of functions and filters.
{{< citekey-formatters/fields >}}
(fields marked `**` are only available in Juris-M).
(fields marked <sup>JM</sup> are only available in Juris-M).
#### Flags

View File

@@ -2,20 +2,20 @@
[
"AbstractNote",
"AccessDate",
"AdminFlag**",
"AdoptionDate**"
"AdminFlag<sup>JM</sup>",
"AdoptionDate<sup>JM</sup>"
],
[
"Album**",
"Album<sup>JM</sup>",
"ApplicationNumber",
"Archive",
"ArchiveCollection**"
"ArchiveCollection<sup>JM</sup>"
],
[
"ArchiveLocation",
"ArtworkMedium",
"ArtworkSize",
"AssemblyNumber**"
"AssemblyNumber<sup>JM</sup>"
],
[
"Assignee",
@@ -25,7 +25,7 @@
],
[
"BlogTitle",
"BookAbbreviation**",
"BookAbbreviation<sup>JM</sup>",
"BookTitle",
"CallNumber"
],
@@ -39,7 +39,7 @@
"CodeVolume",
"Committee",
"Company",
"ConferenceDate**"
"ConferenceDate<sup>JM</sup>"
],
[
"ConferenceName",
@@ -49,18 +49,18 @@
],
[
"Date",
"DateAmended**",
"DateAmended<sup>JM</sup>",
"DateDecided",
"DateEnacted"
],
[
"DictionaryTitle",
"Distributor",
"Division**",
"Division<sup>JM</sup>",
"DocketNumber"
],
[
"DocumentName**",
"DocumentName<sup>JM</sup>",
"DocumentNumber",
"Edition",
"EncyclopediaTitle"
@@ -72,7 +72,7 @@
"ForumTitle"
],
[
"GazetteFlag**",
"GazetteFlag<sup>JM</sup>",
"Genre",
"History",
"ISBN"
@@ -87,7 +87,7 @@
"IssueDate",
"IssuingAuthority",
"JournalAbbreviation",
"Jurisdiction**"
"Jurisdiction<sup>JM</sup>"
],
[
"Label",
@@ -104,31 +104,31 @@
[
"Medium",
"MeetingName",
"MeetingNumber**",
"MeetingNumber<sup>JM</sup>",
"NameOfAct"
],
[
"Network",
"NewsCaseDate**",
"NewsCaseDate<sup>JM</sup>",
"NumPages",
"Number"
],
[
"NumberOfVolumes",
"OpeningDate**",
"Opus**",
"OriginalDate**"
"OpeningDate<sup>JM</sup>",
"Opus<sup>JM</sup>",
"OriginalDate<sup>JM</sup>"
],
[
"Pages",
"ParentTreaty**",
"ParentTreaty<sup>JM</sup>",
"PatentNumber",
"Place"
],
[
"PostType",
"PresentationType",
"PriorityDate**",
"PriorityDate<sup>JM</sup>",
"PriorityNumbers"
],
[
@@ -138,27 +138,27 @@
"PublicLawNumber"
],
[
"PublicationDate**",
"PublicationNumber**",
"PublicationDate<sup>JM</sup>",
"PublicationNumber<sup>JM</sup>",
"PublicationTitle",
"Publisher"
],
[
"References",
"RegnalYear**",
"RegulationType**",
"RegulatoryBody**"
"RegnalYear<sup>JM</sup>",
"RegulationType<sup>JM</sup>",
"RegulatoryBody<sup>JM</sup>"
],
[
"Reign**",
"Release**",
"Reign<sup>JM</sup>",
"Release<sup>JM</sup>",
"ReportNumber",
"ReportType"
],
[
"Reporter",
"ReporterVolume",
"ResolutionLabel**",
"ResolutionLabel<sup>JM</sup>",
"Rights"
],
[
@@ -174,21 +174,21 @@
"Session"
],
[
"SessionType**",
"SessionType<sup>JM</sup>",
"ShortTitle",
"SigningDate**",
"Status**"
"SigningDate<sup>JM</sup>",
"Status<sup>JM</sup>"
],
[
"Studio",
"Subject",
"SupplementName**",
"SupplementName<sup>JM</sup>",
"System"
],
[
"ThesisType",
"Title",
"TreatyNumber**",
"TreatyNumber<sup>JM</sup>",
"Type"
],
[
@@ -199,12 +199,12 @@
],
[
"Volume",
"VolumeTitle**",
"VolumeTitle<sup>JM</sup>",
"WebsiteTitle",
"WebsiteType"
],
[
"YearAsVolume**",
"YearAsVolume<sup>JM</sup>",
"",
"",
""

View File

@@ -27,4 +27,4 @@
"`veryshorttitleN_M`": "The first `N` (default: 1) words of the title, apply capitalization to first `M` (default: 0) of those",
"`year`": "The year of the publication",
"`zotero`": "Generates citation keys as the stock Zotero Bib(La)TeX export does. Note that this pattern inherits all the problems of the original Zotero citekey generation -- you should really only use this if you have existing papers that rely on this behavior."
}
}

View File

@@ -7,7 +7,7 @@
"book",
"bookSection",
"case",
"classic**",
"classic<sup>JM</sup>",
"computerProgram",
"conferencePaper",
"dictionaryEntry",
@@ -16,12 +16,12 @@
"encyclopediaArticle",
"film",
"forumPost",
"gazette**",
"gazette<sup>JM</sup>",
"hearing",
"instantMessage",
"interview",
"journalArticle",
"legalCommentary**",
"legalCommentary<sup>JM</sup>",
"letter",
"magazineArticle",
"manuscript",
@@ -32,12 +32,12 @@
"podcast",
"presentation",
"radioBroadcast",
"regulation**",
"regulation<sup>JM</sup>",
"report",
"standard**",
"standard<sup>JM</sup>",
"statute",
"thesis",
"treaty**",
"treaty<sup>JM</sup>",
"tvBroadcast",
"videoRecording",
"webpage"

View File

@@ -2,7 +2,7 @@
{{ range $row := .Site.Data.citekeyformatters.fields }}
<tr>
{{ range $field := $row }}
<td>{{ $field }}</td>
<td>{{ $field | safeHTML }}</td>
{{ end }}
</tr>
{{ end }}

View File

@@ -10,5 +10,7 @@
</li>
<li><code>0</code>: an alias for <code>[postfix=-%(n)s]</code>. Emulates the disambiguator of the standard Zotero exports. When you use <code>[zotero]</code> in your pattern, <code>[zotero][0]</code> is implied</li>
<li><code>&gt;X</code>: a pseudo-function which aborts the current pattern generation if what came before it is <code>X</code> characters or less (<code>[&gt;0]</code> is a typical use. You would typically use this with something like <code>[auth][&gt;0][year] | [title][year]</code> which means if there's no author you get <code>title-year</code> rather than just <code>year</code>.</li>
<li><code>=typeName</code>: a pseudo-function that aborts the current pattern generation if the Zotero reference type does not equal <code>typeName</code>. You can test for multiple typenames at once by separating them with slashes (<code>[=journalArticle/report]</code>). Valid typeNames are: {{ range $index, $tn := .Site.Data.citekeyformatters.typeNames }}{{ if (eq $index 0) }}, {{ end }}<code>{{ $tn }}</code>{{ end }}.</li>
<li><code>=typeName</code>: a pseudo-function that aborts the current pattern generation if the Zotero reference type does not equal <code>typeName</code>. You can test for multiple typenames at once by separating them with slashes (<code>[=journalArticle/report]</code>). Valid typeNames are: {{ range $index, $tn := .Site.Data.citekeyformatters.typeNames }}{{ if (ne $index 0) }}, {{ end }}<code>{{ $tn | safeHTML }}</code>{{ end }}.</li>
</ul>
(type names marked <sup>JM</sup> are only available in Juris-M).