0.0.27 • Published 1 year ago

punch-mayohr-apollo v0.0.27

Weekly downloads
-
License
ISC
Repository
-
Last release
1 year ago

Punch Mayohr Apollo

Mayohr Apollo 快速打卡小程式

特色

  • 一鍵打卡
  • 國定假日不執行
  • 截圖紀錄
  • 支援 Telegram 通知

Requirements

  • macOSX or Linux
  • Node.js 14 or later

Usage

Setup

# Prepare configs
mkdir -p ~/.punch-mayohr-apollo \
  && wget -O ~/.punch-mayohr-apollo/.env \
  https://raw.githubusercontent.com/awesome-oa-tools/punch-mayohr-apollo/master/.env.example

# Update mayohr apollo account
vi ~/.punch-mayohr-apollo/.env

Run punch

npx punch-mayohr-apollo@latest -y

Use PM2 to trigger punch (Optional)

# Install PM2
npm i -g pm2

# Get sample PM2 configs
wget -O ~/.punch-mayohr-apollo/ecosystem.config.js \
  https://raw.githubusercontent.com/awesome-oa-tools/punch-mayohr-apollo/master/ecosystem.config.js

# Apply PM2 config
pm2 start ~/.punch-mayohr-apollo/ecosystem.config.js \
  && pm2 stop punch-in-mayohr-apollo punch-out-mayohr-apollo

Advanced Usage

Node.js library

Install dependencies

npm i punch-mayohr-apollo -S

Code

const punchMayohrApollo = require("punch-mayohr-apollo");

punchMayohrApollo(
  "your_company_code",
  "your_employee_no",
  "your_password",
  false, // headless
  {
    // screenshot
    enabled: true,
    dir: "./screenshots",
  },
  {
    // logger
    level: "error",
    color: false,
  },
  {
    // telegram
    token: "your_telegram_token",
    chanel: "your_telegram_chanel",
  }
);

Source Code

# Download source code
git clone git@github.com:awesome-oa-tools/punch-mayohr-apollo.git
cd punch-mayohr-apollo

# Install dependencies
yarn

# Prepare config file
cp .env.example .env && vi .env

# Run application
yarn start

Todo

  • Support AWS Lambda ref
0.0.27

1 year ago

0.0.25

2 years ago

0.0.24

2 years ago

0.0.23

2 years ago

0.0.22

2 years ago

0.0.21

2 years ago

0.0.20

2 years ago

0.0.19

2 years ago

0.0.18

2 years ago

0.0.17

2 years ago

0.0.16

2 years ago

0.0.15

2 years ago

0.0.14

2 years ago

0.0.13

2 years ago

0.0.12

2 years ago

0.0.11

2 years ago

0.0.9

2 years ago

0.0.8

2 years ago

0.0.7

2 years ago

0.0.6

2 years ago

0.0.4

2 years ago

0.0.3

2 years ago

0.0.2

2 years ago

0.0.1

2 years ago