This commit is contained in:
ccppi 2024-06-27 13:55:39 +02:00
parent 1288c0a215
commit 450a253213

View File

@ -1,17 +1,25 @@
type import std/htmlparser
Entry* = object import std/xmltree
name*, tag*, description*, link*, category* : string import std/strtabs
proc getEntryFromHtml(entry : Entry) = type
Entry = object
name, tag, description, link, category : string
proc getEntryFromHtml(entry : Entry, node : XmlNode) =
echo(entry.description) echo(entry.description)
proc test() = proc test() =
var htmlnode : XmlNode
var str_html : string
var entry: Entry var entry: Entry
entry = Entry(name : "testname",description : "testdescription",link : "testlink",category : "testcategory") entry = Entry(name : "testname",description : "testdescription",link : "testlink",category : "testcategory")
htmlnode = parseHtml(str_html)
entry.getEntryFromHtml() entry.getEntryFromHtml()
#echo "run test"
test() test()