List of commits:
Subject Hash Author Date (UTC)
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
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
Commit 959e6dbf4fc77e315ac12847a481e25f50785ed4 - Explore window is ready...
Author: Alex
Author date (UTC): 2022-07-14 22:13
Committer name: Alex
Committer date (UTC): 2022-07-14 22:13
Parent(s): d741423d070a4d51b76d270fac70e0b0c3d04035
Signer:
Signing key:
Signing status: N
Tree: ab4973b5a31400aa3709f7b1d01644ebd86eb0d3
File Lines added Lines deleted
AppWindow.xml 2 2
IvoRSS.hws 13 22
feedtree.hws 29 30
lurk.hws 44 12
File AppWindow.xml changed (mode: 100755) (index ed01a49..12b52e3)
85 85 </button> </button>
86 86 <button id="stoplurkbtn" notify="pressed" weight="50" disabled="true">Stop</button> <button id="stoplurkbtn" notify="pressed" weight="50" disabled="true">Stop</button>
87 87 </hgroup> </hgroup>
88 <listview id="foundfeeds" notify="active" cyclechain="true">
89 <column title="CanHas"/>
88 <listview id="foundfeeds" notify="doubleclick" cyclechain="true" multiselect="default">
89 <column title="Status"/>
90 90 <column title="Address"/> <column title="Address"/>
91 91 <column title="Title"/> <column title="Title"/>
92 92 <column title="Relationship"/> <column title="Relationship"/>
File IvoRSS.hws changed (mode: 100755) (index 15f9feb..9ee3bec)
... ... Function p_MUIEvent(msg)
77 77 Case "CloseRequest": Case "CloseRequest":
78 78 Switch msg.ID Switch msg.ID
79 79 Case "win": Case "win":
80 p_SaveFeeds()
80 p_SaveSettings()
81 81 End End
82 82 Case "metawin": Case "metawin":
83 83 mui.Set("metawin", "open", False) mui.Set("metawin", "open", False)
 
... ... Function p_MUIEvent(msg)
93 93 Case "menu_about_muiroyale": Case "menu_about_muiroyale":
94 94 mui.DoMethod("app", "AboutMUIRoyale") mui.DoMethod("app", "AboutMUIRoyale")
95 95 Case "menu_quit": Case "menu_quit":
96 p_SaveFeeds()
96 p_SaveSettings()
97 97 End End
98 98 Case "menu_muisettings": Case "menu_muisettings":
99 99 mui.DoMethod("app", "OpenConfigWindow") mui.DoMethod("app", "OpenConfigWindow")
 
... ... Function p_MUIEvent(msg)
111 111 Case "menu_save": Case "menu_save":
112 112 FallThrough FallThrough
113 113 Case "fdtm_save": Case "fdtm_save":
114 p_SaveFeeds()
114 p_SaveSettings()
115 115
116 116 Case "menu_lurk": Case "menu_lurk":
117 117 FallThrough FallThrough
 
... ... Function p_MUIEvent(msg)
126 126 Case "menu_add": Case "menu_add":
127 127 FallThrough FallThrough
128 128 Case "fdtm_add": Case "fdtm_add":
129 p_AddFeed()
129 p_AddFeedRequest()
130 130
131 131 Case "menu_hide": Case "menu_hide":
132 132 FallThrough FallThrough
 
... ... Function p_MUIEvent(msg)
171 171 mui.Set("item_title", "Contents", chosen_item.title) mui.Set("item_title", "Contents", chosen_item.title)
172 172 mui.Set("textfield", "Text", chosen_item.description) mui.Set("textfield", "Text", chosen_item.description)
173 173 EndIf EndIf
174
174 Case "foundfeeds":
175 lurk:AddFromlist("Active")
175 176 EndSwitch EndSwitch
176 177
177 178
 
