Git Product home page Git Product logo

autorule's Introduction

AutoRule

简介

该工具是自动记账App的衍生工具,用于构建自动记账的自动分类规则和自动识别规则。

构建

  • 基础环境:NodeJS
  • 包管理器:yarn
  • 构建工具:webpack
  • 依赖安装:yarn install

使用如下命令构建自动记账规则:

yarn build

使用如下命令构建并测试自动记账规则:

yarn test

目录结构说明

├── package.json
├── src                                     项目主目录
│   ├── category
│   │   ├── CategoryMain.js     自动分类的主要文件(更新该文件)
│   │   └── TestObject.js       测试对象
│   ├── category.js                   自动分类调用入口
│   ├── rule                          规则列表
│   │   ├── app                 App规则
│   │   ├── helper              无障碍规则
│   │   ├── notice              通知规则
│   │   │   ├── 微信收款到账.js   规则样例
│   │   │   └── main.js
│   │   └── sms                 短信规则
│   ├── rule.js                       自动记账识别规则调用入口
│   ├── test.js                       自动记账测试调用入口        
│   └── utils                         工具类
│       ├── BillType.js               账单类型
│       ├── Currency.js               币种
│       ├── DataType.js               数据类型(标记是App还是短信)
│       ├── RuleModules.js            
│       ├── RuleObject.js             规则对象
│       └── Time.js                   时间处理函数
├── webpack.config.js
└── yarn.lock

使用

  • 自动记账的规则会进行周期性更新,自动记账用户跟随App更新提醒进行周期性更新即可。

参与贡献

贡献使开源社区成为一个学习、激励和创造的绝佳场所。你所作的任何贡献都是非常感谢的。

  1. 克隆这个项目
  2. 创建你的功能分支 (git checkout -b feature/AmazingFeature)
  3. 提交你的修改 (git commit -m 'Add some AmazingFeature')
  4. 推送到你的分支 (git push origin feature/AmazingFeature)
  5. 发起合并请求

关于Commit的一点小要求:

commit格式采用: [类型] : [更改内容]

feat: 新功能
fix: 修复问题
docs: 修改文档
style: 修改代码格式,不影响代码逻辑
refactor: 重构代码,理论上不影响现有功能
perf: 提升性能
test: 增加修改测试用例
chore: 修改工具相关(包括但不限于文档、代码生成等)
deps: 升级依赖

赞助支持

微信 支付宝
Wechat QRcode Alipay QRcode

协议

GPL 3.0

autorule's People

Contributors

ankiotomas avatar

Stargazers

 avatar  avatar

Watchers

 avatar

autorule's Issues

