python-waterloo-lexer 0.5.2__tar.gz → 0.5.3__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-waterloo-lexer
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: A pygments lexer derived from the Python lexer, for Waterloo docstrings
5
5
  Author: Uwe
6
6
  License: BSD-2-Clause
@@ -0,0 +1,62 @@
1
+ # Python-Waterloo Lexer
2
+
3
+ ![Status](https://img.shields.io/badge/status-pre--release-orange)
4
+ ![Version](https://img.shields.io/badge/version-0.5.3-blue)
5
+ ![License](https://img.shields.io/badge/license-BSD--2--Clause-blue)
6
+ ![Python](https://img.shields.io/badge/python-3.10%2B-blue)
7
+
8
+ `python-waterloo-lexer` is a Pygments lexer for Python files that contain
9
+ Waterloo docstrings.
10
+
11
+ It can be used with `pygmentize` and other tools that load Pygments lexers via
12
+ entry points.
13
+
14
+ ## What it provides
15
+
16
+ - a `python-waterloo` Pygments lexer alias
17
+ - syntax highlighting for Python files with Waterloo docstrings
18
+ - installation via PyPI, local checkout, or Git URL
19
+
20
+ ## Installation
21
+
22
+ ```bash
23
+ pip install python-waterloo-lexer
24
+ ```
25
+
26
+ ## Quick test
27
+
28
+ After installation, the lexer is available under the alias
29
+ `python-waterloo`.
30
+
31
+ ```bash
32
+ pygmentize -l python-waterloo -f terminal16m <file.py>
33
+ ```
34
+
35
+ You can also check whether Pygments lists the lexer:
36
+
37
+ ```bash
38
+ pygmentize -L lexers | grep -i waterloo || true
39
+ ```
40
+
41
+ ## Terminal viewer
42
+
43
+ For a quick terminal preview, a `less` alias can be handy:
44
+
45
+ ```bash
46
+ alias lessh='LESSOPEN="| pygmentize -O style=monokai %s" less -M -R'
47
+ ```
48
+
49
+ Then open files with:
50
+
51
+ ```bash
52
+ lessh <file.py>
53
+ ```
54
+
55
+ ## Project repository
56
+
57
+ Development happens in the Waterloo repository:
58
+
59
+ - <https://github.com/uwe-at-sdv/sdv_doc_waterloo>
60
+
61
+ The repository also contains related tooling, documentation, and editor
62
+ integrations for Waterloo docstrings.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: python-waterloo-lexer
3
- Version: 0.5.2
3
+ Version: 0.5.3
4
4
  Summary: A pygments lexer derived from the Python lexer, for Waterloo docstrings
5
5
  Author: Uwe
6
6
  License: BSD-2-Clause
@@ -41,7 +41,7 @@ from pygments.token import Error, Generic, Keyword, Name, String, Literal, Numbe
41
41
 
42
42
  #----- Changelog ----------------------------------------------#
43
43
 
44
- __version__ = "0.5.2"
44
+ __version__ = "0.5.3"
45
45
 
46
46
  #----- Constants ----------------------------------------------#
47
47
  RE_SECTION = re.compile(
@@ -1,114 +0,0 @@
1
- # Python-Waterloo Lexer (Pygments)
2
-
3
- This folder contains a custom Pygments lexer for Python files with Waterloo docstrings.
4
-
5
- > **Branch note (`ide-plugins`)**
6
- >
7
- > The Pygments lexer package lives on the `ide-plugins` branch. Installation from Git must
8
- > reference `@ide-plugins` (see below). General repository documentation is in `@main/README.md`.
9
-
10
- ## Prerequisites
11
-
12
- - Python >= 3.10
13
- - `pip`
14
- - `pygmentize` (provided by the `Pygments` package)
15
-
16
- ## Clone the correct branch
17
-
18
- The plugin sources live on branch `ide-plugins`. If you want to work from a
19
- fresh checkout, clone that branch explicitly:
20
-
21
- HTTPS:
22
- ```bash
23
- git clone --branch ide-plugins --single-branch https://github.com/uwe-at-sdv/sdv_doc_waterloo.git
24
- cd sdv_doc_waterloo
25
- ```
26
- SSH:
27
- ```bash
28
- git clone --branch ide-plugins --single-branch git+ssh://git@github.com/uwe-at-sdv/sdv_doc_waterloo.git
29
- cd sdv_doc_waterloo
30
- ```
31
-
32
- ## Quick test (no install)
33
-
34
- Run `pygmentize` directly against the lexer source file (no packaging/install needed):
35
-
36
- Dark terminal theme:
37
- ```bash
38
- pygmentize -x \
39
- -l pygments/python_waterloo_lexer.py:PythonWaterlooLexer -f terminal16m -O style=monokai \
40
- examples-python/example_function_full.py
41
- ```
42
- Light terminal theme:
43
- ```bash
44
- pygmentize -x \
45
- -l pygments/python_waterloo_lexer.py:PythonWaterlooLexer -f terminal16m -O style=friendly \
46
- examples-python/example_function_full.py
47
- ```
48
-
49
- ## Terminal viewer
50
-
51
- For ad-hoc file viewing in a terminal, a simple `less` alias can be useful:
52
-
53
- ```bash
54
- alias lessh='LESSOPEN="| pygmentize -O style=monokai %s" less -M -R'
55
- ```
56
-
57
- Then use:
58
-
59
- ```bash
60
- lessh examples-python/example_function_full.py
61
- ```
62
-
63
- If your system already provides `lesspipe`, you can also wire that into your
64
- shell startup file and have `less` itself perform the preprocessing step.
65
-
66
- ## Install from a local checkout
67
-
68
- If you have cloned the repository, install the lexer package from this folder:
69
-
70
- ```bash
71
- pip install ./pygments
72
- ```
73
-
74
- For development, an editable install can be convenient:
75
-
76
- ```bash
77
- pip install -e ./pygments
78
- ```
79
-
80
- ### Sanity check (after install)
81
-
82
- The lexer should be discoverable by its alias:
83
-
84
- ```bash
85
- pygmentize -l python-waterloo -f terminal16m examples-python/example_function_full.py
86
- ```
87
-
88
- Tip: You can also check whether Pygments lists the lexer:
89
-
90
- ```bash
91
- pygmentize -L lexers | grep -i waterloo || true
92
- ```
93
-
94
- ## Install from PyPI (once available)
95
-
96
- ```bash
97
- pip install python-waterloo-lexer
98
- ```
99
-
100
- ## Install directly from Git
101
-
102
- If the repository is reachable by `pip`, the package can also be installed
103
- directly from a Git URL.
104
-
105
- **Important:** The `@ide-plugins` ref is required because this package is maintained on that branch.
106
-
107
- HTTPS:
108
- ```bash
109
- pip install "git+https://github.com/uwe-at-sdv/sdv_doc_waterloo.git@ide-plugins#subdirectory=pygments"
110
- ```
111
- SSH:
112
- ```bash
113
- pip install "git+ssh://git@github.com/uwe-at-sdv/sdv_doc_waterloo.git@ide-plugins#subdirectory=pygments"
114
- ```