OpenCC

OpenCC

920 发布: 2023/6/2 10:30 本文总阅读量

安装

brew install opencc
使用命令【推荐方式三】

方式一:生成新文件

for file in *; do opencc -c s2t -i "$file" -o "$file-output"; done

方式二:生成新文件

find . -type f -name "*.vue" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.vue}_hk.vue"' {} \;

方式三:替换源文件

find . -type f -name "*.js" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;


find . -type f -name "pages.json" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;
调试日志
Last login: Thu Jun  1 14:09:03 on ttys000
hk-mer % ls
LICENSE           babel.config.js   mock              plop-templates    tests
README.es.md      build             node_modules      plopfile.js       vue.config.js
README.ja.md      dist              package-lock.json postcss.config.js
README.md         jest.config.js    package.json      public
README.zh-CN.md   jsconfig.json     patches           src
hk-mer % OpenCC -h
zsh: command not found: OpenCC
hk-mer % brew install opencc
Running `brew update --preinstall`...
==> Downloading https://ghcr.io/v2/homebrew/portable-ruby/portable-ruby/blobs/sha256:61029cec31c68a1fae1fa90fa876adf43d0becff777da793f9b5c5577f00567a
################################################################################### 100.0%
==> Pouring portable-ruby-2.6.10_1.el_capitan.bottle.tar.gz
==> Downloading https://formulae.brew.sh/api/formula.jws.json
################################################################################### 100.0%
==> Downloading https://formulae.brew.sh/api/cask.jws.json
################################################################################### 100.0%
==> Fetching opencc
==> Downloading https://ghcr.io/v2/homebrew/core/opencc/manifests/1.1.6
################################################################################### 100.0%
==> Downloading https://ghcr.io/v2/homebrew/core/opencc/blobs/sha256:151e193c88cdf4ae672af
==> Downloading from https://pkg-containers.githubusercontent.com/ghcr1/blobs/sha256:151e1
################################################################################### 100.0%
==> Pouring opencc--1.1.6.monterey.bottle.tar.gz
🍺  /usr/local/Cellar/opencc/1.1.6: 71 files, 1.9MB
==> Running `brew cleanup opencc`...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
==> `brew cleanup` has not been run in the last 30 days, running now...
Disable this behaviour by setting HOMEBREW_NO_INSTALL_CLEANUP.
Hide these hints with HOMEBREW_NO_ENV_HINTS (see `man brew`).
Removing: /Users/yb007/Library/Caches/Homebrew/cloc--1.92... (405.7KB)
Removing: /Users/yb007/Library/Caches/Homebrew/vapor--18.3.6... (1.5MB)
Removing: /Users/yb007/Library/Caches/Homebrew/vapor_bottle_manifest--18.3.6... (8.6KB)
Removing: /Users/yb007/Library/Caches/Homebrew/cloc_bottle_manifest--1.92... (10.2KB)
Removing: /Users/yb007/Library/Logs/Homebrew/cloc... (64B)
Removing: /usr/local/lib/python3.8/site-packages/__pycache__/easy_install.cpython-38.pyc... (287B)
Removing: /usr/local/lib/python3.8/site-packages/__pycache__/sitecustomize.cpython-38.pyc... (1.4KB)
Pruned 0 symbolic links and 1 directories from /usr/local
hk-mer % ls
LICENSE           babel.config.js   mock              plop-templates    tests
README.es.md      build             node_modules      plopfile.js       vue.config.js
README.ja.md      dist              package-lock.json postcss.config.js
README.md         jest.config.js    package.json      public
README.zh-CN.md   jsconfig.json     patches           src
hk-mer % opencc -h

Open Chinese Convert (OpenCC) Command Line Tool
Author: Carbo Kuo <byvoid@byvoid.com>
Bug Report: http://github.com/BYVoid/OpenCC/issues

Usage: 

   opencc  [--noflush <bool>] [-i <file>] [-o <file>] [-c <file>] [--]
           [--version] [-h]

Options: 

   --noflush <bool>
     Disable flush for every line

   -i <file>,  --input <file>
     Read original text from <file>.

   -o <file>,  --output <file>
     Write converted text to <file>.

   -c <file>,  --config <file>
     Configuration file

   --,  --ignore_rest
     Ignores the rest of the labeled arguments following this flag.

   --version
     Displays version information and exits.

   -h,  --help
     Displays usage information and exits.


   Open Chinese Convert (OpenCC) Command Line Tool

