Last active
March 5, 2021 22:14
-
-
Save hubgit/ece0a56ab97bf02bb39f3eff5641b62b to your computer and use it in GitHub Desktop.
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
| brew install texlive jq datasette sqlite-utils | |
| tlmgr dump-tlpdb --remote http://tug.ctan.org/systems/texlive/tlnet/tlpkg/texlive.tlpdb --json | jq '.main.tlpkgs' | sqlite-utils insert texlive.db tlpkgs - | |
| datasette texlive.db | |
| # SELECT category, name, shortdesc, longdesc FROM tlpkgs WHERE category = 'Package' ORDER BY name ASC LIMIT 200 | |
| sqlite-utils enable-fts texlive.db tlpkgs name shortdesc |
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
| select | |
| snippet( | |
| tlpkgs_fts, | |
| -1, | |
| 'b4de2a49c8', | |
| '8c94a2ed4b', | |
| '...', | |
| 100 | |
| ) as snippet, | |
| tlpkgs_fts.rank, | |
| tlpkgs.name, | |
| tlpkgs.shortdesc | |
| from | |
| tlpkgs | |
| join tlpkgs_fts on tlpkgs.rowid = tlpkgs_fts.rowid | |
| where | |
| category = 'Package' | |
| and | |
| tlpkgs_fts match 'ams' || "*" | |
| order by | |
| rank | |
| limit | |
| 20 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment