Skip to content

Commit

Permalink
docs
Browse files Browse the repository at this point in the history
  • Loading branch information
jenly1314 committed Aug 18, 2024
1 parent c2b2b4b commit 4393d7d
Show file tree
Hide file tree
Showing 9 changed files with 204 additions and 29 deletions.
12 changes: 12 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
root = true

[*]
indent_style = space
indent_size = 2
ij_continuation_indent_size = 2
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[*.{kt, kts}]
ij_kotlin_imports_layout = *
38 changes: 19 additions & 19 deletions .github/workflows/gradle.yml → .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
name: Android CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Gradle
name: Android CI

on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

jobs:
build:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- name: Set up JDK 17
uses: actions/setup-java@v1
with:
java-version: 17
- name: Build with Gradle
run: ./gradlew build
56 changes: 56 additions & 0 deletions .github/workflows/docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: docs

on:
push:
branches:
- master

env:
JAVA_VERSION: 17
PYTHON_VERSION: 3.x
GRADLE_OPTS: "-Dorg.gradle.jvmargs=-Xmx4g -Dorg.gradle.daemon=false -Dkotlin.incremental=false"

permissions:
contents: write
id-token: write
pages: write

jobs:
docs:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'

steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Configure JDK
uses: actions/setup-java@v4
with:
distribution: 'zulu'
java-version: ${{ env.JAVA_VERSION }}

- name: Install Python
uses: actions/setup-python@v5
with:
python-version: ${{ env.PYTHON_VERSION }}

- name: Install MkDocs Material
run: pip install mkdocs-material

- name: Generate Docs
run: ./build_docs.sh

- name: Upload to GitHub Pages
uses: actions/upload-pages-artifact@v3
with:
path: site

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
8 changes: 4 additions & 4 deletions change_log.md → CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## 版本记录
## 版本日志

#### v3.2.0:2024-07-16
* 更新CameraScan至v1.2.0
Expand Down Expand Up @@ -50,7 +50,7 @@
* 更新compileSdkVersion至31
* 更新Gradle至v7.2

#### v2.1.1:2021-8-4
#### v2.1.1:2021-8-4
* 更新CameraX至v1.0.1
* 优化CameraConfig的一些默认配置

Expand Down Expand Up @@ -79,7 +79,7 @@
* minSdk要求从 **16+** 改为 **21+**