[Adaptation Request][App]com.eg.android.AlipayGphone

                {
    "mk": 231053230251200014,
    "st": 1,
    "isSc": 0,
    "appId": "",
    "mct": 1697209372000,
    "pl": "{\"templateType\":\"BN\",\"commandType\":\"UPDATE\",\"withPushNfc\":\"Y\",\"expireLink\":\"\",\"msgType\":\"TODO\",\"icon\":\"https:\/\/gw.alipayobjects.com\/mdn\/rms_f96971\/afts\/img\/A*leNcS41oUu0AAAAAAAAAAABkARQnAQ\",\"link\":\"alipays:\/\/platformapi\/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20231013200040011100670089706568&bizType=D_TRANSFER?tagid=MB_SEND_PH\",\"businessId\":\"PAY_HELPER_CARD_2088032022319723\",\"msgId\":\"ee195465b09e7082af3214ec2bab83bd00972\",\"templateCode\":\"00059_00094_zfzs001\",\"templateId\":\"WALLET-BILL@BLPaymentHelper\",\"title\":\"收到一笔转账\",\"content\":\"{\\\"status\\\":\\\"收到一笔转账\\\",\\\"date\\\":\\\"10月13日\\\",\\\"amountTip\\\":\\\"\\\",\\\"money\\\":\\\"0.01\\\",\\\"unit\\\":\\\"元\\\",\\\"infoTip\\\":\\\"\\\",\\\"failTip\\\":\\\"\\\",\\\"goto\\\":\\\"alipays:\/\/platformapi\/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20231013200040011100670089706568&bizType=D_TRANSFER\\\",\\\"content\\\":[{\\\"title\\\":\\\"付款人:\\\",\\\"content\\\":\\\"从前慢 185******30\\\"}],\\\"ad\\\":[],\\\"actions\\\":[{\\\"name\\\":\\\"\\\",\\\"url\\\":\\\"\\\"},{\\\"name\\\":\\\"查看详情\\\",\\\"url\\\":\\\"alipays:\/\/platformapi\/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20231013200040011100670089706568&bizType=D_TRANSFER\\\"}]}\",\"linkName\":\"\",\"bizName\":\"支付助手\",\"msgCategory\":\"bill\",\"scm\":\"27.gotone.card.ee195465b09e7082af3214ec2bab83bd00972.MB_SEND_PH.null.payment_assist.10090.10099.2019062521000502094325.9991746\",\"assistInfo\":\"{\\\"showInFriendTab\\\":false,\\\"icon\\\":\\\"https:\/\/gw.alipayobjects.com\/mdn\/rms_f96971\/afts\/img\/A*ZapXT6AjvG0AAAAAAAAAAABkARQnAQ\\\",\\\"reminderType\\\":\\\"point\\\",\\\"hiddenMsgHeader\\\":false,\\\"title\\\":\\\"支付助手\\\",\\\"reminderTypeModifyEnable\\\":false,\\\"assistId\\\":\\\"payment_assist\\\",\\\"desc\\\":\\\"支付宝资金变动通知\\\"}\",\"ih\":\"{\\\"extInfo\\\":{},\\\"iid\\\":\\\"105\\\",\\\"ioty\\\":\\\"aor\\\",\\\"itemBasicInfo\\\":{\\\"dn\\\":\\\"服务提醒\\\",\\\"ic\\\":\\\"https:\/\/gw.alipayobjects.com\/zos\/bmw-prod\/b96c31e0-64ba-4cbb-9a64-73ff17d701fd.webp\\\",\\\"lk\\\":\\\"alipays:\/\/platformapi\/startapp?appId=20000235&source=friendTab\\\"},\\\"itemUserRelation\\\":{\\\"ilf\\\":\\\"N\\\",\\\"uc\\\":{\\\"top\\\":\\\"0\\\"},\\\"version\\\":0},\\\"ity\\\":\\\"105\\\",\\\"moty\\\":\\\"u\\\",\\\"msgInfo\\\":{\\\"bm\\\":\\\"收到一笔转账¥0.01 \\\",\\\"cmid\\\":\\\"ee195465b09e7082af3214ec2bab83bd00972\\\",\\\"lmt\\\":1697209371912,\\\"msrid\\\":\\\"00059_00094_zfzs001\\\",\\\"ncs\\\":\\\"N\\\",\\\"rps\\\":\\\"num\\\",\\\"sam\\\":\\\"Y\\\",\\\"ssrid\\\":\\\"PAY_HELPER_CARD_2088032022319723\\\",\\\"urn\\\":1}}\",\"bizMonitor\":\"{\\\"serviceCode\\\":\\\"MB_SEND_PH\\\",\\\"bizName\\\":\\\"\\\",\\\"createTime\\\":1697209371973,\\\"businessId\\\":\\\"PAY_HELPER_CARD_2088032022319723\\\",\\\"messageId\\\":\\\"ee195465b09e7082af3214ec2bab83bd00972\\\",\\\"messageTitle\\\":\\\"收到一笔转账\\\",\\\"pid\\\":\\\"2088622103925679\\\",\\\"templateId\\\":\\\"WALLET-BILL@BLPaymentHelper\\\",\\\"status\\\":\\\"\\\"}\",\"languageType\":\"zh-Hans\",\"subscribeConfig\":\"0\",\"gmtCreate\":1697209371912,\"gmtValid\":1699801371907,\"operate\":\"SEND\",\"templateName\":\"支付助手\",\"homePageTitle\":\"收到一笔转账¥0.01 \",\"status\":\"\",\"extraInfo\":\"{\\\"topSubContent\\\":\\\"收到一笔转账\\\",\\\"preValue\\\":\\\"¥\\\",\\\"languageType\\\":\\\"zh-Hans\\\",\\\"isPaymentMsg\\\":true,\\\"assistName2\\\":\\\"\\\",\\\"assistName3\\\":\\\"\\\",\\\"assistName1\\\":\\\"付款人\\\",\\\"templateId\\\":\\\"WALLET-FWC@remindNumber\\\",\\\"content\\\":\\\"0.01\\\",\\\"linkName\\\":\\\"\\\",\\\"assistMsg3\\\":\\\"\\\",\\\"sceneExt2\\\":{\\\"sceneUrl\\\":\\\"alipays:\/\/platformapi\/startapp?appId=20000003&actionType=toBillDetails&tradeNO=20231013200040011100670089706568&bizType=D_TRANSFER\\\",\\\"sceneType\\\":\\\"nativeApp\\\",\\\"sceneName\\\":\\\"转账\\\",\\\"sceneIcon\\\":\\\"https:\/\/gw.alicdn.com\/tfs\/TB19XIWiIieb18jSZFvXXaI3FXa-100-100.png\\\"},\\\"assistMsg2\\\":\\\"\\\",\\\"assistMsg1\\\":\\\"从前慢 185******30\\\",\\\"assistName4\\\":\\\"\\\",\\\"assistMsg5\\\":\\\"\\\",\\\"assistMsg4\\\":\\\"\\\",\\\"assistName5\\\":\\\"\\\",\\\"buttonLink\\\":\\\"\\\",\\\"cardAdInfo\\\":{\\\"p116\\\":{\\\"bizMonitor\\\":{\\\"marketingUniqueId\\\":\\\"MUb59f576f4d944f8e8b5b77f447def2eb\\\",\\\"outBizId\\\":\\\"LIFE_MSG_TEXT|AMTT202301041527374135|-\\\",\\\"marketingRuleId\\\":\\\"MR41b88eb9d64442b09a87a890d6848fc3\\\",\\\"style\\\":\\\"actionLine\\\",\\\"marketingItemId\\\":\\\"MI501400035beb4580a6f92e161f06d081\\\"},\\\"expireTime\\\":1728745371972,\\\"marketingUniqueId\\\":\\\"MUb59f576f4d944f8e8b5b77f447def2eb\\\",\\\"minClientVersion\\\":\\\"10.1.98\\\",\\\"recommendTemplateId\\\":\\\"actionLine\\\",\\\"viewInfo\\\":{\\\"btnName\\\":\\\"支付奖励\\\",\\\"actionType\\\":\\\"link\\\",\\\"tagIcon\\\":\\\"https:\/\/mdn.alipayobjects.com\/huamei_cke3ep\/afts\/img\/A*s1xhTYe-_PQAAAAAAAAAAAAADk1-AQ\/original\\\",\\\"tagColor\\\":\\\"#FF6011\\\",\\\"actionUrl\\\":\\\"alipays:\/\/platformapi\/startapp?appId=68687805&url=https://render.alipay.com/p/yuyan/180020380000000023/home-page.html?source=LIFE_MSG_TEXT__AMTT202301041527374135&chInfo=LIFE_MSG_TEXT\\\",\\\"tag\\\":\\\"领积分,兑各类生活好物\\\"}}}}\"}"
}
                ```

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.