Git Product home page Git Product logo

checknote870_new's Introduction

checknote870_new

规范

  • 写流程图

  • 按模块,定义模块功能,模块名称,模块输入参数,返回值。

  • 尽量把每个模块用一个函数,在一个模块的一个函数内解决,不要分成小时粒度,分钟力度

  • filename to table 输入文件名,获得解压后的数据表,给写入数据模块

1. main 模块

    获取时间,并生成时间,调用输出;
    在main.rs中做创建数据库,没有数据库,要创建默认数据库,有数据库,则打开数据库测试读取表中字段,数据库名在命令行中指定,数据库中有几个表,
    create database rust_count
    create table filecount("包表时间", 时间戳,条数)
    create table

2. 时间列表模块

    函数名(参数,返回值) timelist(String)  -> Vector
                      String 包含 年月日 小时 分钟

3. 文件列表过滤模块

    函数名(参数,返回值) allfilelist_to_daylist(Vector)  -> Vector

4. 处理每行,获取需要解压的文件名

                  lineparse(Vector) -> Vector

5. 下载文件模块,解压模块,计数模块

        下载文件模块  写个ftp,解压模块 写 zip,计数模块 用read_line

6. 写入数据库模块

         数据库用sqlite
         数据库在main.rs测试 成功后,在写入数据库模块中,再次测试能否成功打开和读取表中字段,然后再进行写入数据库

7.读取数据库模块

         读取,包表时间与时间戳组成hashmap,与最新的文件列表进行比较,以决定到底是更新,还是不更新

8. 输出,从数据库读取,然后再展示

         判断是否是缺数据在输出这步做,根据过往数据来判断今天,哪个时间点的数据条数是多还是少
         生成什么样的格式待定

这个是不是要定时执行呢?每个小时执行一次来解决数据什么时候入库问题

如果不定时更新,那就要挑某个时间,根据数据库中已有的文件的最新时间跟文件列表中最新时间进行比对后更新。

checknote870_new's People

Contributors

vpgle avatar

Watchers

 avatar

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.