#### v1.1.9:2020-4-28
* 修复1.1.8版本优化细节时,不小心改出个Bug(fix #86)
* 修复1.1.8版本优化细节时,不小心改出个Bug(fix #86)

#### v1.1.8:2020-4-27
* 统一日志管理
Expand Down Expand Up @@ -141,4 +141,4 @@
* 优化扫码识别速度

#### v1.0.0:2018-8-9
* ZXingLite初始版本
* ZXingLite初始版本
14 changes: 8 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
[![License](https://img.shields.io/badge/license-Apche%202.0-blue.svg)](http://www.apache.org/licenses/LICENSE-2.0)

ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和生成二维码/条形码功能,扫码界面完全支持自定义;使用ZXingLite可快速实现扫码识别相关功能。
> 简单如斯,你不试试?
> 简单如斯,你不试试?
## Gif 展示
![Image](GIF.gif)
Expand All @@ -36,7 +36,7 @@ ZXingLite for Android 是ZXing的精简极速版,基于ZXing库优化扫码和
```gradle
implementation 'com.github.jenly1314:zxing-lite:3.2.0'
```
### 温馨提示
Expand Down Expand Up @@ -167,7 +167,7 @@ public class QRCodeScanActivity extends BarcodeCameraScanActivity {

> **BarcodeCameraScanFragment** 的使用方式与之类似。
更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jitpack.io/com/github/jenly1314/ZXingLite/latest/javadoc/)
更多使用详情,请查看[app](app)中的源码使用示例或直接查看[API帮助文档](https://jenly1314.github.io/ZXingLite/api/)

### 其他

Expand All @@ -194,12 +194,14 @@ dependencies {

## 相关推荐

#### [MLKit](https://github.com/jenly1314/MLKit) 一个强大易用的工具包。通过ML Kit您可以很轻松的实现文字识别、条码识别、图像标记、人脸检测、对象检测等功能。
#### [MLKit](https://github.com/jenly1314/MLKit) 一个强大易用的工具包。通过ML Kit您可以很轻松的实现文字识别、条码识别、图像标记、人脸检测、对象检测等功能。
#### [WeChatQRCode](https://github.com/jenly1314/WeChatQRCode) 基于OpenCV开源的微信二维码引擎移植的扫码识别库。
#### [CameraScan](https://github.com/jenly1314/CameraScan) 一个简化扫描识别流程的通用基础库。
#### [ViewfinderView](https://github.com/jenly1314/ViewfinderView) ViewfinderView一个取景视图:主要用于渲染扫描相关的动画效果。

## 版本记录
<!-- end -->

## 版本日志

#### v3.2.0:2024-07-16
* 更新CameraScan至v1.2.0
Expand Down Expand Up @@ -233,7 +235,7 @@ dependencies {
* 优化ImageAnalyzer中YUV数据的处理
* 更新CameraX至v1.2.2

#### [查看更多版本记录](change_log.md)
#### [查看更多版本日志](CHANGELOG.md)

## 赞赏
如果您喜欢ZXingLite,或感觉ZXingLite帮助到了您,可以点右上角“Star”支持一下,您的支持就是我的动力,谢谢 :smiley:
Expand Down
1 change: 1 addition & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,6 @@ plugins {
id 'com.android.application' version '8.1.2' apply false
id 'com.android.library' version '8.1.2' apply false
id 'org.jetbrains.kotlin.android' version '1.8.10' apply false
id 'org.jetbrains.dokka' version '1.8.20' apply false
id 'com.vanniktech.maven.publish' version '0.25.3' apply false
}
17 changes: 17 additions & 0 deletions build_docs.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/bin/bash

set -ex

# Generate the API docs
./gradlew dokkaHtml

mkdir -p docs/api
mv zxing-lite/build/dokka/html/* docs/api

# Copy in special files that GitHub wants in the project root.
sed '/<!-- end -->/q' README.md > docs/index.md
cat CHANGELOG.md | grep -v '## 版本日志' > docs/changelog.md
cp GIF.gif docs/

# Build the site locally
mkdocs build
86 changes: 86 additions & 0 deletions mkdocs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,86 @@
# Project information
site_name: ZXingLite
site_url: https://jenly1314.github.io/ZXingLite/
site_description: "CameraScan for Android"
site_author: Jenly
remote_branch: gh-pages
edit_uri: ""

# Repository
repo_name: ZXingLite
repo_url: https://github.com/jenly1314/ZXingLite

# Copyright
copyright: 'Copyright &copy; 2018 - 2024 Jenly'

# Configuration
theme:
name: 'material'
favicon: https://jenly1314.github.io/favicon.png
logo: https://jenly1314.github.io/medias/logo.png
icon:
repo: fontawesome/brands/github
language: zh
palette:
- media: "(prefers-color-scheme: light)"
scheme: default
primary: teal
accent: blue
toggle:
icon: octicons/sun-24
name: "切换到深色模式"
- media: "(prefers-color-scheme: dark)"
scheme: slate
primary: teal
accent: blue
toggle:
icon: octicons/moon-24
name: "切换到浅色模式"
features:
- navigation.instant
- navigation.instant.progress
- navigation.tabs
- content.code.copy

extra:
social:
- icon: material/home-circle
link: https://jenly1314.github.io/
- icon: simple/github
link: https://github.com/jenly1314/
- icon: simple/gitee
link: https://gitee.com/jenly1314/
- icon: fontawesome/solid/paper-plane
link: mailto:[email protected]

markdown_extensions:
- smarty
- footnotes
- meta
- toc:
permalink: true
- attr_list
- pymdownx.betterem:
smart_enable: all
- pymdownx.caret
- pymdownx.emoji:
emoji_index: !!python/name:materialx.emoji.twemoji
emoji_generator: !!python/name:materialx.emoji.to_svg
- pymdownx.inlinehilite
- pymdownx.magiclink
- pymdownx.smartsymbols
- pymdownx.superfences
- pymdownx.tilde
- pymdownx.tabbed:
alternate_style: true
- tables

# Plugins
plugins:
- search

nav:
- '概览': index.md
- 'API文档': api/index.html
- '版本日志': changelog.md

1 change: 1 addition & 0 deletions zxing-lite/build.gradle
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
plugins {
id 'com.android.library'
id 'org.jetbrains.kotlin.android'
id 'org.jetbrains.dokka'
id 'com.vanniktech.maven.publish'
}

Expand Down

0 comments on commit 4393d7d

Please sign in to comment.