List of commits:
Subject Hash Author Date (UTC)
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
read feeds from feeds.json U¾ivatel asi bude chtit mít své fidy u sebe de14a1e9f5a99f79e44985073df04e89bae2c116 Alex 2022-07-11 01:26:52
prepare default feeds d2b45f0007c30da84662b8b2a1f2118d03e30e1f Alex 2022-07-11 01:25:58
prepare Lock&Unlock f76041ef4fa2b6d5301afb34bda5de13f8ff2701 Alex 2022-07-10 00:37:38
prepare downloading routines f12d337da75c3cefe4ef0ccb3f08472e7701b058 Alex 2022-07-09 23:52:36
move default feeds to feeds.hws 6efc0f7c1767a2feba618938c8f83eab43f93b0e Alex 2022-07-09 14:16:44
Commit d741423d070a4d51b76d270fac70e0b0c3d04035 - fixes in lurk code
Author: Alex
Author date (UTC): 2022-07-14 15:29
Committer name: Alex
Committer date (UTC): 2022-07-14 15:29
Parent(s): 9ec9232bf28d0d83461e89fa89e8105983d5e3ba
Signer:
Signing key:
Signing status: N
Tree: 0e50cadfa07904a9fab10990bb92be3ccf88420e
File Lines added Lines deleted
lurk.hws 48 16
File lurk.hws changed (mode: 100755) (index 62e1a58..cecf786)
... ... EndFunction
30 30
31 31 ;č stáhnout soubor ;č stáhnout soubor
32 32 Function lurk:Explore(url$) Function lurk:Explore(url$)
33 self:Clear()
33 34 url$ = StripStr(url$) url$ = StripStr(url$)
34 35 self.PleaseStop = False self.PleaseStop = False
35 36 ;č zjednodušená kontrola, pokud řetězec obsahuje procenta, ;č zjednodušená kontrola, pokud řetězec obsahuje procenta,
 
... ... Function lurk:Explore(url$)
37 38 ;č Na případ, kdy uživatel strčí do URLu osamělý znak procenta vysereme ;č Na případ, kdy uživatel strčí do URLu osamělý znak procenta vysereme
38 39 ;FindStr(s$, "%") <> -1 ;FindStr(s$, "%") <> -1
39 40 Local err_code, html$, count = ?DownloadFile(url$, Local err_code, html$, count = ?DownloadFile(url$,
40 {Adapter="hurl", Fail404=True, Encoded=FindStr(url$, "%") <> -1},
41 {Adapter="hurl", Fail404=True, Encoded=FindStr(url$, "%", True) <> -1},
41 42 lurk_callback, url$) lurk_callback, url$)
42 43 If self.PleaseStop If self.PleaseStop
43 44 self:set_status("interrupted") self:set_status("interrupted")
 
... ... Function lurk:Explore(url$)
47 48 ;č 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.
48 49 ;č O to je to jednodušší. ;č O to je to jednodušší.
49 50 If err_code = #ERR_NONE If err_code = #ERR_NONE
50 self:set_status(count .. " bytes from " .. url$ .. " transmitted")
51 self:Clear()
52 51
53 52
54 Local p = XMLParser.New({StartElement = lurkStartElement})
55 p:setbase(url$)
56 ;č ten parser trefí šlak, uvidí-li CO má zpracovat
57 p:Parse(UnrightStr(html$, FindStr(html$, "<link", False)))
53 Local headpos = FindStr(html$, "<head", False)
54 If headpos < 0
55 self:set_status("\27bNothing found") ;č hlavně ta hlavička..
56 Return()
57 Else
58 self:set_status(count .. " bytes from " .. url$ .. " transmitted")
58 59
59 ;č html-ko nemůže nezpůsobit chybu.
60 ;č nemá cenu je hlídat
61 Local err_code = ?p:Close()
62 ;Local err_code, status, msg, line, col, pos = ?p:Close()
63 ;self:Replay(err_code, "Done.")
60 Local p = XMLParser.New({StartElement = lurkStartElement})
61 p:setbase(url$)
62 ;č ten parser trefí šlak, uvidí-li CO má zpracovat
63 p:Parse(UnrightStr(html$, headpos))
64
65 ;č html-ko nemůže nezpůsobit chybu.
66 ;č nemá cenu je hlídat
67 Local err_code = ?p:Close()
68 ;Local err_code, status, msg, line, col, pos = ?p:Close()
69 ;self:Replay(err_code, "Done.")
70 EndIf
64 71 Else Else
65 72 self:set_status("\27b" .. GetErrorName(err_code)) self:set_status("\27b" .. GetErrorName(err_code))
66 73 EndIf EndIf
 
