/feedsdata.hws (83e47eb86860331dfe771f49029c00559a2f687e) (1694 bytes) (mode 100755) (type blob)

feedsdata = {}
;č na klíče je třeba dávat bacha
;č 1. serializator je dává do dolního registru
;č 2. HaveItem je podvodná funkce, která sere na registr
;č 3. takže budeme muset srát na registr i my.
;č 4. URLy v feedsdata budeme převadět do dolního registru, 
;č    takže budou možné kolize. Pořád je to lepší jak 
;č    převádět do dolního všechno, 
;č    nebo používat nějaké hešy pro indexy feedsdata   
;č 5. Metametody nechcu, bude je volat i deserializator. 
;č    Ne pro nej to dělám.
;č 6. Meta- a vázané metody se uloží spolu s tabulkou,
;č    můžou být pak zbytečné potíže s aktualizací


Function fd_Get(feedid$, key)
	feedid$ = LowerStr(feedid$)
	Local t = RawGet(feedsdata, feedid$)
	If GetType(t) = #TABLE Then Return(RawGet(t, key))
	Return(Nil)
EndFunction 

Function fd_Set(feedid$, key, value)
	feedid$ = LowerStr(feedid$)
	Local t = RawGet(feedsdata, feedid$)
	If GetType(t) <> #TABLE 
		t = {}
		feedsdata[feedid$] = t
	EndIf
	RawSet(t, key, value)
EndFunction 

;udm kudžem byrjem pajmíško...
Function fd_isEqualOrSet(feedid$, key, value)
	feedid$ = LowerStr(feedid$)
	Local t = RawGet(feedsdata, feedid$)
	If GetType(t) <> #TABLE 
		t = {}
		feedsdata[feedid$] = t
	EndIf
		
	If RawGet(t, key) = value Then Return(True)
	;č nic? 
	RawSet(t, key, value)
	Return(False)
EndFunction 

/* ;easy to understand, but so elegant  
Function feedsdata:CheckAndSet(feedid$, key, value)
	If HaveItem(self, feedid$)
		Local t = self[feedid$]
		If RawGet(t, key) = value
			Return(False)
		Else
			RawSet(t, key, value)
			Return(True)
		Endif 
	EndIf 
	
	self[feedid$] = {}
	RawSet(self[feedid$], key, value)
EndFunction 
*/

Mode Type Size Ref File
100755 blob 7473 1ab45355102d3c454b8d83e05e4af10b0447dee3 128px-Feed-icon.png
100755 blob 5559 b4b21e48b891dd64eb9d1bc4a2897ce50bb139ac AppWindow.xml
100755 blob 3296 87f34b200c7e6abd9235c437a1927c745832e729 IvoR.hws
100755 blob 8539 5fb3546290c06f2b7077fbedb85cef583a60e574 IvoRSS.hws
100755 blob 7191 6291191cf3b1e9b7dd44493a09e26918f2c6e3d1 IvoRSS.png
100755 blob 4405 6f1fc460afb31e6e38cd78dd01c0debaae6f5343 feeds.hws
100755 blob 1694 83e47eb86860331dfe771f49029c00559a2f687e feedsdata.hws
100755 blob 8773 a1ac5af9c9ebafc5b2a012753079ee9602fbb98f feedtree.hws
100755 blob 6412 f39265cc944ed3be89260bc28f32c3805794fb0d lurk.hws
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