Skip to content

Commit 25bfae9

Browse files
committed
🐛 Fixed installation snippet in README.md
Installation script wasn't working since there was a mistake in the repo's link of the snippet. - 📝 Added installation instructions for Pipx - 🐛 Fixed `homepage` and `repository` links in `pyproject.toml`
1 parent 937b272 commit 25bfae9

File tree

2 files changed

+31
-9
lines changed

2 files changed

+31
-9
lines changed

README.md

+29-7
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,10 @@ being the minimum required.
2727

2828
The `pygments-rose-pine` package is not currently published to [PyPI](https://pypi.org/).
2929
If, however, you still wish to install this package, the following steps
30-
*should* work to install the [latest release](https://github.com/drearondov/pygments-rose-pine/releases/latest).
30+
_should_ work to install the [latest release](https://github.com/drearondov/pygments-rose-pine/releases/latest).
3131

3232
```bash
33-
repo="git@github.com:rose-pine/pygments.git"
33+
repo="https://github.com/rose-pine/pygments"
3434

3535
# Find the latest release.
3636
latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags.
@@ -47,6 +47,28 @@ release="${repo}/releases/download/${latest}/${wheel}"
4747
pip install $release
4848
```
4949

50+
You can also use [Pipx](https://github.com/pypa/pipx) to install it, but bear in
51+
mind that you need to inject the package in the `venv` of the tool you want to
52+
use it with. So the script will be:
53+
54+
```bash
55+
repo="https://github.com/rose-pine/pygments"
56+
57+
# Find the latest release.
58+
latest=$(git ls-remote --tags --refs $repo | # Fetch remote tags.
59+
sort -t '/' -k 3 -V | # Sort them by version.
60+
tail -n 1 | # Take the latest one.
61+
awk -F / '{print $3}') # Return only the tag.
62+
63+
# Craft the URL for the release asset.
64+
version=$(echo $latest | tr -d 'v') # Remove the leading v.
65+
wheel="pygments_rose_pine-${version}-py3-none-any.whl"
66+
release="${repo}/releases/download/${latest}/${wheel}"
67+
68+
# Install the release.
69+
pipx inject {name of the tool} $release
70+
```
71+
5072
## Usage
5173

5274
The style installs itself as a [Pygments plugin](https://pygments.org/docs/plugins/#entrypoints),
@@ -69,7 +91,7 @@ config = get_config()
6991
config.TerminalInteractiveShell.highlighting_style = "rose-pine"
7092
```
7193

72-
> *Note:* This will only affect your syntax highlighting. If you're looking to
94+
> _Note:_ This will only affect your syntax highlighting. If you're looking to
7395
> modify your prompt, Reilly Siemmens from the
7496
> [IPython Gruvbox theme](https://github.com/reillysiemens/ipython-style-gruvbox)
7597
> has an excellent [example prompt](https://github.com/reillysiemens/dotfiles/blob/8994f69f23271aa93d83e81032542f17b38423fd/.ipython/profile_default/ipython_config.py)
@@ -84,18 +106,18 @@ In the case of Radian, you can add the theme to your
84106
options(radian.color_scheme = "rose-pine")
85107
```
86108

87-
> *Note:* For radian, the prompt modification options can be found on their [documentation](https://github.com/randy3k/radian).
109+
> _Note:_ For radian, the prompt modification options can be found on their [documentation](https://github.com/randy3k/radian).
88110
89111
## Gallery
90112

91-
*Rose Piné*
113+
_Rose Piné_
92114

93115
![Rosé Pine](docs/static/rose-pine.png)
94116

95-
*Rose Piné Moon*
117+
_Rose Piné Moon_
96118

97119
![Rosé Pine Moon](docs/static/rose-pine-moon.png)
98120

99-
*Rose Piné Dawn*
121+
_Rose Piné Dawn_
100122

101123
![Rosé Pine Dawn](docs/static/rose-pine-dawn.png)

pyproject.toml

+2-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ description = "Soho vibes for Pygments"
55
license = "ISC"
66
authors = ["Andrea Rondón <[email protected]>"]
77
readme = "README.md"
8-
homepage = "https://github.com/drearondov/pygments-rose-pine"
9-
repository = "https://github.com/drearondov/pygments-rose-pine"
8+
homepage = "https://github.com/rose-pine/pygments-rose-pine"
9+
repository = "https://github.com/rose-pine/pygments-rose-pine"
1010
keywords = ["pygments-style", "pygments", "rose-pine", "IPython", "radian"]
1111
classifiers = [
1212
"Development Status :: 5 - Production/Stable",

0 commit comments

Comments
 (0)