Giter VIP home page Giter VIP logo

youeclipse / waka-box-go Goto Github PK

View Code? Open in Web Editor NEW
161.0 3.0 138.0 47 KB

๐Ÿ“Š Update profile README / pinned gist to contain your weekly WakaTime stats. This is a Golang implementation, see the original version https://github.com/matchai/waka-box. ๅฐ†ไฝ ็š„ WakaTime ๆฏๅ‘จ่ฏญ่จ€ไฝฟ็”จ็ปŸ่ฎกๆ˜พ็คบๅœจ profile README / pined gistใ€‚

License: Apache License 2.0

Go 100.00%
wakatime-api wakatime pinned-gist weekly-wakatime-stats profile-readme profile

waka-box-go's Introduction

Hi there ๐Ÿ‘‹

About me

  • ๐Ÿ”ญ Iโ€™m currently working at Tencent as a backend engineer.
  • ๐ŸŒฑ Iโ€™m currently learning Kubernetes and Istio.
  • ๐Ÿ’ฌ Ask me about anything.
  • ๐Ÿ›ฉ๏ธ How to reach me: @YouEclipse.
  • ๐ŸŽฎ A Nintendo fan and FPS games lover , you can also find me on Steam.

Platform&Tools


Go              ๐Ÿ•“ 32h17m โ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–ˆโ–Žโ–‘ 92.2%
XML             ๐Ÿ•“ 1h8m   โ–‹โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  3.2%
Other           ๐Ÿ•“ 52m    โ–Œโ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  2.5%
PHP             ๐Ÿ•“ 23m    โ–โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  1.1%
CSV             ๐Ÿ•“ 7m     โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘โ–‘  0.4%

powered by waka-box-go

๐Ÿ”ซ Counter-Strike: Global Offensive ๐Ÿ•˜ 1548 hrs 17 mins
๐ŸŽฎ Apex Legends                     ๐Ÿ•˜ 403 hrs 59 mins
๐Ÿ’ป Wallpaper Engine                 ๐Ÿ•˜ 113 hrs 3 mins
๐Ÿš“ Grand Theft Auto V               ๐Ÿ•˜ 52 hrs 15 mins
๐Ÿณ PUBG: BATTLEGROUNDS              ๐Ÿ•˜ 34 hrs 40 mins

powered by steam-box

waka-box-go's People

Contributors

aarynsmith avatar overstarry avatar yeung66 avatar youeclipse avatar zu1k 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

waka-box-go's Issues

ๅ…ณไบŽๆ‰ง่กŒ็š„ๆ—ถ้—ดๅ‘จๆœŸ

ๆˆ‘ไปŽๅŽŸ้กน็›ฎ้‚ฃ้‡Œๅพ—็Ÿฅ๏ผŒwakaTime ็š„ๆฏๅ‘จๆ•ฐๆฎๆ˜ฏๆŒ‰ๅคฉๆฅๆ›ดๆ–ฐๅ‘ข็š„๏ผŒๆ‰€ไปฅๆฏๅฐๆ—ถๆ‰ง่กŒ็š„่ฏๅ…ถๅฎžไนŸไธไผšๆœ‰ๆ›ดๆ–ฐ Gist ็š„ๆ˜พ็คบ๏ผˆๆˆ‘ๅฝ“ๆ—ถ็œ‹ๅˆฐ Github Action ๆ‰ง่กŒไบ†ไฝ†ๆ˜ฏๆ˜พ็คบๅดๆฒกๆœ‰ๆ›ดๆ–ฐๆ•ฐๆฎ,่ฟ˜ไปฅไธบๆ˜ฏๅ‡บไป€ไนˆ้—ฎ้ข˜ไบ† ๐Ÿ˜‚

ๆ‰€ไปฅๆ„Ÿ่ง‰ๆ‰ง่กŒๅ‘จๆœŸๆ”นๆˆๆฏๅคฉไธ€ๆฌกๆ›ดๅฅฝ๏ผŸ

cron: "0 0 * * *"

panic: Insufficient statistics

