Merge pull request #46 from bzz/add-generate-instructions

Doc: add development instructions
This commit is contained in:
Alexander 2017-06-22 12:15:01 +02:00 committed by GitHub
commit 06075e939b

View File

@ -25,11 +25,25 @@ lang, _ = GetLanguageByContent("foo.m", "<matlab-code>")
fmt.Println(lang) fmt.Println(lang)
// result: Matlab // result: Matlab
lang, _ = GetLanguageByContent("bar.m", "<pbjective-c-code>") lang, _ = GetLanguageByContent("bar.m", "<objective-c-code>")
fmt.Println(lang) fmt.Println(lang)
// result: Objective-C // result: Objective-C
// all strategies together
lang := enry.GetLanguage("foo.cpp", "<cpp-code>")
``` ```
Developmemt
-----------
*enry* re-uses parts of original [linguist](https://github.com/github/linguist) especially data in `languages.yml` to generate internal data structures. In oreder to update to latest upstream run
make clean code-generate
To run the tests
make test
Why Enry? Why Enry?
--------- ---------
In the movie [My Fair Lady](https://en.wikipedia.org/wiki/My_Fair_Lady), [Professor Henry Higgins](http://www.imdb.com/character/ch0011719/?ref_=tt_cl_t2) is one of the main characters. Henry is a linguist and at the very beginning of the movie enjoys guessing the nationality of people based on their accent. In the movie [My Fair Lady](https://en.wikipedia.org/wiki/My_Fair_Lady), [Professor Henry Higgins](http://www.imdb.com/character/ch0011719/?ref_=tt_cl_t2) is one of the main characters. Henry is a linguist and at the very beginning of the movie enjoys guessing the nationality of people based on their accent.