SVG Templates for the Sheets

It is possible to create your own layouts for the bracket sheets. Scalable Vector Graphics (SVG) is a family of specifications of an XML-based file format for two-dimensional vector graphics. SVG text file content is easy to read. An example text field could look like this:

<text x=”200” y=”330”
     style=”font-size:12px;font-style:normal;font-family:Sans”>
Hello, world!
</text>

You do not need to worry about the internals of the SVG format. Just create a sheet template like any PowerPoint presentation although the software must be SVG capable. Inkscape is an easy to use and free program. Adobe Illustrator misses some features but is usable.

File Names

You may use default sheet layouts and your own SVG layouts mixed:

JudoShiai uses your file for the layout if it exists, otherwise it uses the internal default layout.

SVG files must have certain names that contain three numbers. Name format:

<competition system>-<competitor count>-<page number>.svg

The first number is a code for the competition system, the second is the number of players and the third is the page number. For the pools the number of players is the exact number, but for the knock out systems the number is the maximum number of competitors for the sheet (8, 16, 32, 64, 128). You can have as many pages for one category as you wish (each page is its own file).

Competition systems are listed in the following table:

Code

Description

1

Single pool

2

Double pool

3

Double repechage

4

Swedish dubbelt återkval (SWE Double Repechage)

5

Swedish direkt återkval (SWE Double Elimination)

6

Estonian double elimination for D class

7

Double elimination without repechage

8

Swedish enkelt återkval (SWE Single Repechage)

9

Quad Pool

10

Spanish doble perdida (ESP Double Lost)

11

IJF double repechage

12

Spanish repesca simple (ESP Simple Repechage)

13

Modified double elimination

14

Double repechage, one bronze

15

Double pool 2 (third pool for final matches)

16

Double lost

17

British knock out

18

Double pool 3 (pool winners fight for the gold, second best for the bronze)

 

File name examples are listed in the following table:

File Name

Description

1-1-1.svg

Single pool, 1 competitor, 1 page.

1-2-1.svg

Single pool, 2 competitors, 1 page.

1-n-1.svg

Single pool, n competitors, 1 page.

2-7-1.svg

Double pool, 7 competitors, 1 page.

3-16-1.svg

Double repechage for 16 players, 1 page.

3-64-1.svg
3-64-2.svg
3-64-3.svg

Double repechage for 64 players, 3 pages.

 

Tags

You can draw and write any texts on the sheets, but when you want to have for example a competitors name you write a tag. Tags are text strings starting with the letter %. Example: you want to write the last and first names of the competitor #3:

%c3-last-s-first

Result is “Smith John”. Add club and country:

%c3-last','first-s-club'/'country

or

%c3-last|,|first-s-club|/|country

