Skip to content

Commit

Permalink
Create LICENSE
Browse files Browse the repository at this point in the history
  • Loading branch information
yunfachi committed Oct 1, 2023
1 parent 61c298b commit be8d383
Show file tree
Hide file tree
Showing 14 changed files with 44 additions and 219 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2023 yunfachi

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
13 changes: 0 additions & 13 deletions LICENSE.md

This file was deleted.

7 changes: 3 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@

# <p align="center">yunfaAvatar</p>

Utility for automatic centralized changing of avatar in Github, Discord, Steam, Hypixel, etc.


## Usage
```bash
Expand All @@ -25,11 +25,10 @@ yunfaavatar --avatar=cat.png --cropped_x=50 --cropped_y=50
# discord=true
yunfaavatar --avatar=cute_cat.png
```

## Services
- GitHub
- Discord
- Steam
- Habr Q&A (habrqna)
- Hypixel

42 changes: 0 additions & 42 deletions default.nix

This file was deleted.

18 changes: 2 additions & 16 deletions services/discord.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

INFO "Updating avatar in Discord"

Expand All @@ -27,4 +13,4 @@ upload=$(curl -s \

RESPONSE "DISCORD-UPLOAD" "${upload}"

INFO "Updated avatar in Discord"
INFO "Updated avatar in Discord"
18 changes: 2 additions & 16 deletions services/github.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

INFO "Updating avatar in GitHub"

Expand Down Expand Up @@ -69,4 +55,4 @@ save=$(curl -s \

RESPONSE "GITHUB-SAVE" "${save}"

INFO "Updated avatar in GitHub"
INFO "Updated avatar in GitHub"
18 changes: 2 additions & 16 deletions services/habrqna.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

INFO "Updating avatar in Habr Q&A"

Expand Down Expand Up @@ -55,4 +41,4 @@ save=$(curl -s \

RESPONSE "HABRQNA-SAVE" "${save}"

INFO "Updated avatar in Habr Q&A"
INFO "Updated avatar in Habr Q&A"
18 changes: 2 additions & 16 deletions services/hypixel.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

INFO "Updating avatar in Hypixel"

Expand All @@ -39,4 +25,4 @@ upload=$(curl -s \

RESPONSE "HYPIXEL-UPLOAD" "${upload}"

INFO "Updated avatar in Hypixel"
INFO "Updated avatar in Hypixel"
18 changes: 2 additions & 16 deletions services/steam.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

INFO "Updating avatar in Steam"

Expand All @@ -30,4 +16,4 @@ upload=$(curl -s \

RESPONSE "STEAM-UPLOAD" "${upload}"

INFO "Updated avatar in Steam"
INFO "Updated avatar in Steam"
18 changes: 2 additions & 16 deletions utils/avatar.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

# Download
if [[ "$avatar" =~ ^"http" ]]; then
Expand Down Expand Up @@ -57,4 +43,4 @@ INFO "Avatar size is $(printf "%'.0f" $avatar_size) bytes"
# Base64
avatar_base64="data:image/png;base64,$(base64 -w 0 $avatar)"
printf "{\"avatar\":\"${avatar_base64}\"}" > $TEMP_DIR/avatar.json
INFO "Converted avatar to base64"
INFO "Converted avatar to base64"
18 changes: 2 additions & 16 deletions utils/config.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

read -rd '' config <<'EOF'
# ------------------------------------------- #
Expand Down Expand Up @@ -117,4 +103,4 @@ get_user_config() {
}

get_user_config
SPACE
SPACE
18 changes: 2 additions & 16 deletions utils/logger.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

reset="\e[0m"
endl="$reset\n"
Expand All @@ -37,4 +23,4 @@ RESPONSE() { if [ "${show_response}" == "true" ]; then

ERROR() { if [ "${show_error}" == "true" ]; then
printf "$error[ERROR]$delimiter ${1^^} :$text ${2^}$endl" >&2; fi
}
}
18 changes: 2 additions & 16 deletions utils/options.sh
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

optspec=":-:"
while getopts "$optspec" optchar; do
Expand All @@ -31,4 +17,4 @@ while getopts "$optspec" optchar; do
fi
;;
esac
done
done
18 changes: 2 additions & 16 deletions yunfaavatar
Original file line number Diff line number Diff line change
@@ -1,18 +1,4 @@
#!/usr/bin/env bash

# All Rights Reserved
#
# Copyright (c) 2023 yunfachi
#
# Created by yunfachi
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
#!/usr/bin/env bash

XDG_CONFIG_HOME=${XDG_CONFIG_HOME:-${HOME}/.config}
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" &> /dev/null && pwd)
Expand All @@ -34,4 +20,4 @@ done

rm -rf $TEMP_DIR
SPACE
INFO "Finished"
INFO "Finished"

0 comments on commit be8d383

Please sign in to comment.