Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

This package is currently in beta. It is meant to render paralex lexicon files in mkdocs sites.

Installing

pip install mkdocs-paralex-plugin

Quick start

Create a configuration file for mkdocs, compatible with mkdocs-material.

It needs a special paralex section, with minimally a paralex_package_path (to the json file), lists of feature labels to use to separate tables, rows and columns. It can contain

site_name: "My site name"
docs_dir: docs
plugins:
  - paralex:
      paralex_package_path: "<name>.package.json"
      layout_tables:
        - mood
      layout_rows:
        -  person/number
      layout_columns:
        - tense
repo_url: https://gitlab.com/<user>/<repo>

Large datasets

If your lexicon is massive, the generated site might exceed the free hosting capacity on gitlab or github. There is then two options: compressing some assets (should still work with most browsers), and if that is still not enough, serving just a sample of the data.

Compressing some assets

An easy way for the static site to take less space is to compress some assets. This is now a default behaviour. It can be disabled with compress: false:

site_name: "My site name"
docs_dir: docs
plugins:
  - paralex:
      paralex_package_path: "<name>.package.json"
      compress: false
      layout_tables:
        - mood
      layout_rows:
        -  person/number
      layout_columns:
        - tense
repo_url: https://gitlab.com/<user>/<repo>

Presenting only a sample of the data

To limit the site generation to a sample of the data, you need two more keys under the paralex section. If sample_size is set, the corresponding number of lexemes will be selected, and the site will only show that sample. If frequency_sample is set to true, then the chosen lexemes will be the most frequent.

site_name: "My site name"
docs_dir: docs
plugins:
  - paralex:
      paralex_package_path: "<name>.package.json"
      sample_size: 5000
      frequency_sample: true
      layout_tables:
        - mood
      layout_rows:
        -  person/number
      layout_columns:
        - tense
repo_url: https://gitlab.com/<user>/<repo>

Hosting on gitlab

To generate the site, add a plain text file called .gitlab-ci.yml, with the following content. The site will then be served at https://<username>.gitlab.io/<repository-name>. For more on gitlab pages, see the gitlab pages docs.

image: python:3.8

pages:
  stage: deploy
  script:
    - mkdir -p docs/
    - pip install mkdocs-paralex-plugin
    - mkdocs build -d public/ --strict --verbose
  artifacts:
    paths:
      - public/
  only:
    - master

Github pages

To generate for github pages, see the mkdocs documentation. In brief, checkout the main or master branch of your project, locally install the needed packages, then run the github pages builder:

mkdir -p docs/
pip install mkdocs_paralex_plugin
mkdocs gh-deploy

Metadata

Release files for mkdocs-paralex-plugin 0.1.17b0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mkdocs-paralex-plugin 0.1.17b0
File Size Uploaded Provenance Actions
mkdocs_paralex_plugin-0.1.17b0.tar.gz 27.7 kB Without provenance Details for mkdocs_paralex_plugin-0.1.17b0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mkdocs-paralex-plugin 0.1.17b0
File Interpreter ABI Platform Actions
mkdocs_paralex_plugin-0.1.17b0-py2.py3-none-any.whl Python 3, Python 2 none any Details for mkdocs_paralex_plugin-0.1.17b0-py2.py3-none-any.whl

Total release size: 55.6 kB

Release files / mkdocs_paralex_plugin-0.1.17b0.tar.gz

Download URL mkdocs_paralex_plugin-0.1.17b0.tar.gz
Size 27.7 kB
Tags Source
SHA-256 checksum
How to use checksums
80ac5f883153dccba60f7adc656a4520bc07184649ab1d6c16fa7171c6c799f2
BLAKE2b-256 checksum
How to use checksums
435465691328c08ce5e05e3f3ac22288bede7f0efd8243b65c9bd5145e2b5927
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Release files / mkdocs_paralex_plugin-0.1.17b0-py2.py3-none-any.whl

Download URL mkdocs_paralex_plugin-0.1.17b0-py2.py3-none-any.whl
Size 27.9 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
f939e9e3f42525e6cc3320b0615a800c95c4dcc44f4a85503407d2169fcb3775
BLAKE2b-256 checksum
How to use checksums
fceff3162f85b4033f257651acacf6ba28c436d9720b074f1b1fd86171bbf9aa
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.13.0

Security for mkdocs-paralex-plugin 0.1.17b0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page