GithubHelp home page GithubHelp logo

stephanxu / calenass Goto Github PK

View Code? Open in Web Editor NEW
1.0 2.0 0.0 66.78 MB

Generate course schedule in iCalendar file for importing to calendar apps.

Python 1.15% CSS 27.16% HTML 5.63% JavaScript 66.05% Batchfile 0.01%

calenass's Introduction

Calenass

Introduction

This program help students import their courses' timetable into the calendar app. It contains 3 parts:

  • Client: it contains UI interfaces that make it easy to use.
  • Build Module: use the command to build ics(iCal) file for importing to calendar app or json file to import configuration to Calenass Client program.
  • Web server: For across platforms. I place the "build module" on the web server.

Author's Blog

Project's Introduction

Client

This client is platforms-across. It support Windows, Linux, MacOS.

We have already packed for Windows and MacOS. Please check Release page

Dependencies

Here are some dependencies.

  • Python >= 3.6
  • Node >= 10.5.0
  • Electron (My version is 1.4.13)
  • Other python packages (All in constructor\requirements.txt)

Command mode

If you have python environment, or have some preset. You can use command mode.

Preset:

If you want to use preset to build your file(iCal file or JSON file for importing configuration into the client). Use file constructor\calenass_preset.py.

Usage: python preset_constructor.py <preset module> <workbook name> <config filename> <output mode> <output filename>

Params:

  • preset module: the preset python file name;
  • workbook name: your courses timetable;
  • config filename: time config filename;
  • output mode: 'ics' or 'json', depends on what kind of file do you want to get;
  • output filename: the file that you want to build;

Pure command:

The pure command constructor\ical_constructor.py is made for the web requiries. But you still can call it yourself. It only receives one param that a base64-encoded JSON string contains all configuration. You can export all configuration through the client. And if you have a preset, you can also export JSON file through preset(more details please read Preset). About the configuration file, please read Configuration structure

Usage: python ical_constructor.py <All configs>

Configuration structure

Whole configuration structure:

{
    "conf":config_object,
    "courses":courses_object
}

config_object: config structure

{
    "calendarConfig":{
        "name":"MyClassTimeTable",
        "timezone":"Asia/Shanghai",
        "alarm":"30"
    },
    "classTimes": [
        {
            "index":"firstclass",
            "start_time":"08:00",
            "end_time":"09:50"
        }
    ],
    "weekConfig": {
        "first_week":"2018-09-03",
        "total_week":19
    }
}

courses_object: courses structure

[{
    "name": "courses name",
    "time": "firstclass",
    "wkday": "Monday",
    "week": [
        2,
        3,
        4,
        5,
        8,
        9,
        10,
        12,
        13,
        14,
        15,
        16
    ],
    "pos": "CLASSROOM123",
    "more": "Alan"
},
... // more couses
]

calenass's People

Contributors

stephanxu avatar

Stargazers

 avatar

Watchers

 avatar  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.