Giter Site home page Giter Site logo

phidias0303 / chinesecalendar Goto Github PK

View Code? Open in Web Editor NEW

This project forked from ytliu0/chinesecalendar

0.0 0.0 0.0 63.6 MB

Conversion between the Western calendar and Chinese calendar

License: GNU General Public License v3.0

CSS 0.15% JavaScript 6.53% HTML 93.32%

chinesecalendar's Introduction

Conversion between Western and Chinese Calendar (722 BCE - 2200 CE)

公 曆 和 農 曆 日 期 對 照 (公元前722年- 公元2200年)

This package contains HTML files, javascript files, and pdf documentation.

The main page uses my calculated calendar data to convert between the Western calendar and Chinese calendar for any year between 722 BCE and 2200 CE (CE = Common Era). The other pages are linked at the top of the main page. They are self-explanatory.

Installation from Source Files

The pre-built version (all HTML files, figures, css, js and pdf files in . and ./docs directory) is intended for public use only, but you can install another version for private use from the build script.

Quick Installation

To install the whole package to a target directory, first open build_config.json and edit the value of the "target directory" key. For first time installation, run npm install to install dependencies. Then run npm run build or node build.js all to install the package in the target directory. Use npm run clean or node build.js clean to remove the target directory.

Note that the target directory cannot be the same as the source directory ./src since some of the output files will have the same names as the files in the source directory. To prevent accidental overwriting of source files, a file named protect_this_dir.txt is placed in the source directory. If the build script detects the existence of this filename in the target directory, it will abort and throw an error.

Customized Build (for development)

The command npm run build or node build.js all installs the whole package from scratch. If only a few files are modified, it's not necessary to rebuild everything. In this case, you can change the parameters in build_config.json before running the build script. Apart from the target_directory key, values of all the other keys in build_config.json are boolean. In the command npm run part or node build.js, only items that are true in build_config.json will be built. You can also specify another json file for build.js to process. For example, node build.js my_config.json will read my_config.json instead of build_config.json. In other words, if the second argument after node is not all and clean, it will be interpreted as a json file for configuration.

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.