diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 143847c..1c8be47 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -1,41 +1,22 @@ -name: "FAP: Build for multiple SDK sources" -# This will build your app for dev and release channels on GitHub. -# It will also build your app every day to make sure it's up to date with the latest SDK changes. -# See https://github.com/marketplace/actions/build-flipper-application-package-fap for more information +name: "Build fap App" on: push: - ## put your main branch name under "branches" - #branches: - # - master pull_request: - schedule: - # do a build every day - - cron: "1 1 * * *" + workflow_dispatch: jobs: ufbt-build: runs-on: ubuntu-latest - strategy: - matrix: - include: - - name: dev channel - sdk-channel: dev - - name: release channel - sdk-channel: release - # You can add unofficial channels here. See ufbt action docs for more info. - name: 'ufbt: Build for ${{ matrix.name }}' + name: 'ufbt: Build for release' steps: - name: Checkout uses: actions/checkout@v4 - name: Build with ufbt uses: flipperdevices/flipperzero-ufbt-action@v0.1 id: build-app - with: - sdk-channel: ${{ matrix.sdk-channel }} - name: Upload app artifacts uses: actions/upload-artifact@v3 with: - # See ufbt action docs for other output variables name: ${{ github.event.repository.name }}-${{ steps.build-app.outputs.suffix }} path: ${{ steps.build-app.outputs.fap-artifacts }} diff --git a/.gitignore b/.gitignore index 81a8981..3238c8d 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ dist/* .editorconfig .env .ufbt +.DS_Store \ No newline at end of file diff --git a/README-zh.md b/README-zh.md index b485d3e..3190774 100644 --- a/README-zh.md +++ b/README-zh.md @@ -2,16 +2,42 @@ [ENGLISH](README.md) -在 Flipper Zero 上显示当前时间在今年中的进度条和百分比 +显示当前时间在今年中的进度条和百分比 + +![](screen/image0.png) + +本项目基于 Flipper Zero 平台开发,用于计算今年初到当前秒数与今年总计秒数比值,并以进度条和百分比展示的 App。 + +这个 App 的主旨是提醒使用者珍惜时间。 ## 构建 -TODO +安装 [uFBT](https://github.com/flipperdevices/flipperzero-ufbt) 构建工具到系统中。 + +```bash +pip install ufbt +``` + +将项目源码克隆到本地。 + +```bash +git clone https://github.com/SocialSisterYi/flipperzero-YearProgress +``` + +使用 uFBT 构建应用 (如第一次使用需等待自动下载工具链)。 + +```bash +ufbt +``` ## 安装 -TODO +将你的 Flipper 通过 USB 数据线连接电脑,然后使用下方命令进行构建+上传。 + +```bash +ufbt launch +``` -## 版本发布 +也可以在`./dist/yaer_progress.fap`寻找编译结果文件,或从 [Release](https://github.com/SocialSisterYi/flipperzero-YearProgress/releases) 中下载这个`.fap`文件。 -TODO +接着你可以使用 [qFlipper](https://flipperzero.one/downloads) 上传这个文件到 `/ext/apps/tools/`。 diff --git a/README.md b/README.md index bb582d9..dbde8a7 100644 --- a/README.md +++ b/README.md @@ -2,16 +2,42 @@ [中文文档](README-zh.md) -Display A progress bar and percent for now in this year on the Flipper Zero +Display A progress bar and percent for now in this year + +![](screen/image0.png) + +This repo contains a simple App for the Flipper Zero that can calculate the ratio of the total seconds since the beginning of this year to now to the total of seconds this year, and display progress bar and persent for this ratio. + +The purpose of this App reminds users to cherish Time. ## Build -TODO +Install [uFBT](https://github.com/flipperdevices/flipperzero-ufbt) build tool on your system. + +```bash +pip install ufbt +``` + +Clone the source code. + +```bash +git clone https://github.com/SocialSisterYi/flipperzero-YearProgress +``` + +Use uFBT to build this App (need wait toolchain auto download for first time use). + +```bash +ufbt +``` ## Installing -TODO +Connect you Flipper via USB cable after uFBT build, and run following command. + +```bash +ufbt launch +``` -## Release +Also, find building result file `./dist/yaer_progress.fap` or download `.fap` from [Release](https://github.com/SocialSisterYi/flipperzero-YearProgress/releases). -TODO +Then you can use [qFlipper](https://flipperzero.one/downloads) to transmit file, upload this into `/ext/apps/tools/`. diff --git a/images/Percent_10x14.png b/images/Percent_10x14.png new file mode 100644 index 0000000..677911f Binary files /dev/null and b/images/Percent_10x14.png differ diff --git a/screen/image0.png b/screen/image0.png new file mode 100644 index 0000000..e67167f Binary files /dev/null and b/screen/image0.png differ diff --git a/year_progress.c b/year_progress.c index 95075e1..c52e90f 100644 --- a/year_progress.c +++ b/year_progress.c @@ -4,7 +4,6 @@ #include #include -#include #include #define TAG "YearProgress"