sdaf
This commit is contained in:
parent
1288c0a215
commit
450a253213
24
scrap.nim
24
scrap.nim
@ -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()
|
||||||
|
Loading…
Reference in New Issue
Block a user