Files
SaveAny-Bot/en/index.xml
2026-06-28 10:00:28 +00:00

300 lines
25 KiB
XML

<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Introduction on Save Any Bot</title><link>https://sabot.unv.app/en/</link><description>Recent content in Introduction on Save Any Bot</description><generator>Hugo</generator><language>en</language><atom:link href="https://sabot.unv.app/en/index.xml" rel="self" type="application/rss+xml"/><item><title>Silent Mode</title><link>https://sabot.unv.app/en/usage/silent/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/silent/</guid><description>&lt;h1 id="silent-mode-silent">
Silent Mode (silent)
&lt;a class="anchor" href="#silent-mode-silent">#&lt;/a>
&lt;/h1>
&lt;p>Use the &lt;code>/silent&lt;/code> command to toggle silent mode.&lt;/p>
&lt;p>By default, silent mode is off, and the bot will ask you for the save location of each file.&lt;/p>
&lt;p>When silent mode is enabled, the bot will save files directly to the default location without confirmation.&lt;/p>
&lt;p>Before enabling silent mode, you need to set the default save location using the &lt;code>/storage&lt;/code> command.&lt;/p></description></item><item><title>Storage Rules</title><link>https://sabot.unv.app/en/usage/rules/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/rules/</guid><description>&lt;h1 id="storage-rules">
Storage Rules
&lt;a class="anchor" href="#storage-rules">#&lt;/a>
&lt;/h1>
&lt;p>Storage rules allow you to define redirection rules when the bot uploads files to storage, so that saved files are automatically organized.&lt;/p>
&lt;p>See: &lt;a href="https://github.com/krau/SaveAny-Bot/issues/28" target="_blank">#28&lt;/a>&lt;/p>
&lt;p>Currently supported rule types:&lt;/p>
&lt;ol>
&lt;li>FILENAME-REGEX&lt;/li>
&lt;li>MESSAGE-REGEX&lt;/li>
&lt;li>IS-ALBUM&lt;/li>
&lt;/ol>
&lt;p>Basic syntax for adding rules:&lt;/p>
&lt;p>&amp;ldquo;RuleType RuleContent StorageName Path&amp;rdquo;&lt;/p>
&lt;p>Pay attention to spaces; the bot can only parse correctly formatted syntax. Below is an example of a valid rule command:&lt;/p>
&lt;pre tabindex="0">&lt;code>/rule add FILENAME-REGEX (?i)\.(mp4|mkv|ts|avi|flv)$ MyAlist /videos
&lt;/code>&lt;/pre>&lt;p>In addition, if &lt;code>CHOSEN&lt;/code> is used as the storage name in the rule, it means files will be stored under the path of the storage you selected by clicking the inline button.&lt;/p></description></item><item><title>Watch Chats</title><link>https://sabot.unv.app/en/usage/watch/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/watch/</guid><description>&lt;h1 id="watch-chats">
Watch Chats
&lt;a class="anchor" href="#watch-chats">#&lt;/a>
&lt;/h1>
&lt;blockquote class="book-hint warning">
This feature requires enabling UserBot integration.
&lt;/blockquote>
&lt;p>You can watch messages in a specific chat and automatically save them to the default storage, following storage rules. You can also add filters so that only matching messages are saved.&lt;/p>
&lt;p>Watch a chat:&lt;/p>
&lt;pre tabindex="0">&lt;code>/watch &amp;lt;chat_id/username&amp;gt; [filter]
&lt;/code>&lt;/pre>&lt;p>Stop watching:&lt;/p>
&lt;pre tabindex="0">&lt;code>/unwatch &amp;lt;chat_id/username&amp;gt;
&lt;/code>&lt;/pre>&lt;p>Filter types:&lt;/p>
&lt;h2 id="msgre">
msgre
&lt;a class="anchor" href="#msgre">#&lt;/a>
&lt;/h2>
&lt;p>Regex-match the message text. For example:&lt;/p>
&lt;pre tabindex="0">&lt;code>/watch 12345678 msgre:.*hello.*
&lt;/code>&lt;/pre>&lt;p>This will watch the chat with ID &lt;code>12345678&lt;/code>, and only save messages whose text contains &lt;code>hello&lt;/code>.&lt;/p></description></item><item><title>Direct Download Links</title><link>https://sabot.unv.app/en/usage/directlinks/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/directlinks/</guid><description>&lt;h1 id="direct-download-links">
Direct Download Links
&lt;a class="anchor" href="#direct-download-links">#&lt;/a>
&lt;/h1>
&lt;p>Use the &lt;code>/dl&lt;/code> command to directly download one or more HTTP/HTTPS files to storage.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>/dl &amp;lt;url1&amp;gt; &lt;span style="color:#f92672">[&lt;/span>url2&lt;span style="color:#f92672">]&lt;/span> &lt;span style="color:#f92672">[&lt;/span>url3&lt;span style="color:#f92672">]&lt;/span> ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Examples:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>/dl https://example.com/file.zip
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/dl https://example.com/file1.zip https://example.com/file2.zip
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The bot will validate the link format and then ask you to select the target storage location.&lt;/p></description></item><item><title>Aria2 Download</title><link>https://sabot.unv.app/en/usage/aria2/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/aria2/</guid><description>&lt;h1 id="aria2-download">
Aria2 Download
&lt;a class="anchor" href="#aria2-download">#&lt;/a>
&lt;/h1>
&lt;blockquote class="book-hint warning">
This feature requires enabling Aria2 in the configuration file and configuring the RPC connection.
&lt;/blockquote>
&lt;p>Use the &lt;code>/aria2dl&lt;/code> command to download files via the Aria2 download manager, supporting HTTP/HTTPS, FTP, BitTorrent, and other protocols.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>/aria2dl &amp;lt;uri1&amp;gt; &lt;span style="color:#f92672">[&lt;/span>uri2&lt;span style="color:#f92672">]&lt;/span> &lt;span style="color:#f92672">[&lt;/span>uri3&lt;span style="color:#f92672">]&lt;/span> ...
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Examples:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Download HTTP link&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/aria2dl https://example.com/file.zip
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Download magnet link&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/aria2dl magnet:?xt&lt;span style="color:#f92672">=&lt;/span>urn:btih:...
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Download torrent file (need to upload .torrent file first)&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/aria2dl https://example.com/file.torrent
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Configure Aria2:&lt;/p></description></item><item><title>yt-dlp Video Download</title><link>https://sabot.unv.app/en/usage/ytdlp/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/ytdlp/</guid><description>&lt;h1 id="yt-dlp-video-download">
yt-dlp Video Download
&lt;a class="anchor" href="#yt-dlp-video-download">#&lt;/a>
&lt;/h1>
&lt;blockquote class="book-hint warning">
This feature requires the yt-dlp command-line tool installed on your system.
&lt;/blockquote>
&lt;p>Use the &lt;code>/ytdlp&lt;/code> command to download videos and audio from supported video websites, including YouTube, Bilibili, Twitter, and 1000+ other sites.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>/ytdlp &amp;lt;url1&amp;gt; &lt;span style="color:#f92672">[&lt;/span>url2&lt;span style="color:#f92672">]&lt;/span> &lt;span style="color:#f92672">[&lt;/span>flags...&lt;span style="color:#f92672">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Examples:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Basic download&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/ytdlp https://www.youtube.com/watch?v&lt;span style="color:#f92672">=&lt;/span>dQw4w9WgXcQ
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Download multiple videos&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/ytdlp https://www.youtube.com/watch?v&lt;span style="color:#f92672">=&lt;/span>video1 https://www.youtube.com/watch?v&lt;span style="color:#f92672">=&lt;/span>video2
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Use custom parameters&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/ytdlp https://www.youtube.com/watch?v&lt;span style="color:#f92672">=&lt;/span>dQw4w9WgXcQ -f best
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/ytdlp https://www.youtube.com/watch?v&lt;span style="color:#f92672">=&lt;/span>dQw4w9WgXcQ --extract-audio --audio-format mp3
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Common parameters:&lt;/p></description></item><item><title>Storage Transfer</title><link>https://sabot.unv.app/en/usage/transfer/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/transfer/</guid><description>&lt;h1 id="storage-transfer">
Storage Transfer
&lt;a class="anchor" href="#storage-transfer">#&lt;/a>
&lt;/h1>
&lt;p>Use the &lt;code>/transfer&lt;/code> command to transfer files directly between different storages without going through Telegram.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>/transfer &amp;lt;source_storage&amp;gt;:/&amp;lt;source_path&amp;gt; &lt;span style="color:#f92672">[&lt;/span>filter&lt;span style="color:#f92672">]&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>Parameters:&lt;/p>
&lt;ul>
&lt;li>&lt;code>source_storage&lt;/code>: Source storage name&lt;/li>
&lt;li>&lt;code>source_path&lt;/code>: Source path&lt;/li>
&lt;li>&lt;code>filter&lt;/code>: Optional regex filter to transfer only matching files&lt;/li>
&lt;/ul>
&lt;p>Examples:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Transfer entire directory&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/transfer local1:/downloads
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Transfer files from specified path&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/transfer alist1:/media/photos
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Transfer only mp4 files&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/transfer webdav1:/videos &lt;span style="color:#e6db74">&amp;#34;.*\.mp4&lt;/span>$&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Transfer image files&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>/transfer local1:/pictures &lt;span style="color:#e6db74">&amp;#34;(?i)\.(jpg|png|gif)&lt;/span>$&lt;span style="color:#e6db74">&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>The bot will:&lt;/p></description></item><item><title>Save Files Outside Telegram</title><link>https://sabot.unv.app/en/usage/parsers/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/parsers/</guid><description>&lt;h1 id="save-files-outside-telegram">
Save Files Outside Telegram
&lt;a class="anchor" href="#save-files-outside-telegram">#&lt;/a>
&lt;/h1>
&lt;p>Besides files on Telegram, the bot can also save files from other websites via JavaScript plugins or built-in parsers.&lt;/p>
&lt;blockquote>
&lt;p>See the &lt;a href="../contribute">Contributing Parsers&lt;/a> document for details.&lt;/p>&lt;/blockquote>
&lt;p>Just send links that match the requirements of a parser to the bot. Currently built-in parsers include:&lt;/p>
&lt;ul>
&lt;li>Twitter&lt;/li>
&lt;li>Kemono&lt;/li>
&lt;/ul></description></item><item><title>File Naming &amp; Conflict Strategies</title><link>https://sabot.unv.app/en/usage/config/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/config/</guid><description>&lt;h1 id="file-naming--conflict-strategies">
File Naming &amp;amp; Conflict Strategies
&lt;a class="anchor" href="#file-naming--conflict-strategies">#&lt;/a>
&lt;/h1>
&lt;p>SaveAny-Bot lets you customize how saved files are named and how collisions with existing files are resolved, directly in Telegram via the &lt;code>/config&lt;/code> and &lt;code>/fnametmpl&lt;/code> commands.&lt;/p>
&lt;h2 id="config--user-configuration">
&lt;code>/config&lt;/code> — User Configuration
&lt;a class="anchor" href="#config--user-configuration">#&lt;/a>
&lt;/h2>
&lt;p>The &lt;code>/config&lt;/code> command opens an inline menu where you can change two per-user settings:&lt;/p>
&lt;ul>
&lt;li>&lt;strong>Filename strategy&lt;/strong> — how the saved file is named&lt;/li>
&lt;li>&lt;strong>Duplicate file strategy&lt;/strong> — what happens when a file with the same name already exists in the target storage&lt;/li>
&lt;/ul>
&lt;p>Settings are stored per user and apply to all of that user&amp;rsquo;s subsequent save/transfer tasks.&lt;/p></description></item><item><title>HTTP API</title><link>https://sabot.unv.app/en/usage/api/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/api/</guid><description>&lt;h1 id="http-api">
HTTP API
&lt;a class="anchor" href="#http-api">#&lt;/a>
&lt;/h1>
&lt;p>SaveAny-Bot provides an HTTP API that allows you to programmatically create download/transfer tasks, query task status, cancel tasks, and more — without going through Telegram.&lt;/p>
&lt;h2 id="enabling-the-api">
Enabling the API
&lt;a class="anchor" href="#enabling-the-api">#&lt;/a>
&lt;/h2>
&lt;p>Add or modify the following section in &lt;code>config.toml&lt;/code>:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-toml" data-lang="toml">&lt;span style="display:flex;">&lt;span>[&lt;span style="color:#a6e22e">api&lt;/span>]
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">enable&lt;/span> = &lt;span style="color:#66d9ef">true&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">host&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;0.0.0.0&amp;#34;&lt;/span> &lt;span style="color:#75715e"># Bind address, default 0.0.0.0&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">port&lt;/span> = &lt;span style="color:#ae81ff">8080&lt;/span> &lt;span style="color:#75715e"># Listen port, default 8080&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">token&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;your-token&amp;#34;&lt;/span> &lt;span style="color:#75715e"># Auth token — strongly recommended&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;p>You can also override these settings with environment variables (prefix &lt;code>SAVEANY_&lt;/code>):&lt;/p></description></item><item><title>CLI Subcommands</title><link>https://sabot.unv.app/en/usage/cli/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/usage/cli/</guid><description>&lt;h1 id="cli-subcommands">
CLI Subcommands
&lt;a class="anchor" href="#cli-subcommands">#&lt;/a>
&lt;/h1>
&lt;p>Besides running the Telegram bot with &lt;code>./saveany-bot&lt;/code> (no subcommand), the binary exposes two helper subcommands for moving local files into a storage backend: &lt;code>upload&lt;/code> (one-shot) and &lt;code>watch&lt;/code> (continuous).&lt;/p>
&lt;p>These subcommands load the same &lt;code>config.toml&lt;/code> as the bot, initialize the database and caches, then perform their task. They do &lt;strong>not&lt;/strong> start the Telegram bot itself, although storages of type &lt;code>telegram&lt;/code> will spin up the bot client just for the upload.&lt;/p></description></item><item><title>Installation and Updates</title><link>https://sabot.unv.app/en/deployment/installation/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/installation/</guid><description>&lt;h1 id="installation-and-updates">
Installation and Updates
&lt;a class="anchor" href="#installation-and-updates">#&lt;/a>
&lt;/h1>
&lt;h2 id="deploy-from-pre-compiled-binary-recommended">
Deploy from Pre-compiled Binary (Recommended)
&lt;a class="anchor" href="#deploy-from-pre-compiled-binary-recommended">#&lt;/a>
&lt;/h2>
&lt;p>Download the binary file for your platform from the &lt;a href="https://github.com/krau/SaveAny-Bot/releases">Release&lt;/a> page.&lt;/p>
&lt;p>Create a &lt;code>config.toml&lt;/code> file in the extracted directory, refer to the &lt;a href="../configuration">Configuration Guide&lt;/a> to edit the configuration file.&lt;/p>
&lt;p>Run:&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-bash" data-lang="bash">&lt;span style="display:flex;">&lt;span>chmod +x saveany-bot
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>./saveany-bot
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h3 id="daemon">
Daemon
&lt;a class="anchor" href="#daemon">#&lt;/a>
&lt;/h3>
&lt;div class="book-tabs">
&lt;input type="radio" class="toggle" name="tabs-daemon" id="tabs-daemon-0" checked="checked" />
&lt;label for="tabs-daemon-0">systemd (Regular Linux)&lt;/label>
&lt;div class="book-tabs-content markdown-inner">
Create a file &lt;code>/etc/systemd/system/saveany-bot.service&lt;/code> and write the following content:
&lt;pre>&lt;code class="language-text">[Unit]
Description=SaveAnyBot
After=systemd-user-sessions.service
[Service]
Type=simple
WorkingDirectory=/yourpath/
ExecStart=/yourpath/saveany-bot
Restart=always
[Install]
WantedBy=multi-user.target&lt;/code>&lt;/pre>
Enable startup on boot and start the service:
&lt;pre>&lt;code class="language-text">systemctl enable --now saveany-bot&lt;/code>&lt;/pre>
&lt;/div>
&lt;input type="radio" class="toggle" name="tabs-daemon" id="tabs-daemon-1" />
&lt;label for="tabs-daemon-1">procd (OpenWrt)&lt;/label>
&lt;div class="book-tabs-content markdown-inner">
&lt;h4>Add Boot Autostart Service&lt;/h4>
Create a file &lt;code>/etc/init.d/saveanybot&lt;/code>, refer to &lt;a href="https://github.com/krau/SaveAny-Bot/blob/main/docs/confs/wrt_init" target="_blank">wrt_init&lt;/a> and modify as needed:
&lt;pre>&lt;code class="language-text">#!/bin/sh /etc/rc.common
#This is the OpenWRT init.d script for SaveAnyBot
START=99
STOP=10
description=&amp;amp;#34;SaveAnyBot&amp;amp;#34;
WORKING_DIR=&amp;amp;#34;/mnt/mmc1-1/SaveAnyBot&amp;amp;#34;
EXEC_PATH=&amp;amp;#34;$WORKING_DIR/saveany-bot&amp;amp;#34;
start() {
echo &amp;amp;#34;Starting SaveAnyBot...&amp;amp;#34;
cd $WORKING_DIR
$EXEC_PATH &amp;amp;amp;
}
stop() {
echo &amp;amp;#34;Stopping SaveAnyBot...&amp;amp;#34;
killall saveany-bot
}
reload() {
stop
start
}&lt;/code>&lt;/pre>
Set permissions:
&lt;pre>&lt;code class="language-text">chmod &amp;#43;x /etc/init.d/saveanybot&lt;/code>&lt;/pre>
Then copy the file to &lt;code>/etc/rc.d&lt;/code> and rename it to &lt;code>S99saveanybot&lt;/code>, also set permissions:
&lt;pre>&lt;code class="language-text">chmod &amp;#43;x /etc/rc.d/S99saveanybot&lt;/code>&lt;/pre>
&lt;h4>Add Shortcut Commands&lt;/h4>
Create a file &lt;code>/usr/bin/sabot&lt;/code>, refer to &lt;a href="https://github.com/krau/SaveAny-Bot/blob/main/docs/confs/wrt_bin" target="_blank">wrt_bin&lt;/a> and modify as needed. Note that the file encoding here only supports ANSI 936.
Then set permissions:
&lt;pre>&lt;code class="language-text">chmod &amp;#43;x /usr/bin/sabot&lt;/code>&lt;/pre>
Usage: &lt;code>sudo sabot start|stop|restart|status|enable|disable&lt;/code>
&lt;/div>
&lt;/div>
&lt;h2 id="deploy-using-docker">
Deploy Using Docker
&lt;a class="anchor" href="#deploy-using-docker">#&lt;/a>
&lt;/h2>
&lt;h3 id="docker-compose">
Docker Compose
&lt;a class="anchor" href="#docker-compose">#&lt;/a>
&lt;/h3>
&lt;p>Download the &lt;a href="https://github.com/krau/SaveAny-Bot/blob/main/docker-compose.yml">docker-compose.yml&lt;/a> file, create a new &lt;code>config.toml&lt;/code> file in the same directory, refer to &lt;a href="https://github.com/krau/SaveAny-Bot/blob/main/config.example.toml">config.example.toml&lt;/a> to edit the configuration file.&lt;/p></description></item><item><title>Storage Configuration</title><link>https://sabot.unv.app/en/deployment/configuration/storages/</link><pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate><guid>https://sabot.unv.app/en/deployment/configuration/storages/</guid><description>&lt;h1 id="storage-configuration">
Storage Configuration
&lt;a class="anchor" href="#storage-configuration">#&lt;/a>
&lt;/h1>
&lt;p>Please first read the &lt;a href="../">Configuration Guide&lt;/a> to understand the basic format of the configuration file.&lt;/p>
&lt;h2 id="alist">
Alist
&lt;a class="anchor" href="#alist">#&lt;/a>
&lt;/h2>
&lt;p>&lt;code>type=alist&lt;/code>&lt;/p>
&lt;p>Stream mode is not supported.&lt;/p>
&lt;div class="highlight">&lt;pre tabindex="0" style="color:#f8f8f2;background-color:#272822;-moz-tab-size:4;-o-tab-size:4;tab-size:4;">&lt;code class="language-toml" data-lang="toml">&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">url&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;https://alist.example.com&amp;#34;&lt;/span> &lt;span style="color:#75715e"># URL of Alist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">username&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;your_username&amp;#34;&lt;/span> &lt;span style="color:#75715e"># Username for Alist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">password&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;your_password&amp;#34;&lt;/span> &lt;span style="color:#75715e"># Password for Alist&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">base_path&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;/path/saveanybot&amp;#34;&lt;/span> &lt;span style="color:#75715e"># Base path in Alist, all files will be stored under this path&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">token_exp&lt;/span> = &lt;span style="color:#ae81ff">3600&lt;/span> &lt;span style="color:#75715e"># Auto-refresh time for Alist access token, in seconds&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#a6e22e">token&lt;/span> = &lt;span style="color:#e6db74">&amp;#34;your_token&amp;#34;&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># Access token for Alist, optional, if not set, username and password will be used for authentication.&lt;/span>
&lt;/span>&lt;/span>&lt;span style="display:flex;">&lt;span>&lt;span style="color:#75715e"># When using token authentication, the token cannot be automatically refreshed&lt;/span>
&lt;/span>&lt;/span>&lt;/code>&lt;/pre>&lt;/div>&lt;h2 id="local-disk">
Local Disk
&lt;a class="anchor" href="#local-disk">#&lt;/a>
&lt;/h2>
&lt;p>&lt;code>type=local&lt;/code>&lt;/p></description></item></channel></rss>