# NMSlib **master Branch** : ![](https://gitlab.com/bradley.richins/nmslib/badges/master/pipeline.svg) **develop Branch** : ![](https://gitlab.com/bradley.richins/nmslib/badges/develop/pipeline.svg) NMSlib is a GoLang package for dealing with converting Galactic coordinates to Portal codes and vice versa. NMSlib also translates in game languages to english. ## Installation To install this module use `go get` ```bash go get -u gitlab.com/bradley.richins/nmslib ``` ## Usage **Example:** ```golang package main import ( "fmt" "gitlab.com/bradley.richins/nmslib" ) func main() { portalcode := "006afa556c30" tstvar, err := nmslib.P2gc(portalcode) if err != nil { panic(err) } fmt.Printf("Input:\t%s\nExpecting:\t042F:0079:0D55:006A\nHave:\t%s\n", portalcode, tstvar) nmslib.CreateBanner(portalcode, "NewLennon.png", 0) fmt.Println(Translate{"KIHTYOMOLES"}.Kor2Eng()) korvax := Translate{"Contraband"} fmt.Println(korvax.Eng2Kor()) } ``` ### Creating a Glyph banner with CreateBanner() This function takes 3 parameters: * portalcode: 12 char hex string of portal location * savename: Save location and name * Horizontal/Vertical layout: 0 is horizontal, 1 is vertical **Example:** Horizontal Layout for Galactic Hub [HUB10-6A Icarus Sun](https://nomanssky.gamepedia.com/HUB10-6A_Icarus_Sun) Eniwa 68/L3 ```golang nmslib.CreateBanner("006afa556c30", "NewLennon.png", 0) ``` ![](NewLennon.png) ### Converting Portal code to Galactic address with P2gc() This function only takes 1 parameter and returns a string and error * portalcode: 12 char hex string of portal glyphs **Example:** ```golang ga, _ := nmslib.P3gc("006afa556c30") fmt.Println(ga) ``` Output: ``042F:0079:0D55:006A`` ### Converting Galactic coordinates to Portal codes with Gc2p() This function only takes 1 parameter and returns a string and error * galacticaddress: 16 char 4 block hex address **Example:** ```golang pc, _ := nmslib.P3gc("042F:0079:0D55:006A") fmt.Println(pc) ``` Output: ``006AFA556C30`` ## Translate Words Supported languages - Korvax - Gek - Vy'keen - Atlas ### Translate Atlas to English with Atl2Eng() This function takes only 1 parameter and returns a string * Word: Any known Atlas word (ex. Paka) **Example:** ```golang fmt.Println(Translate{"Paka"}.Atl2Eng()) ``` Output: ``Awake`` ### Translate English to Korvax with Eng2Korvax() This function takes only 1 parameter and returns a string * engword: English word to attempt conversion **Example:** ```golang korvax := Translate{"Contraband"} fmt.Println(korvax.Eng2Kor()) ``` Output: ``Zelidovoso`` ### Language commands Gek: - ``Translate{word}.Gek2Eng()`` - ``Translate{word}.Eng2Gek()`` Korvax: - ``Translate{word}.Kor2Eng()`` - ``Translate{word}.Eng2Kor()`` Vy'keen: - ``Translate{word}.Vyk2Eng()`` - ``Translate{word}.Eng2Vyk()`` Atlas: - ``Translate{word}.Atl2Eng()`` - ``Translate{word}.Eng2Atl()`` ## License [MIT](COPYING)