Giter Site home page Giter Site logo

w0s.jp-shell's Introduction

w0s.jp-shell

w0s.jp サーバーで稼働しているシェルスクリプト

おことわり

あくまで個人的な趣味で作成しているものです。機密にすることもないので公開している程度のものです。ドキュメントも最低限ですし、必ずしも最新状況に追従できるとも限りません。

機能一覧

名称 機能名 使用データベース 概要
テスト Test 動作確認用。環境整備の際はまずはこれが動くことを目指す
ウェブ巡回(新着) CrawlerNews crawler ウェブページを巡回し(HTML ページのみ)、新着情報の差分を調べて通知する
ウェブ巡回(リソース) CrawlerResource crawler ウェブページを巡回し(HTML リソースに限らない)、レスポンスボディの差分を調べて通知する
JR 空席確認 JrCyberStation JR CYBER STATION で空席があれば通知する
横浜市立図書館 予約連絡 YokohamaLibraryHoldNotice 横浜市立図書館蔵書検索で予約した本は受取可能になっても連絡メールは翌朝配信なため、到着日に受け取れるようログインページをスクレイピングして独自に通知メールを送る(受取可能になる時間帯は各館によって概ね決まっているため、その時間帯に実行する)

動作手順

  1. npm install
  2. build 実行(package.jsonscripts 内に定義された build を実行することで JavaScript ファイルが出力される)。
  3. log4js.json を作成(下記にサンプルを掲載)
  4. env ファイルを作成
  5. configure ディレクトリ内に動作させたい機能名の設定ファイルを作成(e.g. 「テスト」機能を動作させるなら、 node/configure/schema/test.json を参考に node/configure/test.json を作成)
  6. データベース(SQLite)を使用する機能は DB ファイルを用意(現状、テーブル定義は非公開)。
  7. プログラム実行(package.jsonscripts 内に定義された shell:{機能名} を実行することで、プログラムが実行される)。

log4js.json サンプル

{
  "appenders": {
    "stdout": {
      "type": "stdout"
    }
  },
  "categories": {
    "default": {
      "appenders": ["stdout"],
      "level": "debug"
    }
  }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.