~ghost08/ratt

fix typos v1 APPLIED

Daniel Hecker: 2
 fix typos
 Add warning about race conditions in global variables

 6 files changed, 7 insertions(+), 7 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.sr.ht/~ghost08/ratt/patches/27826/mbox | git am -3
Learn more about email & git

[PATCH 1/2] fix typos Export this patch

---
 README.md                    | 4 ++--
 confs/shmu.aladin.yml        | 2 +-
 confs/sktorrent.yml          | 2 +-
 confs/videoportal.joj.sk.yml | 2 +-
 confs/ztracker.yml           | 2 +-
 5 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/README.md b/README.md
index 48d0472..f5edc8f 100644
--- a/README.md
+++ b/README.md
@@ -18,7 +18,7 @@ selectors:
    #css selectors to get the feed data
    feed:
        title: .title.my-2
        desctription: .description
        description: .description
        authorname:
        authoremail:
    #css selectors to get item data
@@ -168,4 +168,4 @@ Check the [confs](https://git.sr.ht/~ghost08/ratt/tree/master/item/confs) dir fo

ratt needs config files for it to run. I really rely on the community to create configs for all the sites!

So please create config files, push it here, than everybody can make the world RSS again!
So please create config files, push it here, then everybody can make the world RSS again!
diff --git a/confs/shmu.aladin.yml b/confs/shmu.aladin.yml
index f6f8ba6..fd9c6b3 100644
--- a/confs/shmu.aladin.yml
+++ b/confs/shmu.aladin.yml
@@ -8,7 +8,7 @@ selectors:
    useragent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36
  feed:
    title: .mpagewidth > h1
    desctription: .mpagewidth > p
    description: .mpagewidth > p
    authorname:
    authoremail:
  item:
diff --git a/confs/sktorrent.yml b/confs/sktorrent.yml
index 9aa1d8d..8bc5fb1 100644
--- a/confs/sktorrent.yml
+++ b/confs/sktorrent.yml
@@ -20,7 +20,7 @@ selectors:
    insecure: true
  feed:
    title: meta[name]
    desctription: ""
    description: ""
    author-name: ""
    author-email: ""
  item:
diff --git a/confs/videoportal.joj.sk.yml b/confs/videoportal.joj.sk.yml
index 44da924..9d78761 100644
--- a/confs/videoportal.joj.sk.yml
+++ b/confs/videoportal.joj.sk.yml
@@ -6,7 +6,7 @@ selectors:
    useragent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/90.0.4430.72 Safari/537.36
  feed:
    title: .title.my-2
    desctription: .description
    description: .description
    authorname:
    authoremail:
  item:
diff --git a/confs/ztracker.yml b/confs/ztracker.yml
index d96e0a6..f9024c8 100644
--- a/confs/ztracker.yml
+++ b/confs/ztracker.yml
@@ -12,7 +12,7 @@ selectors:
    insecure: true
  feed:
    title: html head meta[name]
    desctription: ""
    description: ""
    authorname: ""
    authoremail: ""

-- 
2.34.1

[PATCH 2/2] Add warning about race conditions in global variables Export this patch

This has cost me quite some time to realize, so i hope the warning
will prevent others from scratching their heads as well.
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index f5edc8f..0686226 100644
--- a/README.md
+++ b/README.md
@@ -102,7 +102,7 @@ The Lua script will get some global variables, to help with the extraction:

`gojq` is a module imported by default, it is the [gojq](https://github.com/itchyny/gojq)) library

`setGlobal` sets a global variable that will be visible in other lua scripts. eg. in feed title `setGlobal("myvar", 1)` is called and than in every subsequent item title, item link, ..., item image the variable will be visible `print(myvar)`
`setGlobal` sets a global variable that will be visible in other lua scripts. eg. in feed title `setGlobal("myvar", 1)` is called and then in every subsequent item title, item link, ..., item image the variable will be visible and can be used: `print(myvar)`. **Warning**: Please note, that setting a global variable in an item may result in race conditions, as items are processed in parallel.

`index` number of the item processed

-- 
2.34.1