From 89d7cbd955d548f843adbc20f53e9231dfff0fae Mon Sep 17 00:00:00 2001 From: Bryan Nehl Date: Sat, 10 Jun 2023 15:26:59 -0400 Subject: [PATCH] revised developer notes, added Table of Contents (#93) * revised developer notes, add ToC * add goreleaser doc --- notes/README.md | 6 ++++++ notes/buildNotes.md | 12 +++++++++++- notes/enableGo.md | 29 +++++++++++++++++++---------- notes/protocol.md | 21 +++++++++++---------- 4 files changed, 47 insertions(+), 21 deletions(-) create mode 100644 notes/README.md diff --git a/notes/README.md b/notes/README.md new file mode 100644 index 0000000..4745466 --- /dev/null +++ b/notes/README.md @@ -0,0 +1,6 @@ +# Developer Notes + +* [Set up tooling on your mac](enableGo.md) +* [Build the project](buildNotes.md) +* [FLE file protocol notes](protocol.md) +* [FLE documentation](Fast%20Log%20Entry%20(FLE).pdf) diff --git a/notes/buildNotes.md b/notes/buildNotes.md index fd0c6fc..ceae1aa 100644 --- a/notes/buildNotes.md +++ b/notes/buildNotes.md @@ -1,3 +1,13 @@ +# Build Notes + +## Bootstrap + +Install [Cobra CLI tool](https://github.com/spf13/cobra) `go install github.com/spf13/cobra-cli@latest` + +[Install](https://goreleaser.com/install/) [goreleaser](https://goreleaser.com/) + +* `go build && go install` + ## to build with goreleaser * `goreleaser --snapshot --skip-publish --rm-dist` @@ -7,4 +17,4 @@ ## to push a release * on the master branch `git tag v0.1.1` -* `git push --tag` \ No newline at end of file +* `git push --tag` diff --git a/notes/enableGo.md b/notes/enableGo.md index b96f233..582f3d7 100644 --- a/notes/enableGo.md +++ b/notes/enableGo.md @@ -2,7 +2,7 @@ Notes to enable/configure GO on my Mac -``` +```sh # GOlang related export GOPATH="${HOME}/.go" export GOROOT="$(brew --prefix golang)/libexec" @@ -11,35 +11,44 @@ test -d "${GOPATH}" || mkdir "${GOPATH}" test -d "${GOPATH}/src/github.com" || mkdir -p "${GOPATH}/src/github.com" ``` -* Use Brew to instal Go +* Use Brew to install Go * Load the various tools in in VisualCode * `go mod init example.com/user/hello` -* Structuring a go project: https://github.com/golang-standards/project-layout +* Structuring a go project: + +## Cobra + +Cobra documentation: -## Enable cobra +* [main README](https://github.com/spf13/cobra/blob/main/README.md) +* [Cobra User Guide](https://github.com/spf13/cobra/blob/main/user_guide.md) +* [Cobra CLI](https://github.com/spf13/cobra-cli/blob/main/README.md) -Cobra documentation available at https://github.com/spf13/cobra/blob/master/cobra/README.md +Setting up project to use Cobra: * `go get -u github.com/spf13/cobra/cobra` * `go mod init FLEcli` * `cobra init --pkg-name FLEcli -l MIT` * `cobra add load` adds a load command -## Reading and processing file +## Reading and processing file * [Go by Example: Reading Files](https://gobyexample.com/reading-files) -* https://stackoverflow.com/questions/8757389/reading-a-file-line-by-line-in-go -* https://www.golangprograms.com/golang-read-file-line-by-line-to-string.html +* +* ## Regex -* useful site: https://regex101.com + +* useful site: * [Regex to verify Hamradio callsign and retrieve prefix](https://regex101.com/library/6QhGuD) * [Hamradio callsign](https://regex101.com/library/uP6xD2) * [Verify amateur radio call sign meets ITU format](https://regex101.com/library/gS6qG8) ## Parsing 2 + * [Effective text parsing in golang](https://medium.com/@TobiasSchmidt89/effective-text-parsing-in-golang-163d13784288) ## Amateur related Golang libray -* https://github.com/tzneal/ham-go \ No newline at end of file + +* diff --git a/notes/protocol.md b/notes/protocol.md index 1c97fe3..eff65a9 100644 --- a/notes/protocol.md +++ b/notes/protocol.md @@ -2,18 +2,19 @@ ## General -* line comment: "#" => "`^#`s" +* line comment: "#" => "`^#`s" * Multi line comment: enclosed in "{}" ## Header -* **mycall** The mycall keyword is your station call sign and it is mandatory. This is the logging station's call sign (the call sign used over the air). Saving ADIF files without your own call is prevented. -* **operator** The call sign of the operator can optionally be added to the ADIF file, it is not mandatory. Use the operator keyword and add the call sign of the operator. It can be different from the station call sign but it may not be the name of the operator! The operator keyword can be repeated further down the log with other operator call signs if they change. -* **qslmsg** QSL Messages valid for the entire log can be entered in the header section of the log. It is not mandatory. -* **mywwff** The mywwff keyword is used to register your own WWFF reference number in WWFF Logging. See also chapter WWFF logging. The syntax is: AAFF-CCCC: AA = national prefix, CCCC = 4-digit numeric code (e.g. ONFF-0001). -* **mysota** The mysota keyword is used to register your own SOTA reference number in SOTA Logging. The syntax is: AA/NN-CCC: Association/Name-3-digit numeric Code (e.g. G/CE-001). Your own SOTA reference number is mandatory for SOTA Logging. -* **nickname** The nickname keyword can be used for eQSL ADIF uploads. See chapter Uploading logs to eQSL.cc. -* **date** The date format is year-month-day (YYYY-MM-DD), e.g. 2016-12-31. Year, month and day may be abbreviated and you may use separators other than dash. +* **mycall** The mycall keyword is your station call sign and it is mandatory. This is the logging station's call sign (the call sign used over the air). Saving ADIF files without your own call is prevented. +* **operator** The call sign of the operator can optionally be added to the ADIF file, it is not mandatory. Use the operator keyword and add the call sign of the operator. It can be different from the station call sign but it may not be the name of the operator! The operator keyword can be repeated further down the log with other operator call signs if they change. +* **qslmsg** QSL Messages valid for the entire log can be entered in the header section of the log. It is not mandatory. +* **mywwff** The mywwff keyword is used to register your own WWFF reference number in WWFF Logging. See also chapter WWFF logging. The syntax is: AAFF-CCCC: AA = national prefix, CCCC = 4-digit numeric code (e.g. ONFF-0001). +* **mysota** The mysota keyword is used to register your own SOTA reference number in SOTA Logging. The syntax is: AA/NN-CCC: Association/Name-3-digit numeric Code (e.g. G/CE-001). Your own SOTA reference number is mandatory for SOTA Logging. +* **nickname** The nickname keyword can be used for eQSL ADIF uploads. See chapter Uploading logs to eQSL.cc. +* **date** The date format is year-month-day (YYYY-MM-DD), e.g. 2016-12-31. Year, month and day may be abbreviated and you may use separators other than dash. -## validations -* call \ No newline at end of file +## Validations + +* call