Skip to content

PeterDaveHello/docker-opencc

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 
 
 

Dockerized OpenCC

PRs Welcome Build Status Docker Hub pulls

Docker Hub badge

About OpenCC

A project for conversion between Traditional and Simplified Chinese

Please note that this Docker image repository is not part of the OpenCC project.

Usage

Available OpenCC commands are:

  • opencc
  • opencc_dict
  • opencc_phrase_extract

For OpenCC usage, take a look at its own README.md and run each command with its -h or --help parameter to get help message, e.g.

$ docker run --rm -it peterdavehello/opencc 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

You'll need to mount your working directory into the container so that OpenCC can manipulate the file(s) in, for example:

docker run --rm -it -v ${PWD}:/text -w /text peterdavehello/opencc opencc -c s2tw -i SimplifiedChinese.srt -o TraditionalChinese.srt