Code Monkey home page Code Monkey logo

sgbus's Introduction

sgbus

一个公交车到站信息和天气显示面板。

从Gov.sg获取天气,从LTA data mall获取公交数据。

使用

  • 安装python3.10和pip
  • 安装依赖:pip install -r requirements.txt
  • Land Transport Authority申请一个API Key(秒批)
  • 如果是windows,运行Set-Variable -Name api_key -Value [你的AccountKey], 如果是linux,运行export api_key [你的AccountKey]
  • cd到flask所在目录, 运行flask run -p 8000 --host=0.0.0.0
  • 使用浏览器访问localhost:8000以查看面板
  • 修改后请ctrl+c结束flask,重新运行flask run,否则更改有可能不生效
  • 如果希望部署在生产环境,请单独配置static文件夹。

屏幕截图

旧UI

明亮模式:

image

根据时间(浏览器时间晚7-早7点)自动切换暗黑模式:

image

新UI

访问url:/view2

image

image

sgbus's People

Contributors

rickylsr avatar

Watchers

 avatar

Forkers

xiaosanmeng

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.