skland-task

module
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Aug 27, 2024 License: Apache-2.0

README

Skland-Task

golang release license

Config

以下参数无需手动增加,可通过下方 Account 发送验证码自动获取

accounts:
  - phone: "手机号码"
    hypergryph:
      token: "手机登录后的 token,skland.cred 失效时需要使用该 token 重新登陆"
      code: "授权森空岛后的 code"
    skland:
      cred: "通过上方 hypergryph.code 获取到的凭证"
      token: "通过上方 hypergryph.code 获取到的 token,用于签名,会过期,需要手动 refresh"

cron:
  spec: "签到奖励执行时间,默认 5 4 8 * * * 即每天 08:04:05"
  startup: "是否启动时执行一次,默认 false"

Usage

> skland-task -h
Usage:
  skland-task [command]

Available Commands:
  account     Manage accounts
  config      Manage config
  cron        Run as cron job
  notify      Manage notify
  service     Manage service
  sign        Run sign task

Flags:
  -c, --config string   path to config file
  -h, --help            help for skland-task
  -v, --version         version for skland-task

Use "skland-task [command] --help" for more information about a command.
Account
# list accounts
skland-task account list
# add account by send phone validate code
skland-task account login
SignForum 森空岛每日任务
skland-task sign forum <account phone>
SignGame 森空岛游戏签到
skland-task sign game <account phone>
Cron
skland-task cron
Service
# register as system service
skland-task service --user --config skland-task.yaml install
skland-task service start
skland-task service status

Docker

mkdir skland && touch skland/app.yaml
docker run -it --rm -v $(pwd)/skland:/skland -e DEBUG=true starudream/skland-task /skland-task -c /skland/app.yaml account login
docker run -it --rm -v $(pwd)/skland:/skland -e DEBUG=true starudream/skland-task /skland-task -c /skland/app.yaml sign game <account phone>

Docker Compose

version: "3"
services:
  skland:
    image: starudream/skland-task
    container_name: skland
    restart: always
    command: /skland-task -c /skland/app.yaml cron
    volumes:
      - "./skland/:/skland"
    environment:
      DEBUG: "true"
      app.log.console.level: "info"
      app.log.file.enabled: "true"
      app.log.file.level: "debug"
      app.log.file.filename: "/skland/app.log"
      app.cron.spec: "5 4 8 * * *"

Thanks

License

Directories

Path Synopsis
api

Jump to

Keyboard shortcuts

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