All Projects → houxg → 12306-mail-parser

houxg / 12306-mail-parser

Licence: MIT license
Convert 12306 mail into calendar file(iCal)

Programming Languages

javascript
184084 projects - #8 most used programming language

Labels

Projects that are alternatives of or similar to 12306-mail-parser

12306-electron
🚄 electron-vue构建12306跨平台(Mac、Windows、Linux)客户端
Stars: ✭ 125 (+495.24%)
Mutual labels:  12306
12306 server
12306登录,下单买票,余票查询,乘客管理
Stars: ✭ 25 (+19.05%)
Mutual labels:  12306
12306GoHome
2021年控制浏览器,自动抢票插件
Stars: ✭ 70 (+233.33%)
Mutual labels:  12306
12306XposedPlugin
Xposed plugin for 12306 Android Client
Stars: ✭ 44 (+109.52%)
Mutual labels:  12306
Huochexing12306
一款服务于火车出行的Android APP,提供购票、抢票、列表实时信息、历史晚点、安全防盗、到站提醒、查时刻、查订单、看票价等功能。
Stars: ✭ 28 (+33.33%)
Mutual labels:  12306
Easy12306
使用机器学习算法完成对12306验证码的自动识别
Stars: ✭ 2,674 (+12633.33%)
Mutual labels:  12306
Decryptlogin
APIs for loginning some websites by using requests.
Stars: ✭ 1,861 (+8761.9%)
Mutual labels:  12306
12306formac
An unofficial 12306 Client for Mac
Stars: ✭ 2,796 (+13214.29%)
Mutual labels:  12306
AutoChange12306CDN
一个自动切换12306 CDN的代理,只需设置浏览器的代理为此软件监听端口,每次查询请求都会更换CDN,达到快速刷票的目的。
Stars: ✭ 35 (+66.67%)
Mutual labels:  12306
12306
12306 订票程序,自动登录,自动下单
Stars: ✭ 19 (-9.52%)
Mutual labels:  12306

12306-mail-parser

把12306邮件转化为日历文文件(iCal)

工作机制

这段代码会定时检查指定邮箱,将其中的12306邮件解析并转化为iCal文件。这个iCal文件会作为附件发送给发件方,你可以使用这个服务配合google calendar等使用。

使用方法

  1. 配置邮箱信息,编辑config.js文件:
var config = {
    repeatInMinute: 5, //查询间隔时间,单位分钟
    email: '[email protected]', //邮箱地址
    password: 'yourpassword', //邮箱密码
    api: util.format('http://localhost:%d/api/schedule', process.env.API_PORT || '3000'), //列车时刻表API,如没有可以为空
    imap: { //imap配置
        host: 'imap.gmail.com',
        port: 993,
        ssl: true
    },
    smtp: { //smtp配置
        host: 'smtp.gmail.com',
        port: 465,
        ssl: true
    }
}
  1. 强烈建议使用forever将之运行为后台服务。
npm install
npm install -g forever
forever start index.js

--

EN

Convert 12306 mail into calendar file(iCal)

How it works?

This script will check the specific inbox periodicity, if 12306's mail exist, then parse the content of mail, and generate correspoding iCal file, then send back to the sender. you can use it to work with google calendar.

Useage

  1. Edit your inbox configuration in index.js:
var config = {
    repeatInMinute: 5, //interval of checking
    email: '[email protected]',
    password: 'yourpassword',
    api: util.format('http://localhost:%d/api/schedule', process.env.API_PORT || '3000'),
    imap: { //imap配置
        host: 'imap.gmail.com',
        port: 993,
        ssl: true
    },
    smtp: { //smtp配置
        host: 'smtp.gmail.com',
        port: 465,
        ssl: true
    }
}
  1. It's highly recommended that using forever to run script as a deamon service.
npm install
npm install -g forever
forever start index.js
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].