... ... Function p_MUIEvent(msg)
179 180 Switch msg.ID Switch msg.ID
180 181 Case "reqclosebtn": Case "reqclosebtn":
181 182 mui.Set("metawin", "open", False) mui.Set("metawin", "open", False)
183 Case "reqaddbtn":
184 lurk:AddSelected()
182 185
183 186 Case "lurkbtn": Case "lurkbtn":
184 187 mui.Set("metawin", "open", True) mui.Set("metawin", "open", True)
185 188 Case "addbtn": Case "addbtn":
186 p_AddFeed()
189 p_AddFeedRequest()
187 190 Case "fetchbtn": Case "fetchbtn":
188 191 p_FetchCurrent() p_FetchCurrent()
189 192 Case "fetchallbtn": Case "fetchallbtn":
 
... ... Function p_StartUpLoading()
299 302 EndFunction EndFunction
300 303
301 304
302 Function p_SaveFeeds()
303 Local err_code = ?StringToFile(SerializeTable(
304 p_DumpFeedTree("feedtree")), "feeds.json")
305 p_Replay(err_code, "Tree arrangement saved")
305 Function p_SaveSettings()
306 p_SaveFeeds()
306 307
307 err_code = ?SavePrefs(feedsdata)
308 Local err_code = ?SavePrefs(feedsdata)
308 309 p_Replay(err_code, "Settings saved") p_Replay(err_code, "Settings saved")
309 310 EndFunction EndFunction
310 311
311
312
313 Function p_HideFeeds()
314 mui.DoMethod("feedtree", "close", "root", "all")
315 EndFunction
316
317 Function p_ExpandFeeds()
318 mui.DoMethod("feedtree", "open", "root", "all")
319 EndFunction
320
321
322 312 Function p_Lock() Function p_Lock()
323 313 mui.Set("fetchbtn", "Disabled", True) mui.Set("fetchbtn", "Disabled", True)
324 314 mui.Set("fetchallbtn", "Disabled", True) mui.Set("fetchallbtn", "Disabled", True)
 
