Git Product home page Git Product logo

flowerss-bot's Introduction

Publish Docker image codecov

部署

Docker 部署

1.下载配置文件 在项目目录下新建 config.yml 文件

mkdir ~/flowerss &&\
wget -O ~/flowerss/config.yml \
    https://raw.githubusercontent.com/shedya/flowerss-bot/master/config.yml.sample

2.修改配置文件

vim ~/flowerss/config.yml

修改配置文件中sqlite路径(如果使用sqlite作为数据库):

sqlite:
  path: /root/.flowerss/data.db

3.运行

docker run -d -v ~/flowerss:/root/.flowerss shed219/flowerss-bot

源码编译部署

git clone https://github.com/shedya/flowerss-bot && cd flowerss-bot
make build
./flowerss-bot

配置

根据以下模板,新建 config.yml 文件。

bot_token: XXX
#多个telegraph_token可采用数组格式:
# telegraph_token:
#  - token_1
#  - token_2
telegraph_token: xxxx
user_agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/51.0.2704.103 Safari/537.36
preview_text: 0
disable_web_page_preview: false
socks5: 127.0.0.1:1080
update_interval: 10
error_threshold: 100
telegram:
  endpoint: https://xxx.com/
mysql:
  host: 127.0.0.1
  port: 3306
  user: user
  password: pwd
  database: flowerss
sqlite:
  path: ./data.db
allowed_users:
  - 123
  - 234

配置说明:

配置项 含义 是否必填
bot_token Telegram Bot Token 必填
telegraph_token Telegraph Token, 用于转存原文到 Telegraph 可忽略(不转存原文到 Telegraph )
preview_text 纯文字预览字数(不借助Telegraph) 可忽略(默认0, 0为禁用)
user_agent User Agent 可忽略
disable_web_page_preview 是否禁用 web 页面预览 可忽略(默认 false, true 为禁用)
update_interval RSS 源扫描间隔(分钟) 可忽略(默认 10)
error_threshold 源最大出错次数 可忽略(默认 100)
socks5 用于无法正常 Telegram API 的环境 可忽略(能正常连接上 Telegram API 服务器)
mysql MySQL 数据库配置 可忽略(使用 SQLite )
sqlite SQLite 配置 可忽略(已配置mysql时,该项失效)
telegram.endpoint 自定义telegram bot api url 可忽略(使用默认api url)
allowed_users 允许使用bot的用户telegram id, 可忽略,为空时所有用户都能使用bot

flowerss-bot's People

Contributors

indes avatar shedya avatar dependabot[bot] avatar luuray avatar prnake avatar boypt avatar dependabot-preview[bot] avatar hellodword avatar darkskygit avatar edisonjwa avatar makubex2010 avatar vaayne avatar cxyzzz avatar fossabot avatar hulb avatar machinly avatar renothing avatar rv2900 avatar zwypfdsj avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.