-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
158 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
#ignore files and folders | ||
start_git.cmd |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
(: Copyright 2022 vbprofi. :) | ||
|
||
(:------------------ QUERY PROLOG ------------------:) | ||
|
||
(:------------------ NAMESPACES ------------------:) | ||
declare default element namespace "http://www.w3.org/1999/xhtml"; | ||
|
||
(:------------------ IMPORTS ------------------:) | ||
import module namespace fsi = "http://freedomscientific.com/ResearchItImports" at "ResearchItLibrary.jri"; | ||
|
||
|
||
(:------------------ FUNCTIONS ------------------:) | ||
|
||
declare function local:make-link ($link as xs:string, $title as xs:string) as xs:string* | ||
{ | ||
('<a href="', replace($link,",","%2c"), '" target="_blank">', | ||
$title, '</a>', $fsi:new_line) | ||
}; | ||
|
||
declare function local:process-each ($list as node()*) as xs:string* | ||
{ | ||
for $item at $count in $list | ||
let $link := local:make-link (data ($item/*[name()='link']), data ($item/*[name()='title'])) | ||
let $desc := fsi:output-clean-lines ($item/*[name()='description']) | ||
let $content := fsi:output-clean-lines ($item/*[name()='content']) | ||
return ($link, $desc, $content, $fsi:new_line) | ||
}; | ||
|
||
declare function local:main () | ||
{ | ||
if (count ($stories)) then | ||
('Es werden jetzt nachfolgend die aktuellen Nachrichten aufgelistet.', $fsi:new_line, $fsi:new_line, | ||
local:process-each ($stories)) | ||
else ( | ||
"Es konnten keine aktuellen Nachrichten heruntergeladen werden. Vergewissern Sie sich, dass eine Internet-Verbindung besteht.", | ||
$fsi:new_line | ||
) | ||
}; | ||
(:------------------ VARIABLES ------------------:) | ||
|
||
declare variable $URL := "http://anfdeutsch.com/feed.rss"; | ||
declare variable $doc := doc ($URL); | ||
declare variable $stories := $doc/*[name()='rss']/*[name()='channel']/*[name()='item']; | ||
|
||
(:------------------ QUERY BODY ------------------:) | ||
local:main () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Details] | ||
FriendlyName=ANF deutsch | ||
Description=ANF deutsch - Aktuell | ||
Timeout=15000 | ||
Version=1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
(: Copyright 2022 vbprofi. :) | ||
|
||
(:------------------ QUERY PROLOG ------------------:) | ||
|
||
(:------------------ NAMESPACES ------------------:) | ||
declare default element namespace "http://www.w3.org/1999/xhtml"; | ||
|
||
(:------------------ IMPORTS ------------------:) | ||
import module namespace fsi = "http://freedomscientific.com/ResearchItImports" at "ResearchItLibrary.jri"; | ||
|
||
|
||
(:------------------ FUNCTIONS ------------------:) | ||
|
||
declare function local:make-link ($link as xs:string, $title as xs:string) as xs:string* | ||
{ | ||
('<a href="', replace($link,",","%2c"), '" target="_blank">', | ||
$title, '</a>', $fsi:new_line) | ||
}; | ||
|
||
declare function local:process-each ($list as node()*) as xs:string* | ||
{ | ||
for $item at $count in $list | ||
let $link := local:make-link (data ($item/*[name()='link']), data ($item/*[name()='title'])) | ||
let $desc := fsi:output-clean-lines ($item/*[name()='description']) | ||
let $content := fsi:output-clean-lines ($item/*[name()='content']) | ||
return ($link, $desc, $content, $fsi:new_line) | ||
}; | ||
|
||
declare function local:main () | ||
{ | ||
if (count ($stories)) then | ||
('Es werden jetzt nachfolgend die aktuellen Nachrichten aufgelistet.', $fsi:new_line, $fsi:new_line, | ||
local:process-each ($stories)) | ||
else ( | ||
"Es konnten keine aktuellen Nachrichten heruntergeladen werden. Vergewissern Sie sich, dass eine Internet-Verbindung besteht.", | ||
$fsi:new_line | ||
) | ||
}; | ||
(:------------------ VARIABLES ------------------:) | ||
|
||
declare variable $URL := "http://firatnews.com/feed.rss"; | ||
declare variable $doc := doc ($URL); | ||
declare variable $stories := $doc/*[name()='rss']/*[name()='channel']/*[name()='item']; | ||
|
||
(:------------------ QUERY BODY ------------------:) | ||
local:main () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Details] | ||
FriendlyName=ANF t�rkce | ||
Description=ANF t�rkce - Aktuel | ||
Timeout=15000 | ||
Version=1.0.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
(: Copyright 2022 vbprofi. :) | ||
|
||
(:------------------ QUERY PROLOG ------------------:) | ||
|
||
(:------------------ NAMESPACES ------------------:) | ||
declare default element namespace "http://www.w3.org/1999/xhtml"; | ||
|
||
(:------------------ IMPORTS ------------------:) | ||
import module namespace fsi = "http://freedomscientific.com/ResearchItImports" at "ResearchItLibrary.jri"; | ||
|
||
|
||
(:------------------ FUNCTIONS ------------------:) | ||
|
||
declare function local:make-link ($link as xs:string, $title as xs:string) as xs:string* | ||
{ | ||
('<a href="', replace($link,",","%2c"), '" target="_blank">', | ||
$title, '</a>', $fsi:new_line) | ||
}; | ||
|
||
declare function local:process-each ($list as node()*) as xs:string* | ||
{ | ||
for $item at $count in $list | ||
let $link := local:make-link (data ($item/*[name()='link']), data ($item/*[name()='title'])) | ||
let $desc := fsi:output-clean-lines ($item/*[name()='description']) | ||
let $content := fsi:output-clean-lines ($item/*[name()='content']) | ||
return ($link, $desc, $content, $fsi:new_line) | ||
}; | ||
|
||
declare function local:main () | ||
{ | ||
if (count ($stories)) then | ||
('Es werden jetzt nachfolgend die aktuellen Nachrichten aufgelistet.', $fsi:new_line, $fsi:new_line, | ||
local:process-each ($stories)) | ||
else ( | ||
"Es konnten keine aktuellen Nachrichten heruntergeladen werden. Vergewissern Sie sich, dass eine Internet-Verbindung besteht.", | ||
$fsi:new_line | ||
) | ||
}; | ||
(:------------------ VARIABLES ------------------:) | ||
|
||
declare variable $URL := "http://vbprofi.lima-city.de/rss/yop/"; | ||
declare variable $doc := doc ($URL); | ||
declare variable $stories := $doc/*[name()='rss']/*[name()='channel']/*[name()='item']; | ||
|
||
(:------------------ QUERY BODY ------------------:) | ||
local:main () | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
[Details] | ||
FriendlyName=Yeni �zg�r politika | ||
Description=t�rkce - Aktuel | ||
Timeout=15000 | ||
Version=1.0.0 |