List of commits:
Subject Hash Author Date (UTC)
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
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
Commit ea17d81bc65b6a5e79d202d5a6b36fcae854cc1b - IvoR: if parser falls, try to convert to utf-8 from system encoding
Author: Alex
Author date (UTC): 2022-07-17 02:33
Committer name: Alex
Committer date (UTC): 2022-07-17 02:33
Parent(s): a9170b64e6b1bca22cb807a7afa0fe35b6611cbe
Signer:
Signing key:
Signing status: N
Tree: eab69d152bd9e8c433be7bf6eb694ca5fb01c77c
File Lines added Lines deleted
IvoR.hws 67 28
File IvoR.hws changed (mode: 100755) (index 87f34b2..56bbaba)
1 1 ; Module for the right side of the application ; Module for the right side of the application
2 2
3 ; Hollywood-like object programming...
3 ; Hollywood-like object programming :)
4 4 IvoR = {} IvoR = {}
5 IvoR.parsers = CreateList()
6
5 7
6 ;č Testy ukazují, že jediný způsob zavolat funkce je IvoR:Foo(),
7 ;č zatímco k atributům lze přistupovat
8 ;č buď pomocí IvoR.Bar nebo self.Bar
9 ;č V tom self nevidím žádný smysl
10 8
11 IvoR.parsers = CreateList()
12 9
13 10 Function IvoR:Load(feedid$) Function IvoR:Load(feedid$)
14 11 ;DebugPrint(p_GetXMLname(feedid$)) ;DebugPrint(p_GetXMLname(feedid$))
15 Local err_code, text$, _len = ?FileToString(p_GetXMLname(feedid$))
12 Local err_code, xml$, _len = ?FileToString(p_GetXMLname(feedid$))
16 13 ; když máme chybu, tak rovnou končíme ; když máme chybu, tak rovnou končíme
17 14 If err_code <> #ERR_NONE If err_code <> #ERR_NONE
18 15 mui.Set("status", "Contents", "\27b" .. GetErrorName(err_code)) mui.Set("status", "Contents", "\27b" .. GetErrorName(err_code))
 
... ... Function IvoR:Load(feedid$)
28 25 If Not isNil(lastP) Then lastP:Stop() If Not isNil(lastP) Then lastP:Stop()
29 26
30 27
31 items_list = CreateList()
32 channel_level = True
33 current_element$ = Nil
34
35 current_item = {title="", pubdate="", category="", description=""}
28
36 29
37 30 Local p = XMLParser.New({StartElement = StartElement, EndElement=EndElement, CharacterData = CharacterData}) Local p = XMLParser.New({StartElement = StartElement, EndElement=EndElement, CharacterData = CharacterData})
38 31 InsertItem(Ivor.parsers, p) InsertItem(Ivor.parsers, p)
39 32 DebugPrint("Created parser ", ListItems(Ivor.parsers)) DebugPrint("Created parser ", ListItems(Ivor.parsers))
40 p:Parse(text$)
41 ;GetItem(Ivor.parsers, -1):Parse(text$)
42 ;p:Parse([[ text </to> ]])
43 err_code = ?p:Close()
33
34 p:setbase(feedid$)
35
36 p:Parse(xml$)
37
38 ;Local lin, col, pos = p:pos()
39 ;DebugPrint(lin, col, pos)
40
41 Local err_code = ?p:Close()
42 Local errorname = GetErrorName(err_code)
43 ;DebugPrint(err_code, GetErrorName(err_code))
44 44 DebugPrint("Parser closed", ListItems(Ivor.parsers)) DebugPrint("Parser closed", ListItems(Ivor.parsers))
45 45 RemoveItem(Ivor.parsers) RemoveItem(Ivor.parsers)
46 ;err_code = ?Ivor.parsers[0].Close()
46
47 ;č moc se mně neptejte, ale zdá se,
48 ;č že se vracejí odlišné chyby se stejným kódem
49 If errorname = "Error closing parser: unknown encoding!"
50 DebugPrint("Eště jeden pokus...")
51
52 Ivor:Clear()
53
54 ;č je to hodně nebezpečný, ale řekl bych, že spadl-li
55 ;č parser kvůli kódování, tak nemohl žádný kólbek spustit
56 Local p = XMLParser.New({StartElement = StartElement, EndElement=EndElement, CharacterData = CharacterData})
57 InsertItem(Ivor.parsers, p)
58 DebugPrint("Created parser ", ListItems(Ivor.parsers))
59
60 p:setbase(feedid$)
61
62
63 ;č Zoufalý pokus zobrazit aspoň něco
64 ;č 1. Polski Portal Amigowy používá ISO-8859-2
65 ;č 2. Ale spousta amigistů taky pochází z Polska
66 ;č a budou nejspíš taky mít ISO-8859-2 v systému
67 ;č 3. Polski Portal Amigowy je zahraněn!
68 xml$ = ConvertStr(xml$, #ENCODING_AMIGA, #ENCODING_UTF8)
69 p:setencoding("UTF-8")
70
71 p:Parse(xml$)
72 ;Local lin, col, pos = p:pos()
73 ;DebugPrint(lin, col, pos)
74
75 Local err_code = ?p:Close()
76 ;Local errorname = GetErrorName(err_code)
77 ;DebugPrint(err_code, GetErrorName(err_code))
78 DebugPrint("Parser closed", ListItems(Ivor.parsers))
79 RemoveItem(Ivor.parsers)
80 EndIf
47 81 EndFunction EndFunction
48 82
49 83
50 84 Function IvoR:Clear() Function IvoR:Clear()
51 85 mui.Set("channel_title", "Contents", "") mui.Set("channel_title", "Contents", "")
52 mui.Set("channel_title", "ContextMenu", "(none)")
86 ;mui.Set("channel_title", "ContextMenu", "(none)")
53 87
54 88 mui.Set("channel_description", "Contents", "") mui.Set("channel_description", "Contents", "")
55 mui.Set("channel_description", "ContextMenu", "(none)")
56
89 ;mui.Set("channel_description", "ContextMenu", "(none)")
57 90
58 mui.Set("articles", "Quiet", True)
59 For Local k = 1 To mui.Get("articles", "Entries")
60 mui.DoMethod("articles", "Remove", "Last")
61 Next
62 mui.Set("articles", "Quiet", False)
91 mui.DoMethod("articles", "Clear")
63 92
64 93 mui.Set("item_title", "Contents", "") mui.Set("item_title", "Contents", "")
65 mui.Set("item_title", "ContextMenu", "(none)")
94 ;mui.Set("item_title", "ContextMenu", "(none)")
66 95
67 96 mui.Set("textfield", "Text", "") mui.Set("textfield", "Text", "")
68 mui.Set("textfield", "ContextMenu", "(none)")
97 ;mui.Set("textfield", "ContextMenu", "(none)")
98
99
100
101
102 items_list = CreateList() ;č ten necháme globálním
103 channel_level = True
104 current_element$ = Nil
105
106 current_item = {title="", pubdate="", category="", description=""}
69 107 EndFunction EndFunction
70 108
71 109
 
... ... Function EndElement(p, name$)
97 135 EndIf EndIf
98 136 EndFunction EndFunction
99 137
100 ;asdf
138
139
101 140 Function CharacterData(p, str$) Function CharacterData(p, str$)
102 141 ;DebugPrint("CD: ", str$) ;DebugPrint("CD: ", str$)
103 142 If channel_level If channel_level
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