mirror of
https://github.com/daylinmorgan/yartsu.git
synced 2024-11-10 00:23:15 -06:00
fix(#4): demo takes precedence
This commit is contained in:
parent
a14608d21c
commit
c888fa53f9
4 changed files with 23 additions and 77 deletions
|
@ -1,55 +0,0 @@
|
|||
<div id="top"></div>
|
||||
|
||||
# Themes
|
||||
|
||||
Available themes:
|
||||
|
||||
- [cat-mocha](#cat-mocha)
|
||||
- [cat-macchiato](#cat-macchiato)
|
||||
- [cat-frappe](#cat-frappe)
|
||||
- [cat-latte](#cat-latte)
|
||||
- [dracula](#dracula)
|
||||
- [gruvbox-dark](#gruvbox-dark)
|
||||
- [gruvbox-light](#gruvbox-light)
|
||||
- [nord](#nord)
|
||||
- [dimmed_monokai](#dimmed/monokai)
|
||||
- [monokai](#monokai)
|
||||
- [night-owlish](#night-owlish)
|
||||
- [rich-default](#rich-default)
|
||||
|
||||
## cat-mocha
|
||||
![cat-mocha](./themes/cat-mocha.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## cat-macchiato
|
||||
![cat-macchiato](./themes/cat-macchiato.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## cat-frappe
|
||||
![cat-frappe](./themes/cat-frappe.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## cat-latte
|
||||
![cat-latte](./themes/cat-latte.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## dracula
|
||||
![dracula](./themes/dracula.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## gruvbox-dark
|
||||
![gruvbox-dark](./themes/gruvbox-dark.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## gruvbox-light
|
||||
![gruvbox-light](./themes/gruvbox-light.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## nord
|
||||
![nord](./themes/nord.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## dimmed_monokai
|
||||
![dimmed_monokai](./themes/dimmed_monokai.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## monokai
|
||||
![monokai](./themes/monokai.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## night-owlish
|
||||
![night-owlish](./themes/night-owlish.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
## rich-default
|
||||
![rich-default](./themes/rich-default.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
|
@ -31,9 +31,10 @@ plugins:
|
|||
enable_creation_date: true
|
||||
|
||||
markdown_extensions:
|
||||
- def_list
|
||||
- pymdownx.highlight:
|
||||
anchor_linenums: true
|
||||
- pymdownx.inlinehilite
|
||||
- pymdownx.snippets
|
||||
- pymdownx.superfences
|
||||
- pymdownx.tabbed:
|
||||
alternate_style: true
|
||||
|
|
|
@ -4,32 +4,26 @@ THEME_MD="./docs/themes.md"
|
|||
|
||||
themes=$(yartsu --list-themes | tail -n +5 | cut -d' ' -f 3)
|
||||
|
||||
newline() {
|
||||
echo >>"$THEME_MD"
|
||||
}
|
||||
|
||||
mkdir -p ./docs/themes
|
||||
rm -f ./docs/themes/*
|
||||
rm -f $THEME_MD
|
||||
yartsu -o docs/themes/list.svg -- yartsu --list-themes
|
||||
|
||||
echo '<div id="top"></div>' >>$THEME_MD
|
||||
newline
|
||||
echo "# Themes" >>$THEME_MD
|
||||
newline
|
||||
cat >>"$THEME_MD" <<EOF
|
||||
# Themes
|
||||
|
||||
printf "Available themes:\n\n" >>$THEME_MD
|
||||
<p align='center'>
|
||||
<img src="/yartsu/themes/list.svg" width="50%">
|
||||
</p>
|
||||
|
||||
for theme in $themes; do
|
||||
echo "- [$theme](#${theme//_//})" >>$THEME_MD
|
||||
done
|
||||
newline
|
||||
See below for example outputs of each.
|
||||
EOF
|
||||
|
||||
for theme in $themes; do
|
||||
url="docs/themes/${theme}.svg"
|
||||
cat >>"$THEME_MD" <<EOF
|
||||
## $theme
|
||||
![$theme](./themes/${theme}.svg)
|
||||
<p align="right">(<a href="#top">back to top</a>)</p>
|
||||
=== "$theme"
|
||||
![$theme](./themes/${theme}.svg)
|
||||
EOF
|
||||
yartsu --theme "$theme" -o "$url" --demo -t "yartsu --theme ${theme} --demo"
|
||||
done
|
||||
|
|
|
@ -106,13 +106,19 @@ def main() -> None:
|
|||
else:
|
||||
cmd = None
|
||||
|
||||
if args.input:
|
||||
parsed_input = Text.from_ansi(args.input.read())
|
||||
|
||||
elif args.demo:
|
||||
console = Console(file=io.StringIO(), record=True, force_terminal=True)
|
||||
if args.demo:
|
||||
console = Console(
|
||||
file=io.StringIO(),
|
||||
record=True,
|
||||
force_terminal=True,
|
||||
color_system="truecolor",
|
||||
legacy_windows=False,
|
||||
)
|
||||
parsed_input = make_test_card() # type: ignore
|
||||
|
||||
elif args.input:
|
||||
parsed_input = Text.from_ansi(args.input.read())
|
||||
|
||||
title = args.title or cmd or "yartsu"
|
||||
|
||||
if args.width:
|
||||
|
|
Loading…
Reference in a new issue