https://github.com/nitanmarcel/r2pygments
Radare2 themes as pygments styles
https://github.com/nitanmarcel/r2pygments
Last synced: 2 months ago
JSON representation
Radare2 themes as pygments styles
- Host: GitHub
- URL: https://github.com/nitanmarcel/r2pygments
- Owner: nitanmarcel
- License: mit
- Created: 2024-09-30T08:10:55.000Z (8 months ago)
- Default Branch: main
- Last Pushed: 2024-09-30T11:31:38.000Z (8 months ago)
- Last Synced: 2025-03-25T02:45:45.891Z (3 months ago)
- Language: Python
- Size: 18.6 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Radare2 Pygments styles
Radare2 themes as pygments styles## Generate styles
### from source files
```bash
python3 -m radare_styles.generator {in[file/dir]} {out[file/dir]}
```### at runtime from source string as class
```python3
>>> theme = """
... ecd
... ec ai.exec rgb:6d6
... ec ai.read rgb:66d
... ec ai.write rgb:d66
... """>>> from radare_styles.generator import generate_pygments_style
>>> cls = generate_pygments_style(theme, "themename")```
### at runtime from source string as dict
```python3
>>> theme = """
... ecd
... ec ai.exec rgb:6d6
... ec ai.read rgb:66d
... ec ai.write rgb:d66
... """>>> from radare_styles.generator import generate_pygments_style_dict
>>> _dict = generate_pygments_style_dict(theme, "themename")
{'background_color': '#000', 'name': 'r2name', ...}
```### at runtime from prebuild styles
```python3
>>> from radare_styles import get_style
>>> get_style("ayu")```