Skip to content

Commit

Permalink
feat: rclone, obscure, rsync backup; fix
Browse files Browse the repository at this point in the history
  • Loading branch information
woniuzfb committed Apr 5, 2024
1 parent 35a78e3 commit 361e250
Show file tree
Hide file tree
Showing 68 changed files with 6,892 additions and 1,977 deletions.
22 changes: 22 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
- [参数详解](#参数详解)
- [举例](#举例)
- [Alist](#alist)
- [Rclone](#rclone)
- [Calibre](#calibre)
- [LianHuanHua](#lianhuanhua)
- [Dev](#dev)

Expand Down Expand Up @@ -257,6 +259,26 @@ wget https://woniuzfb.github.io/iptv/iptv.sh && bash iptv.sh
./debug ali
```

## Rclone

```bash
./debug rc
```

- remote
- mount
- serve
- sync

## Calibre

```bash
./debug cw
```

- calibre-web
- kcc

## LianHuanHua

```bash
Expand Down
2 changes: 1 addition & 1 deletion build
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ ReplaceInclude()
echo "${2:-}if [ \"\$self\" == \"tv\" ] || [ \"\$self\" == \"iptv\" ]"
echo "${2:-}then"
ReplaceInclude src/tv " ${2:-}"
bins=(v2 x nx or pve arm ibm cf cx ali lhh)
bins=(v2 x nx or pve arm ibm cf cx ali lhh rc cw)
for bin in "${bins[@]}"
do
echo "${2:-}elif [ \"\$self\" == \"$bin\" ]"
Expand Down
49 changes: 36 additions & 13 deletions core
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,42 @@ Trim()

JoinByChar()
{
local IFS="$1"
shift
echo "$*"
local IFS="$1"
shift
echo "$*"
}

JoinByString()
{
local separator="$1"
shift
local first="$1"
shift
printf "%s" "$first" "${@/#/$separator}"
local separator="$1"
shift
local first="$1"
shift
printf "%s" "$first" "${@/#/$separator}"
}

ToJsonArray()
{
local var=("$1"[@])
if [[ -z "${!var:-}" ]]
then
echo "[]"
return 0
fi
local arr=("${!var}")
local json_array=$(printf '%s\n' "${arr[@]}" | $JQ_FILE -R . | $JQ_FILE -s .)
echo $json_array
}

shopt -s extglob

EleInArray()
{
local ele="$1"
shift
local var=("$1"[@])
local arr=("${!var}")
[[ "$ele" == @($(JoinByChar '|' "${arr[@]//|/\\|}")) ]]
local ele="$1"
shift
local var=("$1"[@])
local arr=("${!var}")
[[ "$ele" == @($(JoinByChar '|' "${arr[@]//|/\\|}")) ]]
}

printf()
Expand Down Expand Up @@ -197,6 +210,16 @@ GetRandomMac()
echo $RANDOM|md5sum|sed 's/../&:/g'|cut -c 1-17
}

RemoveQuotes()
{
local text="${!1}"
if [[ "$text" =~ ^\"(.*)\"$ ]] || [[ "$text" =~ ^\'(.*)\'$ ]]
then
text="${BASH_REMATCH[1]}"
read -r ${1} <<< "$text"
fi
}

PrepTerm()
{
unset term_child_pid
Expand Down
Loading

0 comments on commit 361e250

Please sign in to comment.