srgse5m

command module
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2024 License: MIT Imports: 15 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

※ システム全体の構成要素と各要素の整合性のとれるバージョンについてはSRCGI - READMEにあります

SRGSE5M

SHOWROOMのサーバから獲得ポイントのデータを取得してデータベースに格納します。

『SHOWROOM イベント 獲得ポイント一覧』(4) イベント獲得ポイントの取得

取得の対象となるイベント・配信者、取得の時間間隔等はWebサーバ/CGIで設定します。

Github - SHOWROOM イベント 獲得ポイント一覧

Webサーバ/CGIと設定や取得データを共有するデータベースのスキーマは以下のものです。

CreateDB.sql

DBとそのログイン情報は ServerConfig.yml で設定します。 DB名、ログイン、パスワードをこのこのファイルに直接書くか環境変数から取得するように設定します。

一時的なデータは scoremap.txt に保存されており、データ取得の合間にこのプログラムを再起動すれば 取得したデータには連続性(=配信中に再起動しても再起動の前後の配信は一枠とみなされる、というような意味)があります。

実行に特権は必要ありません。VSCodeでのデバッグもできます。

実際に使用するときはデーモンとして起動するのが"事故"が起きにくいと思います。

ビルドと実行

Releases から最新の(Webサーバ/CGIに適合した)バージョンをダウンロードし、

~/go/src/SRGSE5M

に展開します。

以下

$ cd ~/go/src/SRGSE5M

$ go mod init

$ go mod tidy

$ CGO_ENABLED=0 go build SRGSE5M.go

としてビルドします(CGO_ENABLED=0 は開発環境=実行環境であれば不要です)

なお、このソースの作成は go version go1.20.4 linux/amd64 で行っていますが、 Linux,Windows,FreeBSDの最近のバージョンで、コンパイラがgo 1.17以後あたりであれば環境に依存することはないと思います。 クロスコンパイルも問題ありません。

Macでの動作も問題ないと思いますが、Macに関してはまったく検証をしていません。

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php
! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php
! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php
! Copyright © 2022 chouette.21.00@gmail.com Released under the MIT license https://opensource.org/licenses/mit-license.php

Jump to

Keyboard shortcuts

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