diff --git a/.github/workflows/ci-cd.yaml b/.github/workflows/ci-cd.yaml index 3346b15..7883e52 100644 --- a/.github/workflows/ci-cd.yaml +++ b/.github/workflows/ci-cd.yaml @@ -19,8 +19,46 @@ on: push: branches: [master] +env: + PYTHON_VERSION: "3.10" + jobs: + cancel-previous: + name: Cancel Previous Runs In Order to Allocate Action Resources Immediately for Current Run + if: github.ref != 'refs/heads/master' + runs-on: ubuntu-latest + steps: + - name: Cancel previous + uses: styfle/cancel-workflow-action@0.10.1 + with: + access_token: ${{ github.token }} + + yaml-lint: + name: YAML Style Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actionshub/yamllint@main + + markdown-lint: + name: Markdown Style Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actionshub/markdownlint@main + + linkChecker: + name: Link Check + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Link Checker + uses: lycheeverse/lychee-action@v1.9.0 + with: + fail: true + sync-to-huggingface-space: + needs: [yaml-lint, markdown-lint, linkChecker] if: github.ref == 'refs/heads/master' runs-on: ubuntu-latest steps: diff --git a/.lycheeignore b/.lycheeignore new file mode 100644 index 0000000..f947e00 --- /dev/null +++ b/.lycheeignore @@ -0,0 +1 @@ +http://localhost:7860 diff --git a/.mdlrc b/.mdlrc new file mode 100644 index 0000000..a52d9c5 --- /dev/null +++ b/.mdlrc @@ -0,0 +1,2 @@ +rules "~MD002", "~MD003", "~MD005", "~MD007", "~MD013", "~MD022", "~MD024", "~MD027", "~MD028", "~MD029", "~MD033", "~MD034", "~MD036", "~MD041", "~MD055", "~MD057" +style "#{File.dirname(__FILE__)}/markdownlint.rb" diff --git a/.yamllint b/.yamllint new file mode 100644 index 0000000..6584a13 --- /dev/null +++ b/.yamllint @@ -0,0 +1,23 @@ +--- +extends: default +rules: + line-length: + max: 256 + level: warning + document-start: disable + braces: + forbid: false + min-spaces-inside: 0 + max-spaces-inside: 1 + min-spaces-inside-empty: -1 + max-spaces-inside-empty: -1 + commas: + max-spaces-before: -1 + min-spaces-after: 1 + max-spaces-after: -1 + brackets: + max-spaces-inside: -1 + empty-lines: + max: 3 + indentation: + spaces: 2 diff --git a/README.md b/README.md index bdd6460..e218287 100644 --- a/README.md +++ b/README.md @@ -37,7 +37,7 @@ One morning I was studying German with the famous German WW2 movie [_Generation War_](https://youtu.be/8s_0QteDapc?si=usMdIbY5Skfz0u1q). Managing to find its subtitles[^1][^2][^3] were easy for me. A problem, however, soon arose as I proceeded with them: _the subtitles had errors - missing couple of phrases every few other lines_. This was a big NO for language learners like me. In old days 10 years ago, I would've -reached a dead end... +reached a dead end... [^1]: https://www.opensubtitles.org/en/subtitles/6243166/generation-war-eine-andere-zeit-de [^2]: https://www.opensubtitles.org/en/subtitles/6243167/generation-war-ein-anderer-krieg-de @@ -51,23 +51,28 @@ Being so excited, I decided to industrialize this process and hereby present it __AI movie transcription service that targets specifically for language learners__ > [!NOTE] -> +> > On name "__Tiger__" > > The project name _tiger_ was taken from the _German heavy tank of World War II - > [Tiger I](https://tanks-encyclopedia.com/ww2/germany/panzer-vi_tiger.php#index17)_. -> +> > I chose this name because the project idea was spawned from the study of German language. More importantly, _Tiger I_ -> has been widely recognized as a revolutionary tank being a crown jewels in the history of warfare technology: -> +> has been widely recognized as a revolutionary tank being a crown jewels in the history of warfare technology: +> > > _"It is tempting to view the appearance of the Tiger tank as revolutionary, ... the end result was a machine that > > represented a quantum leap forward in tank design and changed everything - forever"_[^4] -> +> > As _Tiger_ had steered the direction of next-generation heavy tank, this project has also revolutionized my view > toward AI subconsciously and serves as an empirical guide on how I should make NLP more powerful for people with AI. [^4]: _[Tiger tank : Panzerkampfwagen VI Tiger I Ausf. E (SdKfz 181): owner's workshop manual](https://a.co/d/28OzPsK)_, The Tank Museum, 2011. p.13 +License +------- + +The use and distribution terms for [tiger]() are covered by the [Apache License, Version 2.0]. + [Apache License Badge]: https://img.shields.io/badge/Apache%202.0-F25910.svg?style=for-the-badge&logo=Apache&logoColor=white [Apache License, Version 2.0]: https://www.apache.org/licenses/LICENSE-2.0 @@ -77,4 +82,4 @@ __AI movie transcription service that targets specifically for language learners [Hugging Face sync status badge]: https://img.shields.io/github/actions/workflow/status/QubitPi/tiger/ci-cd.yaml?branch=master&style=for-the-badge&logo=github&logoColor=white&label=Hugging%20Face%20Sync%20Up [Hugging Face sync status URL]: https://github.com/QubitPi/tiger/actions/workflows/ci-cd.yaml -[Project Tiger on Hugging Face]: https://huggingface.co/spaces/QubitPi/tiger \ No newline at end of file +[Project Tiger on Hugging Face]: https://huggingface.co/spaces/QubitPi/tiger diff --git a/markdownlint.rb b/markdownlint.rb new file mode 100644 index 0000000..d03c8b2 --- /dev/null +++ b/markdownlint.rb @@ -0,0 +1,20 @@ +# Copyright Jiaqi Liu +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +all +rule 'MD003', style: :setext_with_atx +rule 'MD004', style: :sublist +rule 'MD013', line_length: 120 +rule 'MD029', style: :ordered +rule 'MD026', punctuation: ".,;:!?"