hk-mer % ls
LICENSE           babel.config.js   mock              plop-templates    tests
README.es.md      build             node_modules      plopfile.js       vue.config.js
README.ja.md      dist              package-lock.json postcss.config.js
README.md         jest.config.js    package.json      public
README.zh-CN.md   jsconfig.json     patches           src
hk-mer % ls
LICENSE           babel.config.js   mock              plop-templates    tests
README.es.md      build             node_modules      plopfile.js       vue.config.js
README.ja.md      dist              package-lock.json postcss.config.js
README.md         jest.config.js    package.json      public
README.zh-CN.md   jsconfig.json     patches           src
hk-mer % cd ..
19-hk % ls
hk-admin   hk-mer     hk-service hk-uni-app zip
19-hk % cd hk-uni-app 
hk-uni-app % ls
App.vue                     package-lock.json           store
api                         pages                       template.h5.html
components                  pages.json                  uni.scss
config                      plugin                      uni_modules
libs                        project.config.json         unpackage
main.js                     project.private.config.json utils
manifest.json               sitemap.json                vue.config.js
mixins                      static
hk-uni-app % for file in /Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/*; do opencc -c s2t -i "$file" -o "/Users/yb007/Desktop/CRMEB/19-hk/test/output_$file"; done  
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/Authorize.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/Loading not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/PriceChange not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/WaterfallsFlow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/WaterfallsFlowItem not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/adc not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/addInvoicing not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/addcartWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/addressWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/alert not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/areaWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/cash not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/checkCoupon not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/checkDelivery not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/combinNav not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/comment.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/copyPassword not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/countDown not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/countDownTwo not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/couponListWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/discountDetails not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/easy-loadimage not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/easy-upload not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/emptyPage.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/freightGuarantee not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/goodList not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/home not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/index.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/invoiceGoods not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/jyf-parser not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/mentioned.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/mpvue-calendar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/orderCoupon not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/orderGoods not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/passwordPopup not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/payment not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/plantConSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/plantWaterfallsFlow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/plantWaterfallsFlowItem not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/productConSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/productWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/recommend not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/rightSlider not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/rightSlider.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/rightSlidera.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/shareInfo not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/shareRedPackets not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/shopList not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/sickForm not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/skeleton not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/swipers not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/ucharts not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/uni-calendar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/userEvaluation not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/userNameSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/vconsole.min.js not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/yq-avatar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_/Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/zb-code not writable.
hk-uni-app % sudo for file in /Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/*; do opencc -c s2t -i "$file" -o "/Users/yb007/Desktop/CRMEB/19-hk/test/output_$file"; done   
zsh: parse error near `do'
hk-uni-app % for file in /Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/*; sudo opencc -c s2t -i "$file" -o "/Users/yb007/Desktop/CRMEB/19-hk/test/output_$file"; done  
zsh: parse error near `done'
hk-uni-app % sudo for file in /Users/yb007/Desktop/CRMEB/19-hk/hk-uni-app/components/*; do opencc -c s2t -i "$file" -o "/Users/yb007/Desktop/CRMEB/19-hk/test/output_$file"; done  ls
zsh: parse error near `do'
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd components 
components % ls
Authorize.vue           areaWindow              discountDetails         mentioned.vue           productWindow           swipers
Loading                 cash                    easy-loadimage          mpvue-calendar          recommend               ucharts
PriceChange             checkCoupon             easy-upload             orderCoupon             rightSlider             uni-calendar
WaterfallsFlow          checkDelivery           emptyPage.vue           orderGoods              rightSlider.vue         userEvaluation
WaterfallsFlowItem      combinNav               freightGuarantee        passwordPopup           rightSlidera.vue        userNameSwiper
adc                     comment.vue             goodList                payment                 shareInfo               vconsole.min.js
addInvoicing            copyPassword            home                    plantConSwiper          shareRedPackets         yq-avatar
addcartWindow           countDown               index.vue               plantWaterfallsFlow     shopList                zb-code
addressWindow           countDownTwo            invoiceGoods            plantWaterfallsFlowItem sickForm
alert                   couponListWindow        jyf-parser              productConSwiper        skeleton
components % for file in ./*; do opencc -c s2t -i "$file" -o "/Users/yb007/Desktop/CRMEB/19-hk/test/output_$file"; done   
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./Authorize.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./Loading not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./PriceChange not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./WaterfallsFlow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./WaterfallsFlowItem not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./adc not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./addInvoicing not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./addcartWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./addressWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./alert not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./areaWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./cash not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./checkCoupon not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./checkDelivery not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./combinNav not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./comment.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./copyPassword not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./countDown not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./countDownTwo not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./couponListWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./discountDetails not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./easy-loadimage not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./easy-upload not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./emptyPage.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./freightGuarantee not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./goodList not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./home not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./index.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./invoiceGoods not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./jyf-parser not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./mentioned.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./mpvue-calendar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./orderCoupon not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./orderGoods not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./passwordPopup not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./payment not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./plantConSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./plantWaterfallsFlow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./plantWaterfallsFlowItem not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./productConSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./productWindow not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./recommend not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./rightSlider not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./rightSlider.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./rightSlidera.vue not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./shareInfo not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./shareRedPackets not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./shopList not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./sickForm not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./skeleton not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./swipers not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./ucharts not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./uni-calendar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./userEvaluation not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./userNameSwiper not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./vconsole.min.js not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./yq-avatar not writable.
/Users/yb007/Desktop/CRMEB/19-hk/test/output_./zb-code not writable.
components % opencc -c s2t -i Authorize.vue -o output_Authorize.vue
components % ls
Authorize.vue           areaWindow              discountDetails         mentioned.vue           productConSwiper        skeleton
Loading                 cash                    easy-loadimage          mpvue-calendar          productWindow           swipers
PriceChange             checkCoupon             easy-upload             orderCoupon             recommend               ucharts
WaterfallsFlow          checkDelivery           emptyPage.vue           orderGoods              rightSlider             uni-calendar
WaterfallsFlowItem      combinNav               freightGuarantee        output_Authorize.vue    rightSlider.vue         userEvaluation
adc                     comment.vue             goodList                passwordPopup           rightSlidera.vue        userNameSwiper
addInvoicing            copyPassword            home                    payment                 shareInfo               vconsole.min.js
addcartWindow           countDown               index.vue               plantConSwiper          shareRedPackets         yq-avatar
addressWindow           countDownTwo            invoiceGoods            plantWaterfallsFlow     shopList                zb-code
alert                   couponListWindow        jyf-parser              plantWaterfallsFlowItem sickForm
components % cd easy-upload 
easy-upload % ls
easy-upload.vue readme.md
easy-upload % for file in ./*; do opencc -c s2t -i "$file" -o "output_$file"; done
output_./easy-upload.vue not writable.
output_./readme.md not writable.
easy-upload % for file in ./; do opencc -c s2t -i "$file" -o "output_$file"; done 
output_./ not writable.
easy-upload % sudo for file in ./; do opencc -c s2t -i "$file" -o "output_$file"; done
zsh: parse error near `do'
easy-upload % for file in ./; do opencc -c s2t -i "$file" -o "output_$file"; done     
output_./ not writable.
easy-upload % for file in ./; do opencc -c s2t -i "$file" -o "~/output/output_$(basename "$file")"; done
~/output/output_. not writable.
easy-upload % for file in *;do opencc -c s2t -i "$file" -o "~/output/output_$(basename "$file")"; done    
~/output/output_easy-upload.vue not writable.
~/output/output_readme.md not writable.
easy-upload % for file in *; do opencc -c s2t -i "$file" -o "output_$file"; done                      
easy-upload % for file in *; do opencc -c s2t -i "$file" -o "$file output"; done
easy-upload % for file in *; do opencc -c s2t -i "$file" -o "$file-output"; done
easy-upload % cd ..
components % cd aaa-test 
aaa-test % ls
easy-loadimage easy-upload
aaa-test % for file in *; do opencc -c s2t -i "$file" -o "$file-output"; done
^C%                                                                                                                                                                  aaa-test % for file in /*; do opencc -c s2t -i "$file" -o "$file-output"; done
/Applications-output not writable.
/Library-output not writable.
/System-output not writable.
/Users-output not writable.
/Volumes-output not writable.
/bin-output not writable.
/cores-output not writable.
/dev-output not writable.
/etc-output not writable.
/home-output not writable.
/opt-output not writable.
/private-output not writable.
/sbin-output not writable.
/tmp-output not writable.
/usr-output not writable.
/var-output not writable.
aaa-test % for file in ./*; do opencc -c s2t -i "$file" -o "$file-output"; done
^C%                                                                                                                                                             aaa-test % find ./*  -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done
output_./easy-loadimage/easy-loadimage.vue not writable.
output_./easy-upload/easy-upload.vue not writable.
output_./easy-upload/readme.md not writable.
aaa-test % sudo find ./*  -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done
Password:
output_./easy-loadimage/easy-loadimage.vue not writable.
output_./easy-upload/easy-upload.vue not writable.
output_./easy-upload/readme.md not writable.
aaa-test % find *  -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done 
output_easy-loadimage/easy-loadimage.vue not writable.
output_easy-upload/easy-upload.vue not writable.
output_easy-upload/readme.md not writable.
aaa-test % sudo find *  -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done
output_easy-loadimage/easy-loadimage.vue not writable.
output_easy-upload/easy-upload.vue not writable.
output_easy-upload/readme.md not writable.
aaa-test % sudo find *  -name "*.vue" -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done 
Password:
aaa-test % find *  -name "*.vue | *.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done  
aaa-test % find   -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done 
find: illegal option -- n
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
aaa-test % find  -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done 
find: illegal option -- n
usage: find [-H | -L | -P] [-EXdsx] [-f path] path ... [expression]
       find [-H | -L | -P] [-EXdsx] -f path [path ...] [expression]
aaa-test % find ./ -name "*.vue" -o -name "*.md" | while read file; do opencc -c s2t -i "$file" -o "output_$file"; done
output_.//loadimage.vue not writable.
output_.//easy-loadimage/easy-loadimage.vue not writable.
output_.//easy-upload/easy-upload.vue not writable.
output_.//easy-upload/readme.md not writable.
aaa-test % for file in *; do opencc -c s2t -i "$file" -o "$file-output"; done
^C%                                                                                                                                                             aaa-test % for file in *; do opencc -c s2t -i "$file" -o "$file-output"; done
^C%                                                                                                                                                             aaa-test % find . -type f -name "*.vue" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.vue}_hk.vue"' {} \;
aaa-test % find . -type f -name "*.vue | *.md" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.vue}_hk.vue | ${0%.vue}_hk.vue"' {} \;
aaa-test % find . -type f -name "*.vue" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.vue}_hk.vue"' {} \;                          
aaa-test % find . -type f -name "*.md" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.md}_hk.md"' {} \; 
aaa-test % ls
aloadimage.vue easy-loadimage easy-upload
aaa-test % cd ..
components % ls
Authorize.vue           alert                   couponListWindow        jyf-parser              productConSwiper        skeleton
Loading                 areaWindow              discountDetails         mentioned.vue           productWindow           swipers
PriceChange             cash                    easy-loadimage          mpvue-calendar          recommend               ucharts
WaterfallsFlow          checkCoupon             easy-upload             orderCoupon             rightSlider             uni-calendar
WaterfallsFlowItem      checkDelivery           emptyPage.vue           orderGoods              rightSlider.vue         userEvaluation
aaa-test                combinNav               freightGuarantee        passwordPopup           rightSlidera.vue        userNameSwiper
adc                     comment.vue             goodList                payment                 shareInfo               vconsole.min.js
addInvoicing            copyPassword            home                    plantConSwiper          shareRedPackets         yq-avatar
addcartWindow           countDown               index.vue               plantWaterfallsFlow     shopList                zb-code
addressWindow           countDownTwo            invoiceGoods            plantWaterfallsFlowItem sickForm
components % find . -type f -name "*.vue" -exec sh -c 'opencc -c s2hk.json -i "$0" -o "${0%.vue}_hk.vue"' {} \;
Invalid UTF8: ???ܿ????ߣ???????ҵ??չ ]
    // +----------------------------------------------------------------------
    // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
    // +----------------------------------------------------------------------
    // | Licensed CRMEB????????????????δ?????ɲ???ȥ??CRMEB??ذ?Ȩ
    // +----------------------------------------------------------------------
    // | Author: CRMEB Team <admin@crmeb.com>
    // +----------------------------------------------------------------------
    import { mapGetters } from "vuex";
    import { HTTP_REQUEST_URL } from '@/config/app';
    export default{
        data() {
            return {
                domain: HTTP_REQUEST_URL,
            }
        },
        props:{
            msg:{
                type:String,
                default:''
            },
        },
        computed: mapGetters(['viewColor','keyColor']),
        methods:{
            close(){
                this.$emit('bindClose');
            }
        }
    }
</script>

<style lang="scss">
.alert-wrapper{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    .alert-box{
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 500rpx;
        height: 540rpx;
        background-color: #fff;
        border-radius: 10rpx;
        font-size: 34rpx;
        image{
            width: 149rpx;
            height: 230rpx;
        }
        .txt{
            margin-bottom: 20rpx;
        }
        .btn{
            width:340rpx;
            height:90rpx;
            line-height: 90rpx;
            text-align: center;
            background-image:linear-gradient(-90deg,var(--view-bntColor21) 0%,var(--view-bntColor22) 100%);
            border-radius:45rpx;
            color: #fff;
        }
    }
}
</style>

components % find . -type f -name "*.vue" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

Invalid UTF8: ???ܿ????ߣ???????ҵ??չ ]
    // +----------------------------------------------------------------------
    // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
    // +----------------------------------------------------------------------
    // | Licensed CRMEB????????????????δ?????ɲ???ȥ??CRMEB??ذ?Ȩ
    // +----------------------------------------------------------------------
    // | Author: CRMEB Team <admin@crmeb.com>
    // +----------------------------------------------------------------------
    import { mapGetters } from "vuex";
    import { HTTP_REQUEST_URL } from '@/config/app';
    export default{
        data() {
            return {
                domain: HTTP_REQUEST_URL,
            }
        },
        props:{
            msg:{
                type:String,
                default:''
            },
        },
        computed: mapGetters(['viewColor','keyColor']),
        methods:{
            close(){
                this.$emit('bindClose');
            }
        }
    }
</script>

<style lang="scss">
.alert-wrapper{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    .alert-box{
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 500rpx;
        height: 540rpx;
        background-color: #fff;
        border-radius: 10rpx;
        font-size: 34rpx;
        image{
            width: 149rpx;
            height: 230rpx;
        }
        .txt{
            margin-bottom: 20rpx;
        }
        .btn{
            width:340rpx;
            height:90rpx;
            line-height: 90rpx;
            text-align: center;
            background-image:linear-gradient(-90deg,var(--view-bntColor21) 0%,var(--view-bntColor22) 100%);
            border-radius:45rpx;
            color: #fff;
        }
    }
}
</style>

components % ls
ls: .: Operation not permitted
components % cd ..
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd
~ % ls
Applications         Documents            Movies               Postman              Sunlogin Files       default_thumb.png    package-lock.json
Aurora               Downloads            Music                Public               bin                  image                sensors
Desktop              Library              Pictures             Sunlogin             conda-zsh-completion node_modules         许可.pdf
~ % cd Desktop 
Desktop % ls
CRMEB                                           p12                                             永震5月汇总.xlsx
CRMEB-BF                                        t.png                                           永震5月汇总截止24号.xlsx
CerUdid                                         test                                            几楼新
FTP                                             test.html                                       腾创医
Mark                                            test123                                         音视频
Sign                                            wxrun                                           项目笔记
UniApp                                          分类                                            疫情期间工作证明.docx
animation.html                                  图片                                            药店小程序(多商户)审核指引.docx
del-                                            备份
likeadmin-master                                审核
Desktop % cd CRMEB
CRMEB % ls
1.GuangDongLife 11.zf           13.Car          15.FenDan       17-sd           19-hk           3.HuLianWang    5.mpauth        7.jiazheng      9.NeiMengBaiNa
10.RenWu.abc    12.YaoMaiMai    14.House        16-task         18-i18n         2.XiZangGuangYu 4.HuaXia        6.cid           8.haolian
CRMEB % cd 19-hk 
19-hk % ls
hk-admin   hk-mer     hk-service hk-uni-app zip
19-hk % cd hk-uni-app 
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd components 
components % ls
Authorize.vue           areaWindow              discountDetails         mentioned.vue           productWindow           swipers
Loading                 cash                    easy-loadimage          mpvue-calendar          recommend               ucharts
PriceChange             checkCoupon             easy-upload             orderCoupon             rightSlider             uni-calendar
WaterfallsFlow          checkDelivery           emptyPage.vue           orderGoods              rightSlider.vue         userEvaluation
WaterfallsFlowItem      combinNav               freightGuarantee        passwordPopup           rightSlidera.vue        userNameSwiper
adc                     comment.vue             goodList                payment                 shareInfo               vconsole.min.js
addInvoicing            copyPassword            home                    plantConSwiper          shareRedPackets         yq-avatar
addcartWindow           countDown               index.vue               plantWaterfallsFlow     shopList                zb-code
addressWindow           countDownTwo            invoiceGoods            plantWaterfallsFlowItem sickForm
alert                   couponListWindow        jyf-parser              productConSwiper        skeleton
components % find . -type f -name "*.vue" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

Invalid UTF8: ?ر?</view>
        </view>
    </view>
</template>

<script>
    // +----------------------------------------------------------------------
    // | CRMEB [ CRMEB???ܿ????ߣ???????ҵ??չ ]
    // +----------------------------------------------------------------------
    // | Copyright (c) 2016~2021 https://www.crmeb.com All rights reserved.
    // +----------------------------------------------------------------------
    // | Licensed CRMEB????????????????δ?????ɲ???ȥ??CRMEB??ذ?Ȩ
    // +----------------------------------------------------------------------
    // | Author: CRMEB Team <admin@crmeb.com>
    // +----------------------------------------------------------------------
    import { mapGetters } from "vuex";
    import { HTTP_REQUEST_URL } from '@/config/app';
    export default{
        data() {
            return {
                domain: HTTP_REQUEST_URL,
            }
        },
        props:{
            msg:{
                type:String,
                default:''
            },
        },
        computed: mapGetters(['viewColor','keyColor']),
        methods:{
            close(){
                this.$emit('bindClose');
            }
        }
    }
</script>

<style lang="scss">
.alert-wrapper{
    position: fixed;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,.5);
    .alert-box{
        position: absolute;
        left: 50%;
        top: 50%;
        transform: translate(-50%,-50%);
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        width: 500rpx;
        height: 540rpx;
        background-color: #fff;
        border-radius: 10rpx;
        font-size: 34rpx;
        image{
            width: 149rpx;
            height: 230rpx;
        }
        .txt{
            margin-bottom: 20rpx;
        }
        .btn{
            width:340rpx;
            height:90rpx;
            line-height: 90rpx;
            text-align: center;
            background-image:linear-gradient(-90deg,var(--view-bntColor21) 0%,var(--view-bntColor22) 100%);
            border-radius:45rpx;
            color: #fff;
        }
    }
}
</style>

components % ls
Authorize.vue           areaWindow              discountDetails         mentioned.vue           productWindow           swipers
Loading                 cash                    easy-loadimage          mpvue-calendar          recommend               ucharts
PriceChange             checkCoupon             easy-upload             orderCoupon             rightSlider             uni-calendar
WaterfallsFlow          checkDelivery           emptyPage.vue           orderGoods              rightSlider.vue         userEvaluation
WaterfallsFlowItem      combinNav               freightGuarantee        passwordPopup           rightSlidera.vue        userNameSwiper
adc                     comment.vue             goodList                payment                 shareInfo               vconsole.min.js
addInvoicing            copyPassword            home                    plantConSwiper          shareRedPackets         yq-avatar
addcartWindow           countDown               index.vue               plantWaterfallsFlow     shopList                zb-code
addressWindow           countDownTwo            invoiceGoods            plantWaterfallsFlowItem sickForm
alert                   couponListWindow        jyf-parser              productConSwiper        skeleton
components % cd ..
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd pages 
pages % ls
activity          chat              goods_cate        news_details      order_details     plantGrass        promotional_items user
admin             columnGoods       goods_details     news_list         order_pay_back    plant_grass       retrieve_password users
auth              error             index             order_addcart     order_pay_status  product           store
pages % find . -type f -name "*.vue" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

pages % cd ..                                                                                                         
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd libs 
libs % find . -type f -name "*.vue" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

libs % find . -type f -name "*.js" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

libs % ls
chat.js    login.js   order.js   routine.js spread.js  uniApi.js  wechat.js
libs % cd ..
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd mixins 
mixins % ls
SendVerifyCode.js history.js
mixins % find . -type f -name "*.js" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

mixins % cd ..
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % cd utils 
utils % ls
SubscribeMessage.js dialog.js           index.js            request.js          validate.js
cache.js            emoji.js            permission.js       util.js
utils % find . -type f -name "*.js" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

utils % ls                                                                                                           
SubscribeMessage.js dialog.js           index.js            request.js          validate.js
cache.js            emoji.js            permission.js       util.js
utils % cd ..
hk-uni-app % ls
App.vue                     main.js                     pages.json                  static                      unpackage
api                         manifest.json               plugin                      store                       utils
components                  mixins                      project.config.json         template.h5.html            vue.config.js
config                      package-lock.json           project.private.config.json uni.scss
libs                        pages                       sitemap.json                uni_modules
hk-uni-app % find . -type f -name "pages.json" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;

hk-uni-app % find . -type f -name "pages.json" -exec sh -c 'opencc -i "$1" -o "$1".tmp -c s2hk.json && mv "$1".tmp "$1"' _ {} \;
hk-uni-app %