feragstring is a Go package for creating a FERAG string file ("TSL file") programmatically.
Go to file
Oliver Jakoubek 8b47e768b6 Changed module name in readme ("installation"). 2024-04-17 20:20:33 +02:00
.idea Added product reference numbers to production drops. Fixes #13 2023-03-24 08:55:06 +01:00
test Added scatter to product reference 2020-06-24 09:16:41 +02:00
LICENSE Added MIT license file 2020-05-29 14:44:14 +02:00
README.md Changed module name in readme ("installation"). 2024-04-17 20:20:33 +02:00
control_character.go Added comments to Control Character. Fixes #8 2020-07-06 20:48:13 +02:00
ferag.go Add products with a product reference number 2023-03-24 09:00:44 +01:00
ferag_message.go Added comments to FeragMessage and TitleEnd 2020-05-29 15:01:50 +02:00
go.mod Changed module name to code.jakoubek.net/jakoubek/feragstring 2024-04-17 20:11:28 +02:00
product_reference.go Show Issue Reference in Product Reference only if set 2023-03-24 17:04:48 +01:00
production_drop.go Added bundle parameters to production drop 2023-03-24 16:03:31 +01:00
route.go Add Edition name to route 2023-03-24 16:01:03 +01:00
route_end.go Added comments to Route List. Fixes #7 2020-07-06 20:43:58 +02:00
route_info.go Use func ProductReferenceNumbers 2020-06-28 21:04:00 +02:00
route_list.go Made receiver name consistent with previous receiver names 2020-07-09 11:37:47 +02:00
title_end.go Added comments to FeragMessage and TitleEnd 2020-05-29 15:01:50 +02:00
title_info.go Support Issue Reference in Title Info 2023-03-24 17:04:31 +01:00
title_info_test.go Tests for Title Info 2020-07-06 20:18:58 +02:00

README.md

feragstring

feragstring is a Go package for creating a FERAG string file programmatically. If you don't know what FERAG (the company) or a FERAG string is you probably don't need this package ;-)

The shortest possible FERAG string

According to FERAG's documentation this is the shortest possible FERAG string:

%2440+40DEMO2009!
%2401+11E1_ROUTE_100 !
%2402+11E1_ROUTE_100 +590+91000000+20E1                            !
%2403+12R100RE001 +1300123!
%2406+11E1_ROUTE_100 !
%2441+40DEMO2009!

The variable values are:

  • the title is 'DEMO2009'
  • a route named 'E1_ROUTE_100'
  • an edition called 'E1'
  • a production drop 'R100RE001' with 123 copies

Usage

// create a FERAG string object
fs := feragstring.NewFeragString()
fs.SetTitleName("EDITION1")

// set title parameters
fs.TitleInfo.SetPrintObjectName("EDITION1A")
fs.TitleInfo.SetPublicationDate("2020-05-31")
fs.TitleInfo.SetCountryCode("13")
fs.TitleInfo.SetPrintObjectColor("00000000")

// add a product
pr1 := feragstring.NewProductReference()
pr1.SetProductName("MAIN")
pr1.SetCopiesAssigned(25000)
pr1.SetSupervision(1)
pr1.SetOverlap(5)
mp := feragstring.NewMissingParameter(1, 1)
pr1.SetMissingParameter(mp)
pr1.SetIssueReference("MAIN01")
fs.AddProductReference(pr1)

// add a route
rt := feragstring.NewRoute()
rt.SetRouteName("ROUTE001")
rt.SetRouteCode(fs.NextRouteCode())
rt.SetRampNumber(0)
rt.SetCopiesInRoute(1500)
rt.SetLimit(1)
rt.SetMaxStack(13)
rt.SetStandard(40)
rt.SetParameterN(4)
rt.SetMaxBundle(40)
rt.SetTopsheetMarker(5)
rt.SetEaMarker(0)
rt.SetTopsheetTemplateDirectory(20)
rt.AddProductReferenceNumber(1)
fs.AddRoute(rt)

// get the FERAG string (the write it to a file...) 
feragString := fs.PrintOut()

Supported messages

  • Title Info (%2440)
  • Title End (%2441)
  • Product Reference (%2450)
  • Route List Entry (%2401)
  • Route Info (%2402)
  • Production Drop (%2403)
  • Topsheet Data for TSL (%2414)
  • Route End (%2406)

Installation

go get -u code.jakoubek.net/jakoubek/feragstring

Need commercial support?

I offer commercial support for newspaper companies who want to setup their own FERAG string generation.

See https://www.jakoubek.net/ferag-string-erzeugen (German) or write an email to info@jakoubek.net.