Enhanced badge parsing

A new, more flexible method for parsing badges is now available for your clock.

The new badge parser can:
  • Exclude a specified number of characters from the right or left side of the badge.
  • Extract a specified number of characters from the right or left side of the badge.
  • Chain several badge parsing statements for more complex parsing scenarios.

This new parser does not require you to specify class names for this badge parser. This new badge parsing capability is disabled by default and the existing badge parsing functionality of the SimpleBadgeParser and RightBadgeParser is still supported. We recommend that new installations use this new badge parsing functionality.

These are the relevant settings for the badge parser in settings.conf which are disabled by default:


#!badge.parser.{order}.exclude.right={value}
#!badge.parser.{order}.exclude.left={value}
#!badge.parser.{order}.extract.right={value}
#!badge.parser.{order}.extract.left={value}

Note this information for the above settings:

  • {order} is used to chain parsing statements. Replace {order} with a positive integer from 1 to 20. The parsing statements must be chronological starting from 1.
  • {value} is used to specify the number of characters to exclude or extract. Replace {value} with a positive integer value must be specified.

Example badge parsing scenarios

Each of the examples displays the initial badge input followed by the output after each parsing command.

Note this information for these examples:

  • The index value for parsing begins at 1 for this badge parser. This is illustrated in the examples.
  • When chaining parsing statements, the output of each parsing statement is passed as input to the next parsing statement in the chain.

Example 1

Badge parsing input: 000000007393232000

badge.parser.1.exclude.right=7 -> Badge parsing output: 00000000739

badge.parser.2.exclude.left=8 -> Badge parsing output: 739

Example 2

Badge parsing input: 000000007393232000

badge.parser.1.extract.left=11 -> Badge parsing output: 00000000739

badge.parser.2.extract.right=3 -> Badge parsing output: 739

Example 3

Badge parsing input: 000000007393232000

badge.parser.1.extract.right=6 -> Badge parsing output: 232000