List of commits:
Subject Hash Author Date (UTC)
lurk: track parsed position, show meaningful status to user 80ce4ada68e657b196b4e173747a873a54f33c36 Alex 2022-07-16 13:34:54
small fix, polo¾ky pøebarvíme v¾dycky 6b408d667cb85f06e21767c6bbd77c2bfd9a2ac7 Alex 2022-07-16 04:05:04
tree part is ready 67d1bde2bcee775f23f8fc03cc474fd6b06c390b Alex 2022-07-16 03:28:08
finish feeds tree deea8b12636ba4a19ee256629a9a2a9874baf9c1 Alex 2022-07-15 17:10:11
Explore window is ready... 959e6dbf4fc77e315ac12847a481e25f50785ed4 Alex 2022-07-14 22:13:38
fixes in lurk code d741423d070a4d51b76d270fac70e0b0c3d04035 Alex 2022-07-14 15:29:42
Clear explored list by inbuild function 9ec9232bf28d0d83461e89fa89e8105983d5e3ba Alex 2022-07-14 14:09:54
implement URL constructing (complement URLs) f4798ed246e9c6d4b1a611b48ed5a7eb28c8938d Alex 2022-07-14 01:16:31
parser part of Explore is ready 87b01db3296eab71b2a510c4d0924127efac1a7f Alex 2022-07-13 22:36:39
prepare code for Explore 76b6472a8ad28564a55c6bd39f55ba050dd3599f Alex 2022-07-13 19:05:02
advance Explore window by statusbar and Stop button 8f7ae012ede287fc6e20fd5727fd215293c75b25 Alex 2022-07-13 17:24:24
prepare Explore window 9da7bcfcc06c986dd4ece8813096a9086ad690fc Alex 2022-07-13 01:59:32
comment out Edit option: není na to podpora v MUI Royale. Posunout polo¾ky menu, aby kursor nedopadal poøad na Remove 46c2f3cbbc2912eefb9504c7632f65ed57bc47e5 Alex 2022-07-12 23:14:48
fix code formatting for remove requesters 535d4b6515a4744e0b6af6090daadbb85f38b8cf Alex 2022-07-12 23:04:43
implement adding of single feed e938d0a6d769c7caf876dfdba9f43ce668eb4690 Alex 2022-07-12 22:05:10
implement group adding d347e25e93e94f711c4098fecc9775af22eb7309 Alex 2022-07-12 20:12:00
make parser to work somehow bb968a00680246434eb1f9795ebde4babea3fb05 Alex 2022-07-12 05:19:43
some preparations for parsing 0259ef32db69fdb45bc9e67d88c74aca4ae69ce6 Alex 2022-07-12 03:59:45
prepare png icon b7dc494acb640d92c5b7b49bc2ee93fd5a0d521c Alex 2022-07-11 07:17:47
fetching is ready 0d01c38238a2ea7e39bc671de1997294231d8549 Alex 2022-07-11 06:37:06
Commit 80ce4ada68e657b196b4e173747a873a54f33c36 - lurk: track parsed position, show meaningful status to user
Author: Alex
Author date (UTC): 2022-07-16 13:34
Committer name: Alex
Committer date (UTC): 2022-07-16 13:34
Parent(s): 6b408d667cb85f06e21767c6bbd77c2bfd9a2ac7
Signer:
Signing key:
Signing status: N
Tree: bdd6f586bd66c23dcf17055d1f07e5051ec9bdd6
File Lines added Lines deleted
lurk.hws 41 28
File lurk.hws changed (mode: 100755) (index c90b6de..f39265c)
... ... Function lurk:Explore(url$)
40 40 Local err_code, html$, count = ?DownloadFile(url$, Local err_code, html$, count = ?DownloadFile(url$,
41 41 {Adapter="hurl", Fail404=True, Encoded=FindStr(url$, "%", True) <> -1}, {Adapter="hurl", Fail404=True, Encoded=FindStr(url$, "%", True) <> -1},
42 42 lurk_callback, url$) lurk_callback, url$)
43
44 self:set_status(count .. " bytes from " .. url$ .. " transmitted")
45
43 46 If self.PleaseStop If self.PleaseStop
44 self:set_status("interrupted")
47 self:set_status("Interrupted")
45 48 Return() Return()
46 49 EndIf EndIf
47 50
48 51 ;č zde nepředpokládám, že by někdo jiný mohl spustit parser znovu. ;č zde nepředpokládám, že by někdo jiný mohl spustit parser znovu.
49 52 ;č O to je to jednodušší. ;č O to je to jednodušší.
50 If err_code = #ERR_NONE
51
52 Local ok, n = ValidateStr(html$)
53 Local encoding = IIf(ok, #ENCODING_UTF8, #ENCODING_ISO8859_1)
54 Local headpos = FindStr(html$, "<head", False, 0, encoding)
55 If headpos < 0
56 self:set_status("\27bNothing found") ;č hlavně ta hlavička..
57 Return()
58 Else
59 self:set_status(count .. " bytes from " .. url$ .. " transmitted")
60
61 Local p = XMLParser.New({StartElement = lurkStartElement})
62 p:setbase(url$)
63
64 p:setencoding(IIf(ok, "UTF-8", "ISO-8859-1"))
65 ;č ten parser trefí šlak, uvidí-li CO má zpracovat
66 p:Parse(UnrightStr(html$, headpos, encoding))
67
68 ;č html-ko nemůže nezpůsobit chybu.
69 ;č nemá cenu je hlídat
70 Local err_code = ?p:Close()
71 ;Local err_code, status, msg, line, col, pos = ?p:Close()
72 ;self:Replay(err_code, "Done.")
73 EndIf
74 Else
53 If err_code <> #ERR_NONE
75 54 self:set_status("\27b" .. GetErrorName(err_code)) self:set_status("\27b" .. GetErrorName(err_code))
55 Return()
56 EndIf
57
58 Local ok, n = ValidateStr(html$, #ENCODING_UTF8)
59 Local encoding = IIf(ok, #ENCODING_UTF8, #ENCODING_ISO8859_1)
60 Local headpos = FindStr(html$, "<head", False, 0, encoding)
61 If headpos < 0
62 self:set_status("Nothing found") ;č hlavně ta hlavička..
63 Return()
76 64 EndIf EndIf
65
66 Local headend = ReverseFindStr(html$, "</head>", False,
67 StrLen(html$, encoding)-1, encoding)
68 Local len = headend-headpos
69 If len < 0
70 self:set_status("Something wrong on page")
71 Return()
72 EndIf
73
74 html$ = MidStr(html$, headpos, len, encoding)
75 Local p = XMLParser.New({StartElement = lurkStartElement})
76 p:setbase(url$)
77 p:setencoding(IIf(ok, "UTF-8", "ISO-8859-1"))
78 ;č ten parser trefí šlak, až uvidí CO má zpracovat
79 p:Parse(html$)
80 Local lin, col, pos = p:pos()
81
82 ;č html-ko nemůže nezpůsobit chybu.
83 ;č nemá cenu je hlídat
84 Local err_code = ?p:Close()
85 If len > pos
86 self:set_status("("..pos .."/"..len .. ") It's too hard. Parser lost.")
87 Else
88 self:set_status("Parser done.")
89 EndIf
90
77 91 EndFunction EndFunction
78 92
79 93
 
... ... Function lurkStartElement(p, name$, attrs)
156 170 Switch LowerStr(attrs.type) Switch LowerStr(attrs.type)
157 171 Case "application/atom+xml": Case "application/atom+xml":
158 172 FallThrough FallThrough
159 Case "application/rss+xml":
173 Case "application/rss+xml":
160 174 Local item = {href="", title="", rel=""} Local item = {href="", title="", rel=""}
161 175 For i,v In Pairs(item) For i,v In Pairs(item)
162 176 If HaveItem(attrs, i) Then item[i] = attrs[i] If HaveItem(attrs, i) Then item[i] = attrs[i]
 
... ... Function lurkStartElement(p, name$, attrs)
180 194 EndSwitch EndSwitch
181 195 EndIf EndIf
182 196 EndSwitch EndSwitch
183
184 197 EndFunction EndFunction
185 198
186 199 Function lurk:CanHas(url$) Function lurk:CanHas(url$)
Hints:
Before first commit, do not forget to setup your git environment:
git config --global user.name "your_name_here"
git config --global user.email "your@email_here"

Clone this repository using HTTP(S):
git clone https://rocketgit.com/user/iam-git/IvoRSS

Clone this repository using ssh (do not forget to upload a key first):
git clone ssh://rocketgit@ssh.rocketgit.com/user/iam-git/IvoRSS

Clone this repository using git:
git clone git://git.rocketgit.com/user/iam-git/IvoRSS

You are allowed to anonymously push to this repository.
This means that your pushed commits will automatically be transformed into a merge request:
... clone the repository ...
... make some changes and some commits ...
git push origin main