sdaf
This commit is contained in:
parent
1288c0a215
commit
450a253213
24
scrap.nim
24
scrap.nim
@ -1,17 +1,25 @@
|
||||
type
|
||||
Entry* = object
|
||||
name*, tag*, description*, link*, category* : string
|
||||
import std/htmlparser
|
||||
import std/xmltree
|
||||
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)
|
||||
|
||||
|
||||
proc test() =
|
||||
var htmlnode : XmlNode
|
||||
var str_html : string
|
||||
var entry: Entry
|
||||
|
||||
|
||||
entry = Entry(name : "testname",description : "testdescription",link : "testlink",category : "testcategory")
|
||||
|
||||
|
||||
htmlnode = parseHtml(str_html)
|
||||
entry.getEntryFromHtml()
|
||||
|
||||
|
||||
|
||||
#echo "run test"
|
||||
|
||||
test()
|
||||
|
Loading…
Reference in New Issue
Block a user