Result will be “Smith, John Ippon Judo/GBR”.  It may be better to use bars (|) instead of quotation marks (') since some editors may change quotes to something else.

Tags have attributes. Many times they are composed of a string or a letter followed by a number. You can write them attached to each other: %m23p1 (match 23, player 1). If letters or numbers are missing you have to use a dash to separate the attributes: %c7first-s-last.  You can use dash any time for clarity.

The following table describes the available tags.

Competitor related tags

 

%c<number><letter>

Tags start with %c and the number of the competitor.

%c7

%c<number>w

Number of wins in the pool systems.

%c7w

%c<number>p

Number of points in the pool systems.

%c7p

%c<number>r

Result (place) in the pool systems.

%c7r

%C<number><letter>

In a three pool system a capital C denotes the final pool while a lower case c denotes the first pools. Otherwise the tags are the same.

%c<number><name attributes>
Name attributes are
first
last
grd
club
country
weight
s
hm
<optional number>
'<any text>'
|
<any text>|

Name attributes describe information about the competitor. There are attributes for the first and last names, grade, club, country, and weight. Letter s writes a single space. Special attribute hm describes what to do if the competitor has a hansoku-make. Optional argument affects to the behavior:

hm1: Start strikethrough.

hm2: Don't write anything.

hm: Back to normal.

You can have any text between quotation marks. Example:

%c7-first-s-last' Country: 'country

would write

John Smith Country: GBR

Match related tags

 

%m<number>

Tags start with %m and the number of the match.

%m23

%m<number>-<number><name attributes>

The second number denotes the competitor whose name is to be printed.
1 = the first player (nowadays white)
2 = the second player (blue)
Name attributes are the same as with the %c.

%m23-1-first-s-last

%m<number>p<number>

 

Points of the player 1 or 2.

%m23p1

%m<number>p<number>-1

 

Print points of the player 1 or 2 if the match has been fought.

%m23p1-1

%m<number>p<number>==<value>'<text>'

 

Print <text> if competitor's points are <value> otherwise print points

%m23p1==0'LOST'

(print LOST if white's points in match #23 are 0)

%m<number>p<number>==<value>'<text>'-1

 

Print <text> if competitor's points are <value> otherwise print nothing

%m23p1==0'LOST'-1

%m<number>p<number>-1==<value>'<text>'

 

Print <text> if competitor's points are <value> otherwise print points but only if the match has been fought

%m23p1-1==0'LOST'

%m<number>t

Match time

%m<number>winner<name attributes>

Write name of the winner of the match.

%m23winner-last

%m<number>s<number>

Same as %m<number>p<number> except IWY/S score is printed. Also other forms apply.

Result related tags

 

%r<number><name attributes>

Write the name of the competitor who's place is <number>

%r1-first-s-last-s-club

Tournament information related tags

 

%i-competition

Tournament's name

%i-date

Date

%i-place

Place

%i-catname

Name of the category

%i-tatami

Number of category's contest area

Multilingual texts related tags

 

%t<number>

Numbers for the phrases are:

0: Competitors
1: Competitors A
2: Competitors B
3: Competitors C
4: Competitors D
5: # (number)
6: Name
7: Grade
8: Club
9: Matches
10: Matches A
11: Matches B
12: Matches C
13: Matches D
14: Match
15: Blue
16: White
17: Result
18: Results
19: Time
20: Wins (short word for wins)
21: Pts (short word for points)
22: Pos (short word for position)
23: Previous winner
24: Next
25: Weight:
26: PRELIMINARY SCHEDULE
27: weighin-notes.pdf (a file name)
28: schedule.pdf (a file name)
29: categories.pdf (a file name)
30: Category
31: Next fights
32: Categories
33: Statistics
34: Medals
35: Total
36: Country

Print a text using the selected language.

 

Score Legends

JudoTimer can send information about how the fight was won, i.e. ippon as a result of a throw, choke etc. These legends can be shown on the bracket sheets. Two methods exist. Common to both is that the text tags are not used any more. It is important to set correct IDs (names) for the graphical elements. For example SVG code for a rectangle looks like this:

<rect id=”my-id” x=”100” y=”200” …/>

IDs are used to distinguish between legends and their placements.

Legends in a File

Create a file legends.svg in the same directory where the sheet files are. Create all the legends you want and a “no legend” picture (white rectangle). Size of the legends doesn't matter. Set their IDs. The following table lists British legends:

Number

Legend

ID

0

Legend not known or no legend

legend0

1

Ippon as a result of a throw

legend1

2

Ippon as a result of a hold

legend2

3

Ippon as a result of a choke

legend3

4

Ippon as a result of an armlock

legend4

5

Win by Sogo-Gachi

legend5

6

Win by direct Hansoku-Make

legend6

7

Win by Kiken-Gachi

legend7

8

Win by Waza-Ari Throw

legend8

9

Win by Waza-Ari Hold

legend9

10

Win by Superiority (Yuko/Hantei)

legend10

11

Win by penalty against (against opponent)

legend11

12

Win by Fusen-Gachi

legend12

 

Example: Legend #1 is a letter T surrounded by a circle. It is important to group those and set the ID of the grouping element. SVG code should look like this:

<g id=”legend1” ...>
   <circle id=”circle345” x= .../>
   <text id=”text123” x= ...>T</text>
</g>

In your bracket sheet you mark places for the legends using a rectangle. Rectangles may be visible or invisible according to your preferences. Size of the rectangle determines the size of the legend. ID format for the rectangles is letter 'm' followed by a match number followed by letter 'l':
m<match number>l
Legend is always shown. If you want to show the legend only when the first player (white) has won use ID = m<match number>l-1 and when the second player (blue) has won use ID = m<match number>l-2.

For example m1l is the ID for the first match, m2l for the second match etc. Show legend for the match #23:
<rect id=”m23l” x=”100” .../>

Show a legend for match #23 if the second player has won:
<rect id=”m23l-2” x=”100” .../>

Embedded Legend Definitions

Legend definitions can be embedded in the SVG file. Idea is to use references to the definitions. You need proper software to do this, like free Inkscape (Adobe Illustrator wouldn't do).

Create all the legends on top of each other. Draw them in a convenient place where they are not visible or cover them with a white square. Legends must have IDs lgnd0, lgnd1, etc. Finally create a dummy legend whose ID is lgnd (this can be the white rectangle that covers the other legends).

Clone the dummy legend to the places where you want the real legends to appear. Cloning is not copying: it creates a reference to the real object. In SVG file it looks like this:

<use
   id="use3967"
   xlink:href="#lgnd"
   y="0"
   ...

Reference will be replaced by a reference to the real legend. Before that the software must know the match number in question. It can be made known by grouping the cloned object and giving the group an ID match<number>. Example:

<g id="match3" ...
   <use xlink:href="#lgnd" ...

Legend for the match #3 will be drawn no matter who won the fight. If you want to draw a legend only when the first player (white) has won use ID = match3-1 and for the second player (blue) ID = match3-2.