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