List of commits:
Subject Hash Author Date (UTC)
implement image loading b408a53d97f23784bbfc668eac663619a3afebe7 Alex 2022-07-19 06:27:44
implement channel link support f2378ce83c04b95304c5ff21b14806edf90a2216 Alex 2022-07-19 01:26:03
bold unread articles (It wasn't planned before) 35a66771b2285811a5c5f8adefafdda4d2bf4e38 Alex 2022-07-19 00:11:29
dodat i zmìny z IvoRSS 78d71c13bd806cf849eb16d1a672aea5551b6b2c Alex 2022-07-18 02:14:12
totálnì hustej HTML parsing je implementován eeba45d9811c83e9199d3a5929102c192e54b216 Alex 2022-07-18 02:11:49
add show source feature 8c963667a609e9c91f5a94963786ca2e4a7f88a4 Alex 2022-07-17 03:46:17
IvoR: if parser falls, try to convert to utf-8 from system encoding ea17d81bc65b6a5e79d202d5a6b36fcae854cc1b Alex 2022-07-17 02:33:02
feedtree: add Copy URL option to context menu a9170b64e6b1bca22cb807a7afa0fe35b6611cbe Alex 2022-07-16 23:00:07
feedtree: keep track of the latest guid fa1cf2508ade717fc3aa3bf8224a51b685e1636b Alex 2022-07-16 22:42:30
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
Commit b408a53d97f23784bbfc668eac663619a3afebe7 - implement image loading
Author: Alex
Author date (UTC): 2022-07-19 06:27
Committer name: Alex
Committer date (UTC): 2022-07-19 06:27
Parent(s): f2378ce83c04b95304c5ff21b14806edf90a2216
Signer:
Signing key:
Signing status: N
Tree: 0ae058e4e7ee42c869cce2b4f228e47bcbd8b83f
File Lines added Lines deleted
IvoR.hws 66 1
IvoRSS.hws 5 0
File IvoR.hws changed (mode: 100755) (index 4e263c3..9a89dd9)
... ... Function IvoR:Load(feedid$)
19 19 local lastP = GetItem(IvoR.parsers, -1) local lastP = GetItem(IvoR.parsers, -1)
20 20 If Not isNil(lastP) Then lastP:Stop() If Not isNil(lastP) Then lastP:Stop()
21 21
22 self.feedid = feedid$
23 self.link = feedid$
24
22 25 ;č teprve teď uklízíme ;č teprve teď uklízíme
23 26 Ivor:Clear() Ivor:Clear()
24 27
25 28 ; TODO: load icon ; TODO: load icon
29 self.ImageLoaded = False
30 self:LoadImage()
31 If Not self.ImageLoaded Then mui.Set("feedimage", "Brush", 1)
26 32
27 33
28 34 ;č a vytahujeme seznam přečteného ;č a vytahujeme seznam přečteného
 
... ... Function IvoR:ShowArticle(pos)
113 119 EndFunction EndFunction
114 120
115 121
122 Function IvoR:DownloadImage(str$)
123 If Not AllowImages Or self.ImageLoaded Then Return()
124 Local extension$ = "image"
125 If StrLen(str$) > 4
126 Switch LowerStr(RightStr(str$, 4))
127 Case "ilbm": FallThrough
128 Case ".lbm": extension$ = "ilbm"
129 Case ".png": extension$ = "png"
130 Case ".gif": extension$ = "gif"
131 Case "jpeg": FallThrough
132 Case ".jpg": extension$ = "jpg"
133 Case ".bmp": extension$ = "bmp"
134 EndSwitch
135 EndIf
136
137 Local url$ = p_reconstructURL(self.link, str$)
138 Local err_code, _empty_str$, count = ?DownloadFile(url$,
139 {File=p_GetLogoName(self.feedid, extension$), Adapter="hurl",
140 Fail404=True, Encoded=FindStr(url$, "%", True) <> -1})
141 p_Replay(err_code, "Image logo is downloaded")
142 fd_Set(self.feedid, "imageformat", extension$)
143
144 self:LoadImage()
145
146 EndFunction
147
148 Function IvoR:LoadImage()
149 If Not AllowImages Or self.ImageLoaded Then Return()
150 Local extension$ = fd_Get(self.feedid, "imageformat")
151 If IsNil(extension$) Then Return()
152
153 Local filename$ = p_GetLogoName(self.feedid, extension$)
154 Local ret, t = IsPicture(filename$, {Loader="Inbuilt"})
155 If Not ret Then Return()
156
157 For i,v In Pairs(t)
158 DebugPrint(i .. "=" .. v)
159 Next
160
161 Local err_code, _id = ?LoadBrush(2, filename$,
162 {LoadAlpha = t.Alpha, LoadTransparency=t.Transparency})
163 If err_code <> #ERR_NONE
164 mui.Set("status", "Contents", "\27b" .. GetErrorName(err_code))
165 Return()
166 EndIf
167 DebugPrint(ID)
168 If t.Height > 32 Then ScaleBrush(2, #KEEPASPRAT, 32)
169
170 mui.Set("feedimage", "Brush", 2)
171 self.ImageLoaded = True
172 EndFunction
173
116 174 Function IvoR:OpenChannel() Function IvoR:OpenChannel()
117 175 ;č Vostuda, ale nemáme to nikde uloženo. Jen na formě =] ;č Vostuda, ale nemáme to nikde uloženo. Jen na formě =]
118 176 Local url$ = mui.Get("channel_link", "Contents") Local url$ = mui.Get("channel_link", "Contents")
 
... ... Function CharacterData(p, str$)
190 248 Case "title": mui.Set("channel_title", "Contents", tf_Label(str$)) Case "title": mui.Set("channel_title", "Contents", tf_Label(str$))
191 249 Case "description": Case "description":
192 250 mui.Set("channel_description", "Contents", tf_Label(str$)) mui.Set("channel_description", "Contents", tf_Label(str$))
193 Case "link": mui.Set("channel_link", "Contents", StripStr(str$))
251 Case "link":
252 IvoR.link = str$
253 mui.Set("channel_link", "Contents", StripStr(str$))
254
255 ;č url podle RSS specifikace musí být pouze u obrázků.
256 Case "url": IvoR:DownloadImage(str$)
257
258
194 259 EndSwitch EndSwitch
195 260
196 261 Else Else
File IvoRSS.hws changed (mode: 100755) (index 9152542..b74def4)
30 30 ChannelIconBrush = 1 ChannelIconBrush = 1
31 31
32 32 PleaseStop = True PleaseStop = True
33 AllowImages = True
33 34
34 35
35 36
 
... ... Function p_GetXMLname(feedid$)
234 235 Return("Feeds/"..p_GetFileID(feedid$)..".xml") Return("Feeds/"..p_GetFileID(feedid$)..".xml")
235 236 EndFunction EndFunction
236 237
238 Function p_GetLogoName(feedid$, extension$)
239 Return("Feeds/"..p_GetFileID(feedid$).."." .. extension$)
240 EndFunction
241
237 242
238 243 /* From Hollywood docs: /* From Hollywood docs:
239 244 Action: #DOWNLOADFILE_STATUS Action: #DOWNLOADFILE_STATUS
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