-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtemplate.nono
39 lines (39 loc) · 1.48 KB
/
template.nono
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# format :
# id ; author_id ; title ; author_name ; column_count ; rows_count ; color_count ; colors ; column_cells ; column_colors ; row_cells ; row_colors ;
#
# author_id, author_name can be null : no author was specified when scraped
# colors, column_colors, row_colors can be null : black and white cases (see below)
# null data are just empty between two separators (;;)
#
# example input data :
# id: 57596
# title: White Dog
# author_name: Vlan
# author_id: 81864
# column_count: 5
# rows_count: 3
# color_count: 1
# colors: ['000000']
# result_grid: [[0, 1, 1], [0, 0, 0], [1, 0, 1], [1, 0, 0], [0, 1, 1]] # actually skipped
# column_cells: [[2], [], [1, 1], [1], [2]]
# column_colors: [[0], [], [0, 0], [0], [0]]
# row_cells: [[2], [1, 1], [1, 1, 1]]
# row_colors: [[0], [0, 0], [0, 0, 0]]
#
# array format : i,i,i,i;i,i,i,i
# numerical elements separated by ,
# arrays separated by ;
# you know how much elements are in an array by *_count (column_count, rows_count, color_count)
#
# ex: column_count : 5
# for each column, the consecutive non empty cells separated by a comma (,)
# 2;;1,1;1;2
# then by the last element, the next one is not part of the array (after end of column_cells is first element of column_colors)
# size optimization : if we only have one color (meaning black cells), we do not need the 'color' and 'colors', so we skip them (we keep an empty element ';;')
#
# so at the end we have :
#
# 57596;81864;White Dog;Vlan;5;3;1;;2;;1,1;1;2;;2;1,1;1,1,1;;
#
# for each line, voilà :^)
#