Skip to content

Telegram Image Board Bot written in POSIX Shell (dash)

License

Notifications You must be signed in to change notification settings

Sarisan/Sekoohaka

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Sekoohaka

Telegram Image Board Bot written in POSIX Shell (dash)

Features

  • Authorization
  • Inline pool search
  • Inline post search
  • Inline tag search
  • Inline paging
  • Inline autopaging
  • Inline resuming
  • Inline quick buttons
  • Original file download
  • Post information view
  • Post tags view
  • Inline shortcuts
  • Inline shortcuts saving
  • Inline shortcuts search

Requirements

Commands

BusyBox is a hard-coded dependency and cannot be replaced with alternatives!

  • dash
  • busybox
  • curl
  • jq
  • recode

For distribution specific installation commands follow command-not-found.

BusyBox functions

  • base64
  • bc
  • cat
  • cut
  • date
  • find
  • grep
  • ls
  • mkdir
  • rm
  • sed
  • seq
  • sha1sum
  • sleep
  • stat
  • tr

Deployment

It is highly recommended to run it with an empty environment to avoid variable conflict: env -i ./bot.sh or env -i PATH="${PATH}" ./bot.sh for Termux. For better performance, it is recommended to use a locally deployed Telegram Bot API server.

Available options

  -h            Show help information
  -l            Same as -a localhost:8081 -s 20971520
  -a <addr>     Telegram Bot API address, default: api.telegram.org
  -s <size>     Max file size allowed to send with URL, default: 10485760
  -i <addr>     Internal proxy address to interact with Telegram Bot API
  -e <addr>     External proxy address to interact with anything else

Usage

Fields description

  • [command] - Inline command
  • [b] - Image board
  • [page] - Search page number
  • [options] - Search options
  • [name] - Search pool or tag name
  • [tags] - Search tags
  • [query] - Search query
  • [id] - Post ID
  • [login] - Image board login or username
  • [key] - Image board API key or password

Inline search

  • pools [b] [page] [options] [name] - Pools search
  • posts [b] [page] [options] [tags] - Posts search
  • tags [b] [page] [options] [name] - Tags search
  • shorts [page] [options] [query] - Shortcuts search

Search options

  • a - Enable autopaging (lpts)
  • m - Show more metadata (p)
  • p - Show gif/video as preview only (p)
  • q - Add quick buttons (lpts)
  • r - Reverse search order (s)
  • w - Match full words only (s)

Inline commands

  • help - Send help message
  • original [b] [id] - Get original file of post
  • post [b] [id] - Get infromation of post
  • short [query] - Create inline shortcut

Commands

  • /help - Send help message
  • /authorize [b] [login] [key] - Authorize to image board
  • /original [b] [id] - Get original file of post
  • /post [b] [id] - Get infromation of post
  • /short [query] - Create inline shortcut
  • /shorts - Manage saved shortcuts
  • /stop - Remove all user data

Inline aliases

  • l - pools
  • p - posts
  • t - tags
  • s - shorts

Inline examples

  • p d 1 -a rating:g
  • t d *genshin*
  • original d 4507929
  • short p d -mq ringouulu

Supported image boards