broonie

package module
v0.0.0-...-9d586b1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 12, 2021 License: MIT Imports: 6 Imported by: 0

README

Broonie

Broonie(why this name?) is a Telegram bots that automatically downloads photos and videos in real-time from conversations where the bot has been added to. This makes it very convenient to save all the memories from family Telegram groups and expose them on Plex for example.

Usage

You first need to create a bot on Telegram to retrieve a token.

Then, you need to create your configuration file:

$> cp config.json.sample config.json

Configure it with your own values. You can only run one instance of the bot in parallel. So if you want to handle multiple Telegram groups, you have to define several entries in the config file.

Then run the application:

$> go run cmd/broonie/main.go

You should expect to see no error. Enjoy!

Docker

A Docker image is also available:

docker run -v config.json:/app/config.json:ro arkan/broonie:latest

See the LICENSE (MIT) file for more details.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client ...

func NewClient

func NewClient(configPath string) (*Client, error)

NewClient ...

func (*Client) HandleNewUploads

func (c *Client) HandleNewUploads(fn func(filename string, url string, rule *ConfigRule) error) error

HandleNewUploads ...

type Config

type Config struct {
	Token string
	Debug bool
	Rules []*ConfigRule
}

Config contains the bot configuration.

type ConfigRule

type ConfigRule struct {
	Group               string
	SkipTelegramChannel bool
	Directory           string
	SubDirectory        string
}

ConfigRule contains a channel configuration.

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL