Contributing/Modding TW/grep commands

From Era Wiki
< Contributing‎ | Modding TW
Revision as of 20:07, 10 February 2023 by Vinumsabbathi (talk | contribs) (Created page with "These are a series of grep commands you can use to find out how long your dialogue is, or find lines that are too long, etc. If you aren't familiar with grep, you'll want to s...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

These are a series of grep commands you can use to find out how long your dialogue is, or find lines that are too long, etc. If you aren't familiar with grep, you'll want to set up WSL] and/or Git for Windows (see the Installation Guide).

Line count:
grep -RE "[^\s*;]PRINTFORM......|[^\s*;]PRINT[LW]*[^F_]......|PRINT_DIALOGUE.*|HPH_PRINT.*" . | grep -v \; | grep -v DEBUGPRINT | wc -l

Lines that are too long:
grep -RE "[^\s*;]PRINTFORM......{149,}|[^\s*;]PRINT[LW]*[^F_]......{149,}|PRINT_DIALOGUE.*{149,}|HPH_PRINT.*{149,}" . | grep -Ev "^\;|\\@|NAME_WITH_HONORIFICS|BREAKENG|PRINT_DIALOGUE" | less

Non-speech lines not using PRINTFORMD:
grep -RE "PRINTFORM [^「(]|PRINTFORML [^「(]|PRINTFORMW [^「(]" . | grep -Ev "\;|DEBUGP" | less

Speech lines using PRINTFORMD:
grep -RE "PRINTFORMD [「(]|PRINTFORMDL [「(]|PRINTFORMDW [「(]" . | grep -v "\;|DEBUGP" | less