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 2, 2024
1 parent 35a78e3 commit 4d10964
Show file tree
Hide file tree
Showing 63 changed files with 3,719 additions and 1,045 deletions.
21 changes: 21 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,25 @@ wget https://woniuzfb.github.io/iptv/iptv.sh && bash iptv.sh
./debug ali
```

## Rclone

```bash
./debug rc
```

- remote
- mount
- serve

## 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
44 changes: 31 additions & 13 deletions core
Original file line number Diff line number Diff line change
Expand Up @@ -13,29 +13,37 @@ 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"[@])
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 +205,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 4d10964

Please sign in to comment.