Skip to content

Commit

Permalink
📝 Add Changelog
Browse files Browse the repository at this point in the history
  • Loading branch information
Freed-Wu committed Mar 4, 2023
1 parent 16ad0fb commit 9e94297
Show file tree
Hide file tree
Showing 9 changed files with 235 additions and 13 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ jobs:
if: runner.os != 'Windows'
env:
THEMIS_VIM: ${{ steps.vim.outputs.executable }}
SKIP: make
run: |
make THEMIS=$themis test
- name: Test for Windows
Expand Down Expand Up @@ -98,9 +99,13 @@ jobs:
- uses: softprops/action-gh-release@v1
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
with:
body_path: ${{ github.workspace }}/CHANGELOG.md
token: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
files: |
dist/*
build/resources/*
env:
GITHUB_REPOSITORY: ${{ github.repository }}
- uses: pypa/gh-action-pypi-publish@release/v1
if: runner.os == 'Linux' && startsWith(github.ref, 'refs/tags/')
with:
Expand Down
7 changes: 6 additions & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
---
exclude: ^assets/txt/.*\.txt$
exclude: ^(assets/txt/.*\.txt|CHANGELOG\.md)$
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.4.0
Expand Down Expand Up @@ -107,9 +107,14 @@ repos:
rev: v0.7.1
hooks:
- id: vimdoc
- repo: https://github.com/Freed-Wu/pre-commit-make
rev: 0.0.1
hooks:
- id: make

ci:
skip:
- make
- shellcheck
- shfmt
- pyright
181 changes: 181 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
# Changelog

<a name="next"></a>
## next

### Changed

- 🎨 Remove unused keys in pyproject.toml [[16ad0fb](https://github.com/Freed-Wu/translate-shell/commit/16ad0fbb6ba48294af909b5cde9af411b356db72)]

### Miscellaneous

- 📝 Add Changelog [[b72b133](https://github.com/Freed-Wu/translate-shell/commit/b72b133e67558ade158cd22004741243fbc9430f)]


<a name="0.0.14"></a>
## 0.0.14 (2023-03-03)

### Changed

- 🚚 Change template extension to jinja2 [[939d116](https://github.com/Freed-Wu/translate-shell/commit/939d116ef755c9ba745d0b9df7edb84e40393ccd)]
- 🎨 Little update for module import [[fadc959](https://github.com/Freed-Wu/translate-shell/commit/fadc9594c26d88655e26cdd65dcd8179e8f2d668)]

### Fixed

- 🐛 Fix icon path to respect FHS [[1736b86](https://github.com/Freed-Wu/translate-shell/commit/1736b86dfefbdf25981c924971dbb9946079accd)]


<a name="0.0.13"></a>
## 0.0.13 (2023-02-27)

### Changed

- 🎨 Improve code of powerlevel10k sections [[44de5d1](https://github.com/Freed-Wu/translate-shell/commit/44de5d10b40bbf7d5eab0301d7964a540863b3a1)]


<a name="0.0.12"></a>
## 0.0.12 (2023-02-21)

### Added

- 👷‍♂️ Update pre-commit [[a187d7a](https://github.com/Freed-Wu/translate-shell/commit/a187d7ad64a7e83d7b3fbfb2a6eb21501300776d)]

### Fixed

- 🚑 Fix [#24](https://github.com/Freed-Wu/translate-shell/issues/24), google&#x27;s explains [[983d944](https://github.com/Freed-Wu/translate-shell/commit/983d944b5b26f203312a98d035fae98cdde4f3cd)]

### Miscellaneous

- 📝 Add deepsource badge [[878f5d6](https://github.com/Freed-Wu/translate-shell/commit/878f5d62c1f943b8313204c69cfffc30762ae294)]


<a name="0.0.11"></a>
## 0.0.11 (2023-01-23)

### Fixed

- 🚑 Fix str() [[d687703](https://github.com/Freed-Wu/translate-shell/commit/d687703fd8cd6d0fb17a0e6ab3f8b0db6fe49ff5)]


<a name="0.0.10"></a>
## 0.0.10 (2023-01-23)

### Added

- ✅ Fix test [[9a10f7a](https://github.com/Freed-Wu/translate-shell/commit/9a10f7a2e174e8202635b656c30a12b54d8d3561)]
- ✅ Fix pyright [[cb99ed6](https://github.com/Freed-Wu/translate-shell/commit/cb99ed6de7e94bd8ec8252d43b8f23092b8fbc6a)]
- ✅ Skip a audit [[2a61a1d](https://github.com/Freed-Wu/translate-shell/commit/2a61a1d985717fe6e636d230fac7038ae06d0518)]
- ✅ Update test_patterns [[92d8284](https://github.com/Freed-Wu/translate-shell/commit/92d8284d16f571e2ec5d675c656958ae4aac6543)]
- 👷‍♂️ Add .deepsource.toml [[d2e1133](https://github.com/Freed-Wu/translate-shell/commit/d2e1133baad8c06c70f338dd2316e09495b8ddaa)]
- 👷‍♂️ Update pre-commit [[5cf8a6c](https://github.com/Freed-Wu/translate-shell/commit/5cf8a6cbf614f5d3d85e1a327b07009c2be19b1b)]

### Changed

- 🎨 Remove unused module [[d9f2a42](https://github.com/Freed-Wu/translate-shell/commit/d9f2a42e3e6425f13dbe2249b4b4098eeeeb2657)]
- 🎨 Fix many anti patterns [[b9d1a8c](https://github.com/Freed-Wu/translate-shell/commit/b9d1a8cb88b2dfb421ed729bdbae85c839075373)]
- ♻️ Remove some &#x27;global&#x27;s [[5d77268](https://github.com/Freed-Wu/translate-shell/commit/5d77268ea6fb4952e0259987a79e8571ec730d39)]
- ♻️ Rewrite get_youdaozhiyun_app_info() [[e9c0c75](https://github.com/Freed-Wu/translate-shell/commit/e9c0c753448dce5c6045bb2ce37358432bb9c5ed)]
- 🎨 Fix [#19](https://github.com/Freed-Wu/translate-shell/issues/19): module imports itself [[9c8fc98](https://github.com/Freed-Wu/translate-shell/commit/9c8fc98b39ca4f60374d61e9feb2e424fae2522f)]
- 🎨 Fix [#17](https://github.com/Freed-Wu/translate-shell/issues/17) about redefinition [[ff058af](https://github.com/Freed-Wu/translate-shell/commit/ff058af1dc90300b8f4e399fd9a3e5732915ed1c)]
- 🎨 Fix [#16](https://github.com/Freed-Wu/translate-shell/issues/16), add __all__ [[34fddc4](https://github.com/Freed-Wu/translate-shell/commit/34fddc415674e386646cb2a07497630ce120e566)]
- 🎨 Fix [#14](https://github.com/Freed-Wu/translate-shell/issues/14), fix inconsistent return [[6e4a057](https://github.com/Freed-Wu/translate-shell/commit/6e4a05701e4d24b1f2ad5b014ae11bc840a68d2a)]
- 🎨 Fix [#12](https://github.com/Freed-Wu/translate-shell/issues/12), format templates/metainfo.py [[ca75799](https://github.com/Freed-Wu/translate-shell/commit/ca75799a34ed1ed5c68c2f0ccbb6ba161182e05e)]

### Fixed

- 🐛 Fix wrong calls of static methods [[4689bb6](https://github.com/Freed-Wu/translate-shell/commit/4689bb6bdf7f1ba5e290e0fd5338432e1c40f3f4)]
- 🐛 Fix [#20](https://github.com/Freed-Wu/translate-shell/issues/20): Exceptions are overlapping [[c559b5e](https://github.com/Freed-Wu/translate-shell/commit/c559b5eae6bf077659f547a1dba9106fcda16391)]
- 🐛 Use &#x60;sys.exit()&#x60; calls [[ddd4359](https://github.com/Freed-Wu/translate-shell/commit/ddd43593ec105ffc978b007f8225b239f94409b5)]
- 🐛 Fix [#9](https://github.com/Freed-Wu/translate-shell/issues/9), remove str.format [[21f12f3](https://github.com/Freed-Wu/translate-shell/commit/21f12f347b528c8b8f76408fbb242909946629ae)]
- 🐛 Change eval-sh to eval-bash [[34bbce4](https://github.com/Freed-Wu/translate-shell/commit/34bbce4acb9c691d95dda7e4cc796d736a216c2b)]
- 💚 Only upload when CI machine is linux [[6dc0820](https://github.com/Freed-Wu/translate-shell/commit/6dc082016d8df6de0eacf93a81191b47ddc58224)]

### Miscellaneous

- Format code with black [[8d0bb18](https://github.com/Freed-Wu/translate-shell/commit/8d0bb182cab7394ffe68496f2a326a7650897d7e)]
- Set &#x60;check&#x60; flag to &#x60;True&#x60; [[41fe780](https://github.com/Freed-Wu/translate-shell/commit/41fe7808d4d1b09103180488d51a7bec372f7488)]
- Fix dangerous default argument [[044c9bc](https://github.com/Freed-Wu/translate-shell/commit/044c9bcf5a04cc4484d55fa82393610d1161796a)]
- Remove unnecessary &#x60;pass&#x60; [[b0ddb44](https://github.com/Freed-Wu/translate-shell/commit/b0ddb447198ef5e0fb25112026b4325e6457bc2a)]
- Refactor unnecessary &#x60;else&#x60; / &#x60;elif&#x60; when &#x60;if&#x60; block has a &#x60;return&#x60; statement [[f788363](https://github.com/Freed-Wu/translate-shell/commit/f7883636ca0e6e149e92ddc11e5138b37e9a645f)]
- Change methods not using its bound instance to staticmethods [[7c6c971](https://github.com/Freed-Wu/translate-shell/commit/7c6c97141078ce7ade190587e4754bbc1fa8dfd0)]
- Format code with black [[df47aa9](https://github.com/Freed-Wu/translate-shell/commit/df47aa90f3b426b8f54ec38944990900f9766ff7)]
- Pass string format arguments as logging method parameters [[98a6536](https://github.com/Freed-Wu/translate-shell/commit/98a65364cb35cc367ee7cbb4fb2ba2511296ffe4)]
- 📝 Fix todo.md/acknowledge.md [[8cb3378](https://github.com/Freed-Wu/translate-shell/commit/8cb3378cad84511b3d25d6e6080f1e10446f5e53)]
- 📝 Add globstar [[1fc1a51](https://github.com/Freed-Wu/translate-shell/commit/1fc1a517eee1e24dcacb2e007a075d5e3254414a)]
- 🧑‍💻 Add executable mode for convenient [[333aedc](https://github.com/Freed-Wu/translate-shell/commit/333aedc20b3baa11b326cd61dd7241a0a6a8af85)]


<a name="0.0.9"></a>
## 0.0.9 (2023-01-09)

### Miscellaneous

- 📝 Update readline.md [[61140ee](https://github.com/Freed-Wu/translate-shell/commit/61140ee0889452f4d261de56fbf79073eff93255)]


<a name="0.0.8"></a>
## 0.0.8 (2023-01-08)

### Changed

- 💄 Add readline tab complete function [[3cf533e](https://github.com/Freed-Wu/translate-shell/commit/3cf533e55c1ac72035de952d7bdee29ee6c545e5)]

### Miscellaneous

- 📝 Fix wrong document build path [[3afec95](https://github.com/Freed-Wu/translate-shell/commit/3afec95a8cd2385602d508ca402f8d9602d7f35e)]


<a name="0.0.7"></a>
## 0.0.7 (2022-12-14)

### Removed

- ➖ Remove build-misc from github actions [[f1dd72a](https://github.com/Freed-Wu/translate-shell/commit/f1dd72abc3c80a80dabf6485e3a90c3187a73eef)]


<a name="0.0.6"></a>
## 0.0.6 (2022-12-08)

### Removed

- 🔥 Remove invalid code about SHELL [[fbdfcbe](https://github.com/Freed-Wu/translate-shell/commit/fbdfcbe03809546253b4e31f08255342acde311d)]


<a name="0.0.5"></a>
## 0.0.5 (2022-12-07)

### Added

- ✨ Support Android [[0189a77](https://github.com/Freed-Wu/translate-shell/commit/0189a77a5c075475e22dd96f177b88ef1a226668)]


<a name="0.0.4"></a>
## 0.0.4 (2022-12-05)

### Added

- ✨ Support GUI [[888007e](https://github.com/Freed-Wu/translate-shell/commit/888007ea4f7aa01a9aeebf8f71bffd770d6d2e07)]


<a name="0.0.3"></a>
## 0.0.3 (2022-12-04)

### Changed

- ♻️ Rewrite clipboard [[3c94cd9](https://github.com/Freed-Wu/translate-shell/commit/3c94cd9d817d7f0664b520dafcda76bf0df199ae)]


<a name="0.0.2"></a>
## 0.0.2 (2022-12-03)

### Fixed

- 🐛 Fix missing files [[8ea4fbb](https://github.com/Freed-Wu/translate-shell/commit/8ea4fbbfe3d9fc8576a8cbc8148c5e72edb26f2e)]


<a name="0.0.1"></a>
## 0.0.1 (2022-12-03)

### Added

- 🎉 Initial [[d410c5d](https://github.com/Freed-Wu/translate-shell/commit/d410c5dce390205f23113831f8f4eef9e0b8423c)]
9 changes: 8 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@ GENERATE_PY = $(EXTERNAL_INIT_PY) $(IGNORE_PY)
SRC = $(shell find src -type f -name '*.py')

.PHONY: default
default: install
# they depend .git so need to be made when git commit
default: doc/translate-shell.txt addon-info.json package.json CHANGELOG.md

# build {{{ #
.PHONY: build
Expand Down Expand Up @@ -46,6 +47,12 @@ build-docs:
addon-info.json: scripts/generate-addon-info.json.pl pyproject.toml
$^ $@

package.json: scripts/generate-addon-info.json.pl pyproject.toml
$^ $@

CHANGELOG.md:
gitmoji-changelog

doc/%.txt: addon-info.json $(shell find . -type f -name '*.vim')
vimdoc .
# }}} build-docs #
Expand Down
2 changes: 1 addition & 1 deletion addon-info.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "translate-shell",
"description": "Translate text by google, bing, youdaozhiyun, haici, stardict, etc at same time from CLI, GUI (GNU/Linux, Android, macOS and Windows), REPL, python, shell and vim.",
"version": "0.0.9",
"version": "0.0.14",
"author": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"repository": {
"type": "git",
Expand Down
3 changes: 3 additions & 0 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -38,4 +38,7 @@ search
```

```{include} ../README.md
---
relative-docs: docs
---
```
7 changes: 7 additions & 0 deletions docs/misc/changelog.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
<!-- markdownlint-disable MD041-->

```{include} ../../CHANGELOG.md
---
relative-docs: docs
---
```
7 changes: 7 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"name": "translate-shell",
"version": "0.0.14",
"description": "Translate text by google, bing, youdaozhiyun, haici, stardict, etc at same time from CLI, GUI (GNU/Linux, Android, macOS and Windows), REPL, python, shell and vim.",
"author": "Wu Zhenyu <wuzhenyu@ustc.edu>",
"license": "GPLv3"
}
27 changes: 17 additions & 10 deletions scripts/generate-addon-info.json.pl
Original file line number Diff line number Diff line change
@@ -1,16 +1,23 @@
#!/usr/bin/env -S perl -pi
use Env qw(GITHUB_REF_NAME);

BEGIN {
@versions = `git tag`;
$version = $versions[-1];
chomp $version;
unless ( $GITHUB_REF_NAME eq '' ) {
$version = $GITHUB_REF_NAME;
}
else {
$version = `git describe --abbrev=0`;
chomp $version;
}
}
unless ( $#ARGV < 0 ) {
$name = $1 if /^name = "([^"]*+)"/;
$description = $1 if /^description = "([^"]*+)"/;
$url = $1 if /^Source = "([^"]*+)"/;
$author = "$1 <$2>"
if /^authors = \[\{ name = "([^"]*+)", email = "([^"]*+)" }]/;
next;
}
unless ($#ARGV < 0) {
$name = $1 if /^name = "([^"]*+)"/;
$description = $1 if /^description = "([^"]*+)"/;
$url = $1 if /^Source = "([^"]*+)"/;
$author = "$1 <$2>" if /^authors = \[\{ name = "([^"]*+)", email = "([^"]*+)" }]/;
next;
};
s/(?<="name": ")([^"]*+)(?=")/$name/;
s/(?<="description": ")([^"]*+)(?=")/$description/;
s/(?<="version": ")([^"]*+)(?=")/$version/;
Expand Down

0 comments on commit 9e94297

Please sign in to comment.