docker部署收集 ACG 插画的机器人

项目地址

中文文档

简介

小さな小さな賢将,帮助你从各种网站收集 ACG 插画的 Telegram 机器人。

画板 1.png

功能特性

  • 各种网站 浏览和下载图片
  • 通过 Telegram 将图片添加到你的收藏中
  • 将图片收藏保存在 Telegram 频道中
  • 使用 多种方式 存储图片
  • 使用 多种数据库 存储图片元数据

docker-compose文件

version: "3.4"

services:
  nazurin:
    # Alternatively, you may use "yyoung01/nazurin:latest"
    image: ghcr.io/y-young/nazurin:latest
    build: .
    env_file:
      - ".env"
    volumes:
      - "./data:/app/data"
    ports:
      - "7780:80"
    restart: unless-stopped
    user: "root"  # Add this line to run as root

.env文件

# ---------- Required ----------
# Telegram bot token
 TOKEN = 6784432376:AAFJnwvZ5j4QdoJG22hJ7OMrRNkTIxxxx

# Environment
# production: Webhook mode, development: Polling mode
ENV = development

# Webhook url, eg: https://xxx.fly.dev/, should end with '/'
# Required if using Webhook mode
# WEBHOOK_URL =

# Host to bind to, set to 127.0.0.1 if you are using a reverse proxy
# Required if using Webhook mode
 HOST = 127.0.0.1 

# Port to bind to, comment out this entry if on Heroku or fly.io
# Required if using Webhook mode
 PORT = 7780

# Storage types, seperated by commas
STORAGE = Local,Telegram

# Database type
DATABASE = Local

# Telegram gallery channel ID, optional
 GALLERY_ID = -100196404xxx

# Admin user ID
 ADMIN_ID = 5435283xxx

# ---------- Optional ----------
# Directory path for storage
STORAGE_DIR = Pictures

# Whether to make this bot public
IS_PUBLIC = false

# If IS_PUBLIC is True, the following items will be ignored
# Allowed user ID(s)
# ALLOW_ID =

# Allowed username(s)
# ALLOW_USERNAME = 

# Allowed group ID(s)
# ALLOW_GROUP =

# Retry attempts
RETRIES = 5

# Request timeout
TIMEOUT = 10

# Ignored items in image caption
# CAPTION_IGNORE =

# Temporary directory cleanup interval, in days
CLEANUP_INTERVAL = 7

# ----- Google services -----
# API credential for Firebase & Google Drive
# GOOGLE_APPLICATION_CREDENTIALS =

# ---------- Site ----------
# ----- Artstation -----
# File directory
# ARTSTATION_FILE_PATH = Artstation

# File name
# ARTSTATION_FILE_NAME = {title} ({hash_id}) - {filename}

# ----- Bilibili -----
# File directory
# BILIBILI_FILE_PATH = Bilibili

# File name
# BILIBILI_FILE_NAME = {dynamic_id_str}_{index} - {user[name]}({user[uid]})

# ----- Danbooru -----
# File directory
# DANBOORU_FILE_PATH = Danbooru

# File name
# DANBOORU_FILE_NAME = {id} - {filename}

# ----- DeviantArt -----
# File directory
# DEVIANT_ART_FILE_PATH = DeviantArt

# File name
# DEVIANT_ART_FILE_NAME = {title} - {deviationId}

# Name for download files
# DEVIANT_ART_DOWNLOAD_NAME = {title} - {deviationId} - {prettyName}

# ----- Gelbooru -----
# File directory
# GELBOORU_FILE_PATH = Gelbooru

# File name
# GELBOORU_FILE_NAME = {id}

# ----- Lofter -----
# File directory
# LOFTER_FILE_PATH = Lofter

# File name
# LOFTER_FILE_NAME = {id}_{index} - {nickName}({blogName})

# ----- Moebooru -----
# File directory
# {site_name} -> Yandere, {site_url} -> 'yande.re'
# MOEBOORU_FILE_PATH = {site_name}

# File name
# MOEBOORU_FILE_NAME = {filename}

# ----- Pixiv -----
# Refresh token
# PIXIV_TOKEN =

# Image mirror, optional
# PIXIV_MIRROR = i.pximg.net

# Tag translation, optional
# PIXIV_TRANSLATION =

# Bookmark privacy (public/private), optional
PIXIV_BOOKMARK_PRIVACY = public

# File directory
# PIXIV_FILE_PATH = Pixiv

# File name
# PIXIV_FILE_NAME = {filename} - {title} - {user[name]}({user[id]})

# ----- Twitter -----

# API selection, optional

# TWITTER_API = web

# Auth Token for web API, optional
# TWITTER_AUTH_TOKEN =

# File directory
# TWITTER_FILE_PATH = Twitter

# File name
# TWITTER_FILE_NAME = {id_str}_{index} - {user[name]}({user[id_str]})

# ----- Wallhaven -----
# API key, optional
# WALLHAVEN_API_KEY =

# File directory
# WALLHAVEN_FILE_PATH = Wallhaven

# File name
# WALLHAVEN_FILE_NAME = {id}

# ----- Weibo -----
# File directory
# WEIBO_FILE_PATH = Weibo

# File name
# WEIBO_FILE_NAME = {mid}_{index} - {user[screen_name]}({user[id]})

# ----- Zerochan -----
# File directory
# ZEROCHAN_FILE_PATH = Zerochan

# File name
# ZEROCHAN_FILE_NAME = {id} - {name}

# ---------- Database ----------
# ----- MongoDB -----
# MONGO_URI = mongodb://localhost:27017/nazurin

# ----- Cloudant -----
# CLOUDANT_USERNAME =
# CLOUDANT_APIKEY =
# CLOUDANT_DATABASE = nazurin

# ---------- Storage ----------
# ----- Telegram -----
# Album channel ID
  ALBUM_ID = -100196404xxx

# ----- MEGA -----
# MEGA_USER =
# MEGA_PASS =

# ----- Google Drive -----
# Folder ID
# GD_FOLDER =

# ----- OneDrive -----
# Application(client) ID
# OD_CLIENT =

# Refresh token
# OD_RF_TOKEN =

# Client secret 
# OD_SECRET =

# ----- S3 -----
# Endpoint
# S3_ENDPOINT = s3.amazonaws.com

# Access key
# S3_ACCESS_KEY =

# Secret key
# S3_SECRET_KEY =

# Using SSL
# S3_USE_SSL = True

# Region
# S3_REGION =

# Bucket name
# S3_BUCKET = nazurin
最后修改:2023 年 12 月 02 日
如果觉得我的文章对你有用,请随意赞赏