File: run_css.py

package info (click to toggle)
accessible-pygments 0.0.5-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,076 kB
  • sloc: python: 1,451; sh: 48; javascript: 33; makefile: 3
file content (32 lines) | stat: -rw-r--r-- 677 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
"""
Script to generate the css files for the themes in accessible-pygments.

Usage::

    python test/run_css.py
"""

import argparse
import logging

from pathlib import Path

from a11y_pygments.utils.utils import generate_css, get_themes_names


if __name__ == "__main__":
    parser = argparse.ArgumentParser()
    parser.add_argument(
        "--save-dir",
        type=str,
        default="",
        help="Directory to save the css files",
        required=True,
    )
    args = parser.parse_args()

    save_dir = Path(args.save_dir).resolve()
    logging.info(f"Saving css files to {save_dir}")

    themes = get_themes_names()
    generate_css(themes, args.save_dir)