Skip to content
/ epgbird Public
forked from SlashNephy/epgbird

🦠A tiny tool to tweet EPGStation events such as recording or new reserves

License

Notifications You must be signed in to change notification settings

tyage/epgbird

 
 

Repository files navigation

epgbird

🦠A tiny tool to tweet EPGStation events such as recording or new reserves

Kotlin GitHub release (latest by date) GitHub Workflow Status Docker Image Size (tag) Docker Pulls license issues pull requests

screenshot.png

Demo Account => @a0b4m0c4

Requirements

  • Java 8 or later
  • ffmpeg (if you want to tweet with media)

Get Started

Docker

There are some image tags.

  • ghcr.io/slashnephy/epgbird:latest
    Automatically published every push to master branch.
  • ghcr.io/slashnephy/epgbird:dev
    Automatically published every push to dev branch.
  • ghcr.io/slashnephy/epgbird:<version>
    Coresponding to release tags on GitHub.

docker-compose.yml

version: '3.8'

services:
  epgstation:
    # çœç•¥
  
  epgbird:
    container_name: epgbird
    image: ghcr.io/slashnephy/epgbird
    restart: always
    volumes:
      - /mnt:/mnt:ro
    environment:
      # Twitter 資格情報 (必須)
      # https://torinosuke.netlify.app ã‚ãŸã‚Šã‚’ãŠã™ã™ã‚ã—ã¾ã™
      TWITTER_CK: xxx
      TWITTER_CS: xxx
      TWITTER_AT: xxx
      TWITTER_ATS: xxx
      
      # 予約追加を通知ã™ã‚‹ã‹ã©ã†ã‹ 
      INCLUDE_RESERVES: 1
      # ルール予約も通知ã™ã‚‹ã‹ã©ã†ã‹
      INCLUDE_RULE_RESERVES: 0
      # 録画開始を通知ã™ã‚‹ã‹ã©ã†ã‹
      INCLUDE_RECORD_START: 1
      # 録画中を通知ã™ã‚‹ã‹ã©ã†ã‹
      INCLUDE_RECORDING: 1
      # 録画終了を通知ã™ã‚‹ã‹ã©ã†ã‹
      INCLUDE_RECORD_END: 1
      
      # 予約追加・録画開始・録画中・録画終了ã®é€šçŸ¥æœ¬æ–‡ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ
      # 以下ã®å¤‰æ•°ãŒä½¿ãˆã¾ã™
      #   %RESERVE_TYPE%: 予約ã®ã‚¿ã‚¤ãƒ— (ルール or 手動)
      #   %BR%: 改行文字
      #   %NAME%: 番組å (åŠè§’・全角ã‹ã¯ USE_HALF_WIDTH 環境変数ã«ã‚ˆã‚Šã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«å¯èƒ½, 以下åŒæ§˜)
      #   %CHANNEL%: ãƒãƒ£ãƒ³ãƒãƒ«å, åŒä¸Š
      #   �SCRIPTION%: 番組説明, åŒä¸Š (デフォルト㯠50 文字ã¾ã§å‡ºåŠ›ã™ã‚‹ãŒ DESCRIPTION_LENGTH 環境変数ã«ã‚ˆã‚Šã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«å¯èƒ½)
      #   %START_TIME%: 番組開始時刻
      #   %DURATION%: 経éŽæ™‚é–“ (分) (RESERVES_FORMAT ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯æƒ³å®šã•ã‚Œã¦ã„ãªã„)
      #   %START_TIME%: 番組ã®é–‹å§‹æ™‚刻 (時刻ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆã¯ TIME_FORMAT 環境変数ã«ã‚ˆã‚Šã‚³ãƒ³ãƒˆãƒ­ãƒ¼ãƒ«å¯èƒ½)
      #   %END_TIME%: 番組ã®çµ‚了時刻, åŒä¸Š
      #   %DURATION%: 番組ã®é•·ã• (xx時間xx分 å½¢å¼)
      #   %SIZE_GB%: 番組ã®å®¹é‡ (GB å˜ä½, RECORD_END_FORMAT 以外ã§ä½¿ç”¨ã™ã‚‹ã“ã¨ã¯æƒ³å®šã•ã‚Œã¦ã„ãªã„)
      #   %COMMENT_DIGEST%: コメントã®ãƒ€ã‚¤ã‚¸ã‚§ã‚¹ãƒˆ (saya ãŒå¿…è¦)
      #   %COMMENT_FORCE%: コメントã®å‹¢ã„ (/min), åŒä¸Š
      #   %DROP_COUNT%: ドロップ数
      #   %ERROR_COUNT%: エラー数
      #   %SCRAMBLE_COUNT%: スクランブル数
      #   %VIDEO_CODEC%: 映åƒã®ã‚³ãƒ¼ãƒ‡ãƒƒã‚¯, MPEG2 or H.264 or H.265
      #   %VIDEO_RESOLUTION%: 映åƒã®è§£åƒåº¦, e.g. 1080p, 720p
      #   %AUDIO_SAMPLING_RATE_KHZ%: 音声ã®ã‚µãƒ³ãƒ—リング周波数 (kHz), e.g. 4.8, 4.41
      RESERVES_FORMAT: ã€%RESERVE_TYPE%予約追加】%BR%%NAME% [%CHANNEL%]%BR%%START_TIME% ~ %END_TIME% (%DURATION%)%BR%%BR%�SCRIPTION%
      RECORD_START_FORMAT: ã€%RESERVE_TYPE%録画開始】%BR%%NAME% [%CHANNEL%]%BR%%START_TIME% ~ %END_TIME% (%DURATION%)%BR%%BR%�SCRIPTION%
      RECORDING_FORMAT: ã€%RESERVE_TYPE%録画中 / %ELAPSED_MINUTES%分経éŽã€‘%BR%%NAME% [%CHANNEL%]%BR%%START_TIME% ~ %END_TIME% (%DURATION%)%BR%%BR%�SCRIPTION%
      RECORD_END_FORMAT: ã€%RESERVE_TYPE%録画終了】%BR%%NAME% [%CHANNEL%]%BR%%START_TIME% ~ %END_TIME% (%DURATION%, %SIZE_GB% GB)%BR%%BR%�SCRIPTION%
      
      # 録画中を通知ã™ã‚‹é–“éš” (分)
      RECORDING_POST_FREQUENCY_MINUTES: 10
      # 番組å・ãƒãƒ£ãƒ³ãƒãƒ«å・番組説明ã§å…¨è§’英数字をåŠè§’化ã™ã‚‹ã‹ã©ã†ã‹
      # åŠè§’化ã™ã‚‹ã¨å…¨è§’ã®ã€Œï¼‘〠→ 「1ã€ã®ã‚ˆã†ã«ãªã‚Šã¾ã™, カタカナã¯å¤‰åŒ–ã—ã¾ã›ã‚“
      USE_HALF_WIDTH: 1
      # 時刻表記ã®ãƒ•ã‚©ãƒ¼ãƒžãƒƒãƒˆ
      # 指定å­ã¯ https://docs.oracle.com/javase/jp/8/docs/api/java/time/format/DateTimeFormatter.html ã‚’å‚ç…§
      TIME_FORMAT: HH:mm
      # 番組説明ã®æœ€å¤§é•·ã• (文字)
      DESCRIPTION_LENGTH: 50
      # 無視ã™ã‚‹ãƒãƒ£ãƒ³ãƒãƒ« ID
      # カンマ区切り
      IGNORE_CHANNEL_IDS: 400101
      
      # ツイート㫠png ç”»åƒã‚’å«ã‚ã‚‹ã‹ã©ã†ã‹
      WITH_PNG: 0
      # png ç”Ÿæˆ ffmpeg コマンド
      # 以下ã®å¤‰æ•°ãŒä½¿ãˆã¾ã™
      #   %POSITION%: å†ç”Ÿä½ç½®
      #   %INPUT%: 入力ファイル
      #   %OUTPUT%: 出力ファイル
      FFMPEG_PNG_COMMAND: ffmpeg %POSITION% -i %INPUT% -vframes 1 -f image2 -s 1920x1080 -loglevel error -y %OUTPUT%
      # png 生æˆã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆ (秒)
      FFMPEG_PNG_TIMEOUT_SECONDS: 5
      
      # ツイート㫠mp4 動画をå«ã‚ã‚‹ã‹ã©ã†ã‹
      WITH_MP4: 0
      # mp4 ç”Ÿæˆ ffmpeg コマンド
      # 以下ã®å¤‰æ•°ãŒä½¿ãˆã¾ã™
      #   %POSITION%: å†ç”Ÿä½ç½®
      #   %INPUT%: 入力ファイル
      #   %OUTPUT%: 出力ファイル
      FFMPEG_MP4_COMMAND: ffmpeg %POSITION% -t 120 -i %INPUT% -f mp4 -c:a aac -ab 128k -ar 48000 -ac 2 -c:v libx264 -pix_fmt yuv420p -vf scale=1280:-1 -vb 2048k -r 30 -minrate 1024k -maxrate 2048k -strict experimental -threads 1 -loglevel error -y %OUTPUT%
      # mp4 生æˆã®ã‚¿ã‚¤ãƒ ã‚¢ã‚¦ãƒˆ (秒)
      FFMPEG_MP4_TIMEOUT_SECONDS: 30
      
      # 録画先ã®è¦ªãƒ‡ã‚£ãƒ¬ã‚¯ãƒˆãƒª
      MOUNT_POINT: /mnt
      
      # EPGStation 接続情報
      EPGSTATION_HOST: epgstation
      EPGSTATION_PORT: 8888
      # タイムゾーン
      TZ: Asia/Tokyo
      # ログレベル
      LOG_LEVEL: INFO

About

🦠A tiny tool to tweet EPGStation events such as recording or new reserves

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Kotlin 93.6%
  • Dockerfile 6.4%