Path Specification
This action allows you to specify a file with its own notation.
If you have a better notation idea, please feel free to suggest it in issues (opens in a new tab) or discussions (opens in a new tab) :)
Single file specification
- Single file
readme
onlyREADME.md
./README.md
Multiple file specification
- getting-started.md
- setup.md
- All markdown files under the EN directory
EN/*.md
./EN/*.md
Multiple nested file specification
We use the node-glob
to identify input files. Please refer to the node-glob
repository (opens in a new tab) for more information.
- setup.md
- bar.md
- To specify
setup.md
andbar.md
EN/**/*.md
./EN/**/*.md
Wildcard output path specification
For example, you want to output an input file to a location under a specified directory. At this time, if you want to maintain the directory structure of the input files, you can use the following command.
/gpt-translate EN/foo/bar.md JA/**/*.md Japanese
The point here is that the path structure of the input file is maintained by /**/
.
The EN
and JA
are properly overwritten because their distances from the root directory match.
The file format can also be inherited, so you can comment the following
/gpt-translate EN/foo/bar.md JA/**/* Japanese
Another use case
Writes all markdowns under any directory to the specified extension under the specified directory.
/gpt-translate EN/foo/*.md **/*.ja.md Japanese
Thus, you can use **
to inherit directories and *
to inherit filenames.