-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #11 from JeromeSchmied/dev
display pattern names
- Loading branch information
Showing
12 changed files
with
132 additions
and
79 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
[package] | ||
name = "cgol-tui" | ||
version = "0.5.3" | ||
version = "0.6.1" | ||
authors = ["Jeromos Kovacs <[email protected]>"] | ||
edition = "2021" | ||
description = "Conway's Game of Life implementation with a TUI" | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/usr/bin/env fish | ||
|
||
set cmd $argv[1] | ||
if test "$cmd" = all; or test "$cmd" = any; or test "$cmd" = "" | ||
for line in "$(curl https://conwaylife.com/patterns/ | rg .cells)" | ||
echo $line | string split '"' -f 2 | ||
end | ||
return 0 | ||
end | ||
set pattern "$(string replace '.cells' '' $cmd)" | ||
echo "pattern: '$pattern'" | ||
set url "https://conwaylife.com/patterns/$pattern.cells" | ||
echo "url: '$url'" | ||
if test "$argv[2]" = --download; or test "$argv[2]" = -d | ||
set p "/tmp/$pattern.cells" | ||
if test -e $p | ||
echo "already saved to '$p'" | ||
else | ||
echo "saving to '$p'" | ||
curl $url -o $p | ||
end | ||
else | ||
curl $url | cgol-tui - | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.