adding dashbord section
This commit is contained in:
@@ -6,6 +6,7 @@
|
||||
# web_utils : procedure related web interface
|
||||
#
|
||||
# --==--==--==--==--==--==--==--==--==--==--==--==--==--==--==-- #
|
||||
import xlsx # read dashbord.xlsx
|
||||
import jester
|
||||
import joplin_utils
|
||||
|
||||
@@ -46,3 +47,36 @@ type ColomnRightData* = ref object of RootObj
|
||||
req*: Request
|
||||
|
||||
|
||||
# --==--==--==--==--==--==--==--==--==--==-- #
|
||||
# TYPE : Dashbord information
|
||||
# --==--==--==--==--==--==--==--==--==--==-- #
|
||||
type DashbordData* = ref object of RootObj
|
||||
position*: seq[int]
|
||||
ext_link*: seq[string]
|
||||
int_link*: seq[string]
|
||||
title*: seq[string]
|
||||
category*: seq[string]
|
||||
icon*: seq[string]
|
||||
open_method*: seq[string]
|
||||
tag*: seq[string]
|
||||
hotkey*: seq[string]
|
||||
color*: seq[string]
|
||||
req*: Request
|
||||
|
||||
|
||||
# --==--==--==--==--==--==--==--==--==--==--==--==--==--==-- #
|
||||
# PROC :
|
||||
# --==--==--==--==--==--==--==--==--==--==--==--==--==--==-- #
|
||||
proc getDashbordData(ddata: var DashbordData) =
|
||||
let
|
||||
data = parseExcel("data/dashbord.xlsx", header = true)
|
||||
sheetName = "dashbord"
|
||||
echo data[sheetName]
|
||||
|
||||
let rows = data[sheetName].toSeq(true)
|
||||
echo rows.len()
|
||||
# for i in 0 ..data[sheetName]:
|
||||
# ddata.position[i] = row[i]
|
||||
for row in rows:
|
||||
echo "position: " & row[0]
|
||||
echo "URL externe: " & row[1]
|
||||
|
||||
Reference in New Issue
Block a user