... ... InstallEventHandler({MUIRoyale = p_MUIEvent})
354 344
355 345 p_StartUpLoading() p_StartUpLoading()
356 346
347
357 348 Repeat Repeat
358 349 WaitEvent WaitEvent
359 350 Forever Forever
File feedtree.hws changed (mode: 100755) (index c969195..cfd48d2)
... ... Function p_FillListTree(listtree$, treetable)
17 17 EndFunction EndFunction
18 18
19 19
20 Function p_DumpFeedTree(listtree$)
20 Function p_DumpFeedTree()
21 21 cFeeds = CreateList() ;currentFeeds cFeeds = CreateList() ;currentFeeds
22 p_DumpListTree(listtree$, cFeeds, "Root", "Root")
22 p_DumpListTree(#LIST_TREE, cFeeds, "Root", "Root")
23 23 Return(cFeeds) Return(cFeeds)
24 24 EndFunction EndFunction
25 25
 
... ... Function p_RemoveCurrent()
120 120 feedsdata[t.id] = nil feedsdata[t.id] = nil
121 121 ;č Na soubory ve složce Feeds sereme? ;č Na soubory ve složce Feeds sereme?
122 122 EndIf EndIf
123 p_SaveFeeds()
123 124 EndFunction EndFunction
124 125
125 126
 
... ... Function p_CreateGroup()
136 137 "List; Active") "List; Active")
137 138 ;p_Replay(err_code, "Group ".."\27b"..s$ .. " has been created") ;p_Replay(err_code, "Group ".."\27b"..s$ .. " has been created")
138 139 EndIf EndIf
140 p_SaveFeeds()
139 141 EndFunction EndFunction
140 142
141 143
142
143 Function p_AddFeed()
144 Function p_AddFeedRequest()
144 145 Local type, data$ = GetClipboard() Local type, data$ = GetClipboard()
145 146 Local s$, ok = StringRequest("Add RSS feed", "Enter feed adress", Local s$, ok = StringRequest("Add RSS feed", "Enter feed adress",
146 147 IIf(type = #CLIPBOARD_TEXT And StartsWith(data$, "http"), IIf(type = #CLIPBOARD_TEXT And StartsWith(data$, "http"),
147 148 {Text=data$}, {})) {Text=data$}, {}))
148 If EmptyStr(s$) Then Return()
149 s$ = StripStr(s$)
150 ;č zjednodušená kontrola, pokud řetězec obsahuje procenta,
151 ;č považujeme ho za "eskejpnutý".
152 ;č Na případ, kdy uživatel strčí do URLu osamělý znak procenta vysereme
153 /* houby, takhle hurl eskejpne úplně všechno
154 If True ;FindStr(s$, "%") = -1
155 easy = hurl.Easy()
156 s$ = easy:Escape(s$)
157 easy:Close()
158 EndIf */
159 If p_HasItem(s$, "Root")
160 mui.Set("status", "Contents", s$ .. " \27balready exists")
149 p_AddFeed(s$)
150 p_SaveFeeds()
151 EndFunction
152
153
154 Function p_AddFeed(feedid$)
155 If EmptyStr(feedid$) Then Return()
156 feedid$ = StripStr(feedid$)
157 If p_HasItem(feedid$, "Root")
158 mui.Set("status", "Contents", feedid$ .. " \27balready exists")
161 159 Else Else
162 mui.DoMethod(#LIST_TREE, "Insert", "\27".."5"..s$, s$, "Root",
160 mui.DoMethod(#LIST_TREE, "Insert", "\27".."5"..feedid$, feedid$, "Root",
163 161 IIf(mui.Get(#LIST_TREE, "Active")="Off", "Tail","Active"), IIf(mui.Get(#LIST_TREE, "Active")="Off", "Tail","Active"),
164 162 "Active") "Active")
165 163 EndIf EndIf
 
... ... Function p_HasItem(nodeid$, muiid)
184 182 Return(False) Return(False)
185 183 EndFunction EndFunction
186 184
185 Function p_SaveFeeds()
186 Local err_code = ?StringToFile(SerializeTable(
187 p_DumpFeedTree()), "feeds.json")
188 p_Replay(err_code, "Feeds saved")
189 EndFunction
187 190
188 191
189 ;bool = IsOnline()
190 ;r$ = StripStr(s$)
191 192
192 ; hURL is required
193 ;e$ = easy:Escape(s$)
194 193
195 194
196 ;name, isNode, id, parent
197 /*
198 Function p_InsertNode(i, t, listtree$)
199 Local flags$ = IIf(t.isNode, "List", "")
200 DebugPrint(i, t.id)
201 mui.DoMethod(listtree$, "Insert", t.name, t.id, t.parent, "Tail", flags$)
202 EndFunction
203 */
195 Function p_HideFeeds()
196 mui.DoMethod("feedtree", "close", "root", "all")
197 EndFunction
198
199 Function p_ExpandFeeds()
200 mui.DoMethod("feedtree", "open", "root", "all")
201 EndFunction
202
File lurk.hws changed (mode: 100755) (index cecf786..c90b6de)
1 1
2
2 Const #LURK_LISTVIEW = "foundfeeds"
3 3
4 4 lurk = {PleaseStop=True} lurk = {PleaseStop=True}
5 5 ;č jako v celé té appce i zde se pevně zavážeme ;č jako v celé té appce i zde se pevně zavážeme
 
... ... Function lurk:Explore(url$)
49 49 ;č O to je to jednodušší. ;č O to je to jednodušší.
50 50 If err_code = #ERR_NONE If err_code = #ERR_NONE
51 51
52
53 Local headpos = FindStr(html$, "<head", False)
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)
54 55 If headpos < 0 If headpos < 0
55 56 self:set_status("\27bNothing found") ;č hlavně ta hlavička.. self:set_status("\27bNothing found") ;č hlavně ta hlavička..
56 57 Return() Return()
 
... ... Function lurk:Explore(url$)
59 60
60 61 Local p = XMLParser.New({StartElement = lurkStartElement}) Local p = XMLParser.New({StartElement = lurkStartElement})
61 62 p:setbase(url$) p:setbase(url$)
63
64 p:setencoding(IIf(ok, "UTF-8", "ISO-8859-1"))
62 65 ;č ten parser trefí šlak, uvidí-li CO má zpracovat ;č ten parser trefí šlak, uvidí-li CO má zpracovat
63 p:Parse(UnrightStr(html$, headpos))
66 p:Parse(UnrightStr(html$, headpos, encoding))
64 67
65 68 ;č html-ko nemůže nezpůsobit chybu. ;č html-ko nemůže nezpůsobit chybu.
66 69 ;č nemá cenu je hlídat ;č nemá cenu je hlídat
 
... ... EndFunction
77 80
78 81
79 82 Function lurk:Clear() Function lurk:Clear()
80 mui.DoMethod("foundfeeds", "Clear")
83 mui.DoMethod(#LURK_LISTVIEW, "Clear")
81 84 EndFunction EndFunction
82 85
83 86 ;č zoufalý pokus rekonstituce adresy ;č zoufalý pokus rekonstituce adresy
 
... ... Function p_reconstructURL(base$, href$)
116 119 Return(LeftStr(base$, drawerpos + 1) .. href$) Return(LeftStr(base$, drawerpos + 1) .. href$)
117 120 EndIf EndIf
118 121
119 ;č Je to jedno. Nechť to uživatel řeší sám!
122 ;č Je to jedno. Nechť si to uživatel řeší sám!
120 123 Return(TrimStr(base$, "/", True) .. "/" .. href$) Return(TrimStr(base$, "/", True) .. "/" .. href$)
121 124 EndFunction EndFunction
122 125
 
... ... Function lurkStartElement(p, name$, attrs)
155 158 FallThrough FallThrough
156 159 Case "application/rss+xml": Case "application/rss+xml":
157 160 Local item = {href="", title="", rel=""} Local item = {href="", title="", rel=""}
158 For i,v In Pairs(item)
159 If HaveItem(attrs, i) Then item[i] = attrs[i]
160 Next
161 For i,v In Pairs(item)
162 If HaveItem(attrs, i) Then item[i] = attrs[i]
163 Next
161 164 /* /*
162 165 <column title="CanHas"/> <column title="CanHas"/>
163 166 <column title="Address"/> <column title="Address"/>
164 167 <column title="Title"/> <column title="Title"/>
165 168 <column title="Relationship"/> <column title="Relationship"/>
166 169 <column title="Type"/> <column title="Type"/>
170 <column title="URL constructed"/>
167 171 */ */
168 mui.DoMethod("foundfeeds", "Insert", "Bottom",
169 "",
172 Local url$ = p_reconstructURL(p:getbase(), item.href)
173 mui.DoMethod(#LURK_LISTVIEW, "Insert", "Bottom",
174 lurk:CanHas(url$),
170 175 item.href, item.href,
171 176 item.title, item.title,
172 177 item.rel, item.rel,
173 178 attrs.type, attrs.type,
174 p_reconstructURL(p:getbase(), item.href))
179 url$)
175 180 EndSwitch EndSwitch
176 181 EndIf EndIf
177 182 EndSwitch EndSwitch
178 183
179 184 EndFunction EndFunction
180 185
186 Function lurk:CanHas(url$)
187 Return(IIf(p_HasItem(url$, "Root"), "added" , ""))
188 EndFunction
189
190 Function lurk:AddByDoubleClick()
191 self:AddFromlist(pos)
192 p_SaveFeeds()
193 EndFunction
194
195
196
197 Function lurk:AddSelected()
198 Local t = mui.DoMethod(#LURK_LISTVIEW, "GetSelection")
199 For i,v In IPairs(t) ;č tam jsou pouze číselné indexy. Možno.
200 lurk:AddFromlist(v)
201 Next
202 p_SaveFeeds()
203 EndFunction
181 204
205 Function lurk:AddFromlist(pos)
206 Local has$, href$, title$, rel$, type$, url$ = mui.DoMethod(
207 #LURK_LISTVIEW, "GetEntry", pos)
208 If Not has$
209 p_AddFeed(url$)
210 EndIf
211 mui.DoMethod(#LURK_LISTVIEW, "Rename", pos,
212 self:CanHas(url$), href$, title$, rel$, type$, url$)
213 EndFunction
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