From 9525e7b97ffe973bea043ec52793721c4a601dee Mon Sep 17 00:00:00 2001 From: Oliver Jakoubek Date: Thu, 28 May 2020 21:23:15 +0200 Subject: [PATCH] Added usage to readme --- README.md | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index c379bb9..09a683f 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,31 @@ # feragstring -*feragstring* is a Go package for creating a Ferag string file from a JSON data structure. If you don't know what Ferag (the company) or a Ferag string is you probably don't need this package. +*feragstring* is a Go package for creating a Ferag string file from a JSON data structure. If you don't know what Ferag (the company) or a Ferag string is you probably don't need this package ;-) + +## Usage + +```go +fs := NewFeragString() +fs.SetTitleName("EDITION1") + +fs.TitleInfo.SetPrintObjectName("EDITION1A") +fs.TitleInfo.SetPublicationDate("2020-05-31") +fs.TitleInfo.SetCountryCode("13") +fs.TitleInfo.SetPrintObjectColor("00000000") + +pr1 := NewProductReference() +pr1.SetProductName("MAIN") +pr1.SetCopiesAssigned(25000) +pr1.SetSupervision(1) +pr1.SetOverlap(5) +mp := MissingParameter{ + missingRate: 1, + missingSize: 1, +} +pr1.SetMissingParameter(mp) +pr1.SetIssueReference("MAIN01") +fs.AddProductReference(pr1) +``` ## Supported messages