Giter Site home page Giter Site logo

superman66 / wakatime-sync Goto Github PK

View Code? Open in Web Editor NEW
111.0 3.0 101.0 989 KB

Update Wakatime summary data to your gist every day

Home Page: http://wakatime.chenhuichao.com

JavaScript 100.00%
wakatime sync gist javascript wakatime-sync wakatime-dashboard wakatime-apikey

wakatime-sync's Introduction

wakatime-sync

Update Wakatime summary data to your gist every day


If you only need notify wakatime daily report, you can check out wakatime-notify

Setup

Prep work

  1. Create a new public GitHub Gist (https://gist.github.com/)
  2. Create a token with the gist scope and copy it. (https://github.com/settings/tokens/new)
  3. Create a WakaTime account (https://wakatime.com/signup)
  4. In your account settings, copy the existing WakaTime API Key (https://wakatime.com/settings/account)

Project setup

  1. Fork this repo
  2. Go to the repo Settings > Secrets
  3. Add the following environment variables:
    • GH_TOKEN: The GitHub token generated above.
    • WAKATIME_API_KEY: The API key for your WakaTime account.
    • GIST_ID: The ID portion from your gist url: https://gist.github.com/superman66/75f3b2ec23c7f69594ca3d9e8b7ea81d..
  4. Run workflow manually. Because workflows aren’t being run on forked repository.

Push Daily Report to Wechat

if you are using Wechat, you can use ServerChan(http://sc.ftqq.com/) to push wakatime daily report to your Wechat.

Settting

  1. Create a ServerChan account (https://sct.ftqq.com/)
  2. Copy SCKEY (https://sct.ftqq.com/sendkey)
  3. Bind your micromessage in ServerChan
  4. Add SCKEY to repo Secrets: SCU_KEY

after that, you will receive Wakatime daily report everyday.

Warning

In addition to a specific file's contents being truncated, the entire files list may be truncated if the total number exceeds 300 files. If the top level truncated key is true, only the first 300 files have been returned in the files list. If you need to fetch all of the gist's files, you'll need to clone the gist via the URL provided by git_pull_url.

Gist Truncation

More Usage

you can send the daily report to you email, telegram, Slack or other IM. If you are interest in it, take a issue or PR.

How can I use this data

You can use this data in Wakatime Dashboard(http://wakatime.chenhuichao.com).

You input the Gist ID, then you can see the report.

wakatime-sync's People

Contributors

dependabot[bot] avatar superman66 avatar suyanhanx avatar xlzy520 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

wakatime-sync's Issues

如何修改Server酱推送的日期

请问我现在每天Server酱推送的都是昨天的数据,我是每晚9.30推送的,如何让她推送今天的数据。每天晚上都是看到前一天的数据 o(╥﹏╥)o

Invalid Workflow File

fork该项目之后:

  • Actions 对于 forked 项目是关闭的,这一点是不是需要在文档中提一下
  • 用 action.yml 的内容自己新建一个action,提示 Invalid Workflow File 错误
  • 在Github Marketplace上可以直接用这个action,也是报一样的错误
name: wakatime-sync
uses: superman66/[email protected]
Invalid Workflow File
No event triggers defined in `on`

说下 syncGistId 如何获取

找了好半天 结果就在 gist 域名后面

https://gist.github.com/justpsvm/e2f4543f1c3efa16db744be1ae8f167a

其中 e2f4543f1c3efa16db744be1ae8f167a 就是你的 id

server酱貌似用不了

那个我按照教程一步步来, gist没有问题, server酱的推送测试没问题, 但不过就是没有给我推送代码时间

'NODE_ENV' 不是内部或外部命令,也不是可运行的程序

npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] serve: NODE_ENV=production pm2 start pm2.json --env production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] serve script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2019-07-02T08_30_56_462Z-debug.log
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: npm run serve
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output above.
npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\Administrator\AppData\Roaming\npm-cache_logs\2019-07-02T08_30_56_499Z-debug.log

按照 https://github.com/superman66/wakatime-sync/issues/2说的方法,依然不能运行

Two points

  1. I added a trigger named "work_dispatch" in the schedule.yml to run the workflow manually through reading Manually running a workflow - GitHub Docs.After that there will be a run manually button of the workflow otherwise there is nothing.Or We should edit REAM.md to explain clearly how to run manually .Well, maybe I'm too new.
    image.png
  2. I get a warning when finishing running the workflow that says :"update-gist:Node.js 12 actions are deprecated. For more information see:https://github.blog/changelog/2022-09-22-github-actions-all-actions-will-begin-running-on-node16-instead-of-node12/. Please update the following actions to use Node.js 16: superman66/wakatime-sync@master". I have updated node12 to 16 in my file action.yml. It doesn't matter and may becomes a bug but just a try .
    image.png

一个发现的问题关于配置文件

最近又重新装了一次,发现无法使用, 检查log文件发现是config语法问题, 把// config.json去掉就好了

// config.json
{
  "wakatimeApiKey": "xxxxxxxxx",
  "gistToken": "xxxxxxxxx",
  "syncGistId": "xxxxxxxxx"
}

(顺便貌似我的Server酱还是用不了)

'NODE_ENV' 不是内部或外部命令,也不是可运行的程序 或批处理文件。

启动脚本报错:
`D:\code\git\wakatime-sync (master -> origin) ([email protected])
λ npm run start

[email protected] start D:\code\git\wakatime-sync
NODE_ENV=production pm2 start pm2.json --env production

'NODE_ENV' 不是内部或外部命令,也不是可运行的程序
或批处理文件。
npm ERR! code ELIFECYCLE
npm ERR! errno 1
npm ERR! [email protected] start: NODE_ENV=production pm2 start pm2.json --env production
npm ERR! Exit status 1
npm ERR!
npm ERR! Failed at the [email protected] start script.
npm ERR! This is probably not a problem with npm. There is likely additional logging output abov

npm ERR! A complete log of this run can be found in:
npm ERR! C:\Users\dp\AppData\Roaming\npm-cache_logs\2018-12-18T01_10_39_957Z-debug.log `

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.