KoRegex is a C# based file processing utility designed to apply regex (regular expression) based modifications to files in a specified directory. It allows users to define custom regex patterns and replacements, making it versatile for various text processing needs.
- Source Directory (
-pathor-p): Specify the directory where the program will perform file operations. Usage:-path [directory path]or-p [directory path]. - Output Directory (
-oor-output): Specify the target directory for the program's output. If left empty, the output will default to a Debug subdirectory within the source directory. Usage:-o [directory path]or-output [directory path]. - Regex Name Selection (
-rnor-regexname): This new switch allows the user to select a specific regex pattern from the provided JSON file by its name. If the specified name does not exist, the user must manually choose from the available options. Usage:-rn [regex name]or-regexname [regex name]. - Regex JSON File (
-regexjsonor-rj): Define the path to a JSON file containing regex patterns and replacements. Usage:-regexjson [file path]or-rj [file path]. - Silent Mode (
-sor-silent): When included in the command arguments, this switch enables the silent mode, which suppresses all console outputs during the build process. This is useful when running the program from a .csproj file, as it prevents the display of non-error messages. Usage:-sor-silent.
The program reads the specified JSON file to determine the regex patterns to apply to the files in the source directory.
A KoRegex egy C# alapú fájl-feldolgozó eszköz, amely regex (reguláris kifejezések) alapú módosításokat hajt végre a megadott könyvtár fájljain. Lehetõvé teszi a felhasználók számára, hogy testreszabott regex mintákat és cseréket definiáljanak, így sokoldalúan használható különbözõ szövegfeldolgozási igényekhez.
- Forráskönyvtár (
-pathvagy-p): Adja meg azt a könyvtárat, ahol a program a fájlmûveleteket végzi. Használat:-path [könyvtár útvonala]vagy-p [könyvtár útvonala]. - Kimeneti Könyvtár (
-ovagy-output): Adja meg a program kimeneti adatainak könyvtárát. Ha üresen hagyja, az alapértelmezett kimenet a forráskönyvtár Debug almappájába kerül. Használat:-o [könyvtár útvonala]vagy-output [könyvtár útvonala]. - Regex Név Kiválasztása (
-rnvagy-regexname): Ez az új kapcsoló lehetõvé teszi a felhasználó számára, hogy a megadott JSON fájlból a regex minták közül egy adott nevût válasszon ki. Ha a megadott név nem létezik, a felhasználónak manuálisan kell választania a rendelkezésre álló opciók közül. Használat:-rn [regex név]vagy-regexname [regex név]. - Regex JSON Fájl (
-regexjsonvagy-rj): Határozza meg a regex mintákat és cseréket tartalmazó JSON fájl útvonalát. Használat:-regexjson [fájl útvonala]vagy-rj [fájl útvonala]. - Csendes Mód (
-svagy-silent): Ha a parancs argumentumai között szerepel, ez a kapcsoló engedélyezi a csendes módot, ami elnyom minden konzol kimenetet a build folyamat során. Ez hasznos, ha a programot egy .csproj fájlból indítják, mivel megakadályozza a nem hibaüzenetek megjelenítését. Használat:-svagy-silent.
A program olvassa a megadott JSON fájlt, hogy meghatározza a forráskönyvtár fájljaira alkalmazandó regex mintákat.