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
| #!/usr/bin/env python3 | |
| """Add page labels to a PDF from a JSON file and TOC bookmarks to the PDF from a CSV file.""" | |
| import sys | |
| import argparse | |
| import json | |
| import csv | |
| from collections.abc import Mapping, Sequence | |
| from typing import TypedDict, Required |
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
| #!/usr/bin/env python3 | |
| """ | |
| Fetch all public gists for a GitHub username. | |
| """ | |
| import sys | |
| import argparse | |
| import json | |
| import urllib.request | |
| from collections.abc import Mapping, Sequence |
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
| #!/usr/bin/env python | |
| import os | |
| import sys | |
| import shlex | |
| import shutil | |
| import argparse | |
| import subprocess | |
| DEFAULT_REPS = 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
| #!/usr/bin/env python3 | |
| """ | |
| Reads references.bib and creates a file called bibdb.tex, containing manually parsed bibtex data. | |
| This data is used to implement a custom \\citet command. | |
| bibdb.tex will contain one line per citation entry, each of this format: '\\regCitation{key}{authors}'. | |
| Here 'authors' is a shortened et al format, suitable for use in citation. | |
| """ | |
| import os |
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
| % syntax: \extRefReg{label}{type}{id} | |
| \newcommand*{\extRefReg}[3]{% | |
| \expandafter\def\csname extref-type:#1\endcsname{#2}% | |
| \expandafter\def\csname extref-id:#1\endcsname{#3}% | |
| } | |
| \newif\ifUseExtRef | |
| \let\extRefOn\UseExtReftrue | |
| \let\extRefOff\UseExtReffalse |
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
| { | |
| "translatorID": "e26cad9e-c9c3-438b-bbab-ea9a3353c3f7", | |
| "label": "ekubib", | |
| "creator": "Eklavya Sharma", | |
| "target": "bib", | |
| "minVersion": "2.1.9", | |
| "maxVersion": "", | |
| "priority": 200, | |
| "configOptions": { | |
| "async": true, |
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
| #!/usr/bin/env python3 | |
| import unittest | |
| import wef1 | |
| class EnumerationTest(unittest.TestCase): | |
| def testOrderings(self) -> None: | |
| orderings = list(wef1.findAllOrderingsHelper(3, 2, [])) | |
| self.assertEqual(orderings, [ |
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
| /* color scheme */ | |
| body { | |
| --bg-color: white; --text-color: #202020; --link-color: #1a0dab; --vlink-color: #681da8; --tint: rgba(128,128,128,0.2); | |
| } | |
| @media (prefers-color-scheme: dark) { | |
| body { | |
| --bg-color: #1b1e20; --text-color: #c8c8c8; --link-color: #8ab4f8; --vlink-color: #c58af9; | |
| } | |
| } |
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
| // See https://www.zotero.org/support/dev/translators | |
| var zotero2bibtexTypeMap = { | |
| "book": "book", | |
| "bookSection": "incollection", | |
| "journalArticle": "article", | |
| "magazineArticle": "article", | |
| "newspaperArticle": "article", | |
| "thesis": "phdthesis", | |
| "letter": "misc", |
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
| #!/usr/bin/env python3 | |
| """ | |
| Compresses all photos in a directory recursively. | |
| Outputs a new directory tree instead of replacing original photos. | |
| Tools 'djpeg', 'moz-cjpeg', and 'exiftool' must be installed. | |
| """ | |
| import sys | |
| import argparse |
NewerOlder