This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| """sort_terms.py | |
| Utility for sorting and normalizing CSL locale XML files. | |
| This script parses CSL locale files (XML) and sorts <term> elements | |
| according to the canonical ordering derived from `locales-en-US.xml`, and | |
| rewrites the files preserving comments and structure. It also provides | |
| helpers to parse the terms into a dictionary (`get_terms_dict`) to ensure the | |
| script is semantics-preserving: running the sorter and then reparsing the file | |
| should produce the same terms dictionary. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <rdf:RDF | |
| xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" | |
| xmlns:z="http://www.zotero.org/namespaces/export#" | |
| xmlns:dc="http://purl.org/dc/elements/1.1/" | |
| xmlns:vcard="http://nwalsh.com/rdf/vCard#" | |
| xmlns:foaf="http://xmlns.com/foaf/0.1/" | |
| xmlns:bib="http://purl.org/net/biblio#" | |
| xmlns:dcterms="http://purl.org/dc/terms/" | |
| xmlns:prism="http://prismstandard.org/namespaces/1.2/basic/"> | |
| <bib:Book rdf:about="#item_8077"> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \usepackage[style=turabian-author-date]{citation-style-language} | |
| % \usepackage[style=authoryear]{biblatex} | |
| \addbibresource{biblatex-examples.bib} | |
| \begin{document} | |
| \cite{nietzsche:ksa,nietzsche:ksa1} | |
| \printbibliography | |
| \end{document} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| \documentclass{article} | |
| \begin{filecontents}[force,noheader]{\jobname.bib} | |
| @book{ITEM-1, | |
| author = {Nietzsche, Friedrich}, | |
| title = {Title B of ITEM-1}, | |
| date = 1988, | |
| } | |
| @book{ITEM-2, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>===== MODE =====>> | |
| citation | |
| <<===== MODE =====<< | |
| >>===== RESULT =====>> | |
| >>[0] (Nietzsche 1988a, 1988b) | |
| <<===== RESULT =====<< | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>===== MODE =====>> | |
| citation | |
| <<===== MODE =====<< | |
| >>===== DESCRIPTION =====>> | |
| The citperoc-js (73bc1b44) gives: | |
| + expected - actual |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # MIT license | |
| # Copy new terms of `locales-en-US.xml` to other locals. | |
| # Step 1: Add new terms in `locales-en-US.xml`. Make sure the "short", "verb", | |
| # "verb-short" forms of each new term are also included. | |
| # Step 2: Run `python3 add-locale-terms.py` | |
| import glob |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [ | |
| { | |
| "id": "koseki2005compiler", | |
| "type": "patent", | |
| "authority": "United States", | |
| "call-number": "US09828402", | |
| "language": "en", | |
| "number": "US6944852B2", | |
| "title": "Compiler", | |
| "URL": "https://patents.google.com/patent/US6944852B2/en?oq=US6944852B2", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| >>===== MODE =====>> | |
| citation | |
| <<===== MODE =====<< | |
| >>===== RESULT =====>> | |
| Ravemachine. Choreografie: Doris Uhlich, brut Wien, Premiere: 12.10.2016 | |
| Ravemachine. Choreografie: Doris Uhlich, brut Wien, Premiere: 12.10.2016 | |
| <<===== RESULT =====<< |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from collections import Counter | |
| import glob | |
| import os | |
| import xml.etree.ElementTree as ET | |
| # from lxml import etree as ET | |
| import yaml | |
| CSL_STYLES_DIR = '../styles' | |
| NSMAP = {'cs': 'http://purl.org/net/xbiblio/csl'} |
NewerOlder