... ... Function p_reconstructURL(base$, href$)
87 94 If StartsWith(href$, "/") If StartsWith(href$, "/")
88 95 ;č uživatel může zadat normální adresu na http://, ;č uživatel může zadat normální adresu na http://,
89 96 ;č nebo bůhvíco, co může začínat jménem serveru... ;č nebo bůhvíco, co může začínat jménem serveru...
90 Local hostpos = FindStr(base$, "//") + 2
91 Local hostend = FindStr(base$, "/", False, hostpos)
97 Local hostpos = FindStr(base$, "//", True) + 2
98 Local hostend = FindStr(base$, "/", True, hostpos)
92 99 If hostend = -1 If hostend = -1
93 100 ;č bez lomítka na konci. ;č bez lomítka na konci.
94 101 Return(base$ .. href$) Return(base$ .. href$)
 
... ... Function p_reconstructURL(base$, href$)
100 107
101 108 ;č bez lomítka, pokud vůbec něčemu rozumím, vztahuje k aktuální složce? ;č bez lomítka, pokud vůbec něčemu rozumím, vztahuje k aktuální složce?
102 109 ;č Jenomže ani čert se nevyzná, co je to složka v moderním webu ;č Jenomže ani čert se nevyzná, co je to složka v moderním webu
103 ;č (víz. poznámku ohledně přesměrování)
104 Return(TrimStr(base$, "/", True) .. "/" .. href$)
110 ;č (víz. poznámku ohledně přesměrování)
111 Local parampos = FindStr(base$, "?", True)
112 If parampos > 0
113 ;č pokud ovšem adresa obsahuje otazník, nebo ampersand
114 ;č tak část za nim můžeme zajistě vyhodit
115 Local drawerpos = ReverseFindStr(base$, "/", True, parampos)
116 Return(LeftStr(base$, drawerpos + 1) .. href$)
117 EndIf
105 118
119 ;č Je to jedno. Nechť to uživatel řeší sám!
120 Return(TrimStr(base$, "/", True) .. "/" .. href$)
106 121 EndFunction EndFunction
107 122
123 Function _test_reconstruction()
124 Local testcases = {}
125 testcases["aninet.no"] = "feed"
126 testcases["gemini://aninet.no"] = "feed"
127 testcases["gemini://aninet.no/"] = "feed"
128 testcases["gemini://aninet.no/dfg/"] = "feed"
129 testcases["gemini://aninet.no/dfg/tgb"] = "feed"
130 testcases["gemini://aninet.no/dfg/tgb?"] = "feed"
131 testcases["gemini://aninet.no/dfg/tgb?atari=0&amiga=1"] = "feed"
132 testcases["gemini://aninet.no/dfg/?atari=0&amiga=1"] = "feed"
133 testcases["aninet.no/%34%20/?atari=0&amiga=1"] = "feed"
134 For i,v In Pairs(testcases)
135 DebugPrint(i, v, p_reconstructURL(i, v))
136 Next
137 EndFunction
138
139
108 140
109 141 Function lurkStartElement(p, name$, attrs) Function lurkStartElement(p, name$, attrs)
110 142 CheckEvents() CheckEvents()
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