Skip to main content

A library for getting information on TexLive installation

Project description

texlivemetadata

Get metadata on your TexLive installation using Python.

This library calls tlmgr and parse its ouput so it can then be processed and used from Python.

Usage

PyPI version

pip install texlivemetadata

TeXLive version information

import texlivemetadata

# Get version information on current TeXLive installation.
print(texlivemetadata.get_texlive_version_information())
# --->
# {'texlive': {'installation_path': '/opt/texlive/2019',
#              'modules': [{'name': 'TLConfig', 'value': '50190'},
#                          {'name': 'TLUtils', 'value': '50493'},
#                          {'name': 'TLPOBJ', 'value': '50211'},
#                          {'name': 'TLPDB', 'value': '51110'},
#                          {'name': 'TLPaper', 'value': '45795'},
#                          {'name': 'TLWinGoo', 'value': '47907'}],
#              'version': '2019'},
#  'tlmgr': {'revision': '51217', 'revision_date': '2019-05-24 23:47:41 +0200'}}

Package listing

import texlivemetadata

# List all packages exposed by tlmgr list:
print(texlivemetadata.list_packages())

# For listing only installed packages:
print(texlivemetadata.list_installed_packages())

Package information

import texlivemetadata

# To get information on package (and whether it is installed or not):
print(texlivemetadata.get_package_info("12many"))
# --->
# {
#     "cat-date": "2016-06-24T19:18:15+02:00",
#     "cat-license": "lppl",
#     "cat-topics": [
#         "maths"
#     ],
#     "cat-version": "0.3",
#     "category": "Package",
#     "collection": "collection-mathscience",
#     "installed": true,
#     "longdesc": "In the discrete branches of mathematics and the computer sciences, it will only take some seconds before you're faced with a set like {1,...,m}. Some people write $1\\ldotp\\ldotp m$, others $\\{j:1\\leq j\\leq m\\}$, and the journal you're submitting to might want something else entirely. The 12many package provides an interface that makes changing from one to another a one-line change.",
#     "package": "12many",
#     "relocatable": false,
#     "revision": "15878",
#     "shortdesc": "Generalising mathematical index sets",
#     "sizes": {
#         "run": "5k"
#     }
# }

Utils

import texlivemetadata

# To CTAN link for a package:
print(texlivemetadata.get_ctan_link("12many"))
# --->
# "https://ctan.org/pkg/12many"

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

texlivemetadata-0.1.3.tar.gz (4.0 kB view details)

Uploaded Source

Built Distribution

texlivemetadata-0.1.3-py2.py3-none-any.whl (6.2 kB view details)

Uploaded Python 2 Python 3

File details

Details for the file texlivemetadata-0.1.3.tar.gz.

File metadata

  • Download URL: texlivemetadata-0.1.3.tar.gz
  • Upload date:
  • Size: 4.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for texlivemetadata-0.1.3.tar.gz
Algorithm Hash digest
SHA256 60634317d21bbf321e93c9db36a933774fec24015077b49448e37fd99d88d130
MD5 a7ecac9284cd7f46c63b1c1d932b97a5
BLAKE2b-256 47f2f74fc8e618cf182f358debc04666b4b29f07c3e72213cef0207a681eb4b4

See more details on using hashes here.

File details

Details for the file texlivemetadata-0.1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: texlivemetadata-0.1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.2 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/42.0.1 requests-toolbelt/0.9.1 tqdm/4.36.1 CPython/3.6.9

File hashes

Hashes for texlivemetadata-0.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 54286472fc40dce59c4be5925caeb4fe1bbec6a4aa65d9c1fa27a72532e54f4e
MD5 e876008baa448d38b3cb60e34734436c
BLAKE2b-256 eae37c682d6c4891989b4e16e65922c515d1211e10fb5809029e9e7e86ff6087

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page