Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Some features (stretching, 2d flags, installer) #39

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
.vscode/
.DS_Store
.idea/
pridecat
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CXX ?= clang
all: pridecat

pridecat: main.cpp
$(CXX) main.cpp -o pridecat -std=c++11 -lstdc++ -Wall -Wextra -O3
$(CXX) main.cpp -o pridecat -std=c++17 -lstdc++ -Wall -Wextra -O3

install: pridecat
cp pridecat /usr/local/bin/pridecat
Expand Down
25 changes: 24 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ Colorize your terminal output with pride!

--pansexual,--pan
Pansexual pride flag designed by Evie Varney in 2010

--progress-pride,--progress
Progress pride flag designed by Daniel Quasar in 2018


--transgender,--trans
Transgender pride flag designed by Monica Helms in 1999
Expand All @@ -73,10 +77,18 @@ Colorize your terminal output with pride!
-T,--no-truecolor
Force disable truecolor output (even if the terminal does seem to support it)

-s,--stretch <height>
Stretch the flag to a certain height before repeating

-h,--help
Display the help page
```

## Installation (Linux)
```bash
curl -s https://raw.githubusercontent.com/lunasorcery/pridecat/main/install.sh | bash
```

## Building

On any *nix system it _should_ be as simple as:
Expand All @@ -87,7 +99,18 @@ cd pridecat
make && make install
```

This depends on a recent (C++11) C++ compiler being available. If you encounter issues, please let me know.
This depends on a recent (C++17) C++ compiler being available. If you encounter issues, please let me know.

## Uninstall (Linux)
```bash
rm -f /usr/local/bin/pridecat
```
or
```
git clone https://github.com/lunasorcery/pridecat.git
cd pridecat
make uninstall
```

## Windows support?

Expand Down
86 changes: 86 additions & 0 deletions install.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
#!/bin/bash

# Define the colors of the pride flag
RED='\033[38;2;228;3;3m'
ORANGE='\033[38;2;255;140;0m'
YELLOW='\033[38;2;255;237;0m'
GREEN='\033[38;2;0;128;38m'
BLUE='\033[38;2;0;77;255m'
PURPLE='\033[38;2;117;7;135m'
NC='\033[0m' # No Color

# Print the Pridecat banner with pride flag colors
echo -e "${RED}mmmmm mmmmm mmmmm mmmm mmmmmm mmm mm mmmmmmm${NC}"
echo -e "${ORANGE}# \"# # \"# # # \"m # m\" \" ## # ${NC}"
echo -e "${YELLOW}#mmm#\" #mmmm\" # # # #mmmmm # # # # ${NC}"
echo -e "${GREEN}# # \"m # # # # # #mm# # ${NC}"
echo -e "${BLUE}# # \" mm#mm #mmm\" #mmmmm \"mmm\" # # # ${NC}"
echo -e "${PURPLE}Welcome to the Pridecat installation script!${NC}"

printf "\n"

echo -e "${GREEN}Do you want a simple or advanced setup? (s/a; default: s)${NC}"
read setup_type

if [ "$setup_type" = "a" ]; then
echo -e "${RED}Advanced setup selected. ${NC}"
echo -e "${GREEN}Fetching forks...${NC}"
repos=$(curl -s https://api.github.com/repos/lunasorcery/pridecat/forks | jq -r '.[].full_name')
repos=("lunasorcery/pridecat" $repos)

echo -e "${GREEN}Please select a repo (1 is the official repo):${NC}"
select repo in "${repos[@]}"; do
if [[ -n $repo ]]; then
echo -e "${GREEN}Using $repo${NC}"
break
else
echo -e "${RED}Invalid option${NC}"
exit 1
fi
done

echo -e "${GREEN}Fetching branches...${NC}"
branches=$(curl -s https://api.github.com/repos/$repo/branches | jq -r '.[].name')
if [ ${#branches[@]} -eq 1 ]; then
branch=${branches[0]}
echo -e "${GREEN}Only one branch found: $branch. Using it.${NC}"
else
echo -e "${GREEN}Please select a branch (1 is the main branch):${NC}"
select branch in "${branches[@]}"; do
if [[ -n $branch ]]; then
echo -e "${GREEN}Using $branch${NC}"
break
else
echo -e "${RED}Invalid option${NC}"
exit 1
fi
done
fi

echo -e "${GREEN}Setting up the advanced setup...${NC}"
mkdir .temp-pridecat
cd .temp-pridecat
echo -e "${GREEN}Downloading the files...${NC}"
wget https://raw.githubusercontent.com/$repo/$branch/Makefile > /dev/null 2>&1
wget https://raw.githubusercontent.com/$repo/$branch/main.cpp > /dev/null 2>&1
echo -e "${GREEN}Building and installing...${NC}"
make && sudo make install
echo -e "${GREEN}Cleaning up...${NC}"
cd ..
rm -rf .temp-pridecat
echo "Done!" | pridecat

else
echo -e "${GREEN}Setting up the simple setup...${NC}"
mkdir .temp-pridecat
cd .temp-pridecat
echo -e "${GREEN}Downloading the files...${NC}"
wget https://raw.githubusercontent.com/lunasorcery/pridecat/main/Makefile > /dev/null 2>&1
wget https://raw.githubusercontent.com/lunasorcery/pridecat/main/main.cpp > /dev/null 2>&1
echo -e "${GREEN}Building and installing...${NC}"
make && sudo make install
echo -e "${GREEN}Cleaning up...${NC}"
cd ..
rm -rf .temp-pridecat
echo "Done!" | pridecat
fi
Loading