Giter Club home page Giter Club logo

miles's Introduction

miles

As the film Forrest Gump said

run, Forrest, run...

miles

Motivation

As an English proverb said, "many a little makes a mickle ", we Chinese say "不积跬步,无以至千里", it means if you don't accumulate steps, you can't go a thousand miles.

As a runner, If you run one kilometer a day, it looks inconspicuous, but if you stick to it for one year, you can run 365 kilometers, and if you stick to ten years, it will be 3650 kilometers…, not to mention that you will run faster and faster, more and more. So I wrote this software to motivate myself, it's the distance history for a runner.

Usage

  1. fork the repo
  2. replace personal information with yours
  3. update your running data
    1. by http

      curl -H "Content-Type:application/json" -X POST -d '{"inputs": {"dt":"2023-08-06 12:00:01", "distance":"3.02"}, "ref":"master"}' https://api.github.com/repos/{your username}/miles/actions/workflows/{your http workflow id}/dispatches -H "Authorization: token {your token}"

      how to get your http workflow id?

      curl https://api.github.com/repos/{your username}/miles/actions/workflows -H "Authorization: token {your token}"
    2. by update running.csv

  4. link your running svg everywhere ^_^.

(Optional) config a syncer

  1. garmin

    1.1 edit garmin.py, replace token and workflow id

    1.2 add crontab job, for example

    31 2 * * * /usr/bin/env bash -c 'cd /home/user/bin/syncer && source /home/user/bin/syncer/venv/bin/activate && python garmin.py user password --is-cn --only-run'
    
  2. running_page

    2.1 add crontab job, for example

    31 2 * * * /usr/bin/env bash -c 'cd /home/user/bin/syncer && source /home/user/bin/syncer/venv/bin/activate && python running_page.py <your github running_page repo, like yihong0618/running_page>
    

Thanks

This software is inspired by iBeats and star-history, thank you two for creating such a great software.

miles's People

Contributors

naosense avatar valora avatar tiny656 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.