| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
This is a command line tool and a package that together they provide the capability of comparing two directories and appending to files the differences between the directories, also creates possible files or folders that are missing. It was made to help RimWorld's community translators(1) to know what was modified on the last XML updates and to let them keep in track of what they need to add/remove from what has been done.
(1) and maybe other indie games that uses XML
$ go get github.com/XML-Comp/XML-Comp
$ XML-Comp -translation /path/to/language/translationYou need the path that is called "translation", which are described bellow:
My "translation" path: /Users/arthur/Github/RimWorld-PortugueseBrazilian
With this path in hand, running xml-comp -translation your/path/to/translation will let you know in every file of your project what is missing by adding lines to it with what is needed to translate! That simple!
If by any reason you did not install the game on Steam's standard path or want to use a different one, It's possible to use the original flag that exposes your customized path to the game as shows:
In order to use this flag you'll need to parse it with the translation flag as in: xml-comp -original path/... -translation path/...
To compare any kind of files, all you need is to use the flag -doc <type name>, eg -doc html. This will use the paths that you gave only to compare the specified type of document. Another example:
$ XML-Comp -doc html -original path/to/It -translation path/to/ItOBS: This is not required, by default It's comparing all .xml files that are encountered.
// Import the package
import "github.com/XML-Comp/XML-Comp/comparer"
// Set document type variable to the desired document
// without the "." | eg: "xml" or "html"
comparer.DocType = "html"
// Start the main function with the full paths to compare
// the firstPath is always what will be used as model
func main() {
err := comparer.Compare(firstPath, comparingPath)
if err != nil {
log.Fatal(err)
}
}| Back | FazBrowse Home | New Git URL |