2020-06-11T10:46:04.7903977Z ##[group]Run go run ./cmd/main.go
2020-06-11T10:46:04.7904193Z ๏ฟฝ[36;1mgo run ./cmd/main.go๏ฟฝ[0m
2020-06-11T10:46:04.7944898Z shell: /bin/bash -e {0}
2020-06-11T10:46:04.7945053Z env:
2020-06-11T10:46:04.7945682Z   GH_TOKEN: ***
2020-06-11T10:46:04.7945831Z   GIST_ID: 33969f3f7686a55660aed171c790e34b
2020-06-11T10:46:04.7945976Z   GH_USER: Enoch2090
2020-06-11T10:46:04.7946148Z   WAKATIME_API_KEY: ***
2020-06-11T10:46:04.7946300Z   GOROOT: /opt/hostedtoolcache/go/1.14.4/x64
2020-06-11T10:46:04.7946461Z ##[endgroup]
2020-06-11T10:46:05.1089618Z go: downloading github.com/google/go-github v17.0.0+incompatible
2020-06-11T10:46:05.1209883Z go: downloading github.com/YouEclipse/wakatime-go v0.0.0-20200606100124-b1a24ffc7535
2020-06-11T10:46:07.0419088Z go: downloading github.com/google/go-querystring v1.0.0
2020-06-11T10:46:11.8196451Z panic: Insufficient statistics

ๆˆ‘็œ‹ box.go ้‡Œๅ†™็š„๏ผŒๆŠ›ๅ‡บ่ฟ™ไธช้”™่ฏฏๅบ”่ฏฅๆ˜ฏๅ› ไธบ่ฟ”ๅ›ž็š„ๅˆ—่กจ้‡Œ่ฏญ่จ€็ง็ฑป็ญ‰ไบŽ 0๏ผŸไฝ†ๆ˜ฏๆˆ‘็š„ WakaTime Dashboard็Žฐๅœจๆ˜พ็คบๅ››็ง่ฏญ่จ€๏ผŒไผšไธไผšๆ˜ฏ API ็š„้—ฎ้ข˜๏ผŸ

cannot unmarshal number 1715.0 into Go struct field StatsData.data.daily_average of type int64

Still have the same issue as #37 on commit 4542143.

Full log is shown as below:

panic: wakabox.GetStats: Error getting Current Stats: unmarshal error  :json: cannot unmarshal number 1715.0 into Go struct field StatsData.data.daily_average of type int64

goroutine 1 [running]:
main.main()
	/home/runner/work/ZexinLi0w0/ZexinLi0w0/waka-box-go/cmd/box/main.go:48 +0x7d6
Error: Process completed with exit code 2.

Update the profile README

As Github has a new feature of profile README, maybe waka-box-go can support updating the stats to profile README.

on way to update is adding a comment in the README and then update the comment area.
just like

<!--waka-box start -->
<!--waka-box end -->

Output: "Still Gathering Statistics..."

Hi, I am recently trying to use your project to get a waka-box in my README in Github profile. But when I finish every step in your introduction, I just get the "Still Gathering Statistics...", but when I check my WAKATIME dashboard, there are a lot of data in it, and I do enable the Display code time publicly and Display languages, editors, os, categories publicly.

The output in my README:

image

The Raw file:

image

But I am sure I set the secret token and other parameters right. And the GitHub action runs well.

My workflow config file:

name: Update wakatime stats

on:
  push:
    branches: [main]
  pull_request:
    branches: [main]
  schedule:
    - cron: "5 0 * * *"

jobs:
  build:
    name: Update-waka-stats
    runs-on: ubuntu-latest
    env:
      WAKATIME_API_KEY: ${{ secrets.WAKATIME_API_KEY }}
      GH_TOKEN: ${{ secrets.GH_TOKEN }}
      UPDATE_OPTION: GIST_AND_MARKDOWN
      MARKDOWN_FILE: README.md
      GIST_ID: ce41b***********************997b48
      GIST_BARSTYLE: SOLIDLT
      GIST_BARLENGTH: -1
      GIST_TIMESTYLE: SHORT

    steps:
      - name: Set up Go 1.x
        uses: actions/setup-go@v2
        with:
          go-version: ^1.14
        id: go
      - name: Check out repo
        uses: actions/checkout@v2
      - uses: actions/setup-go@v2
      - name: Clone and run waka-box
        run: |-
          git clone https://github.com/YouEclipse/waka-box-go.git
          cd waka-box-go && go build -o waka ./cmd/box/main.go
          mv ./waka ../ && cd .. && rm -rf waka-box-go/
      - name: Commit and push
        run: |-
          ./waka
          git config --global user.email "[email protected]" && git config --global user.name "Waka-Bot"
          git diff
          git add README.md && git commit -m ":memo: update profile" || exit 0
          git pull && git push

wont run

what I did: changed the cron to run every minute, what it doesn't do:
update the gist.
I also checked actions and workflows and there was nothing there for update gists..
if anyone can help, I would appreciate it

Gist ไผผไนŽๆฒกๆœ‰ๆ›ดๆ–ฐ

ๅˆ›ๅปบ Gist ็š„ๆ—ถๅ€™้šๆ‰‹่พ“ๅ…ฅไบ† Hello๏ผŒๆ‰€ๆœ‰ๆญฅ้ชคๅฎŒๆˆๅŽ๏ผŒGist ๆฒกๆœ‰ๆ›ดๆ–ฐ๏ผŒๆˆ‘้—ๆผไบ†ไป€ไนˆๅ—๏ผŸ

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.