Giter Site home page Giter Site logo

Invalid config file about shell-rss-torrent HOT 5 OPEN

rafostar avatar rafostar commented on May 29, 2024
Invalid config file

from shell-rss-torrent.

Comments (5)

Rafostar avatar Rafostar commented on May 29, 2024

You shouldn't have spaces at the beginning/end of file path that are handled as-is meaning folders can have spaces there. Also check if you have all required apps mentioned in readme that we use installed.

from shell-rss-torrent.

dragful avatar dragful commented on May 29, 2024

Thanks for the answer.
I can't find my mistake.

Here is what i've made :

<config>
<watchdir>/var/www/html/uploads/</watchdir>
<feed url="https://rss_url">
<contains ignore-case="1">Pack</contains>
</feed>
</config>

wget is installed, as is libxml2

v@x:~/scripts|⇒  sudo apt-get install wget
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
wget is already the newest version (1.21.2-2ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

v@x~/scripts|⇒  sudo apt install libxml2-utils
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
libxml2-utils is already the newest version (2.9.13+dfsg-1ubuntu0.3).
0 upgraded, 0 newly installed, 0 to remove and 29 not upgraded.

from shell-rss-torrent.

Rafostar avatar Rafostar commented on May 29, 2024

Config seems OK, and you have libxml2-utils. Are you statrting this script with correct path to your config file as an arg? If path contains spaces you need to quote it.

from shell-rss-torrent.

dragful avatar dragful commented on May 29, 2024

yes i'm sure about this

v@x:~/scripts|⇒ sudo ./shell-rss-torrent "config.xml"

and both files are in the same directory
weird ....

from shell-rss-torrent.

Rafostar avatar Rafostar commented on May 29, 2024

Thats weird indeed. Let's try this, apply this change (either manually or as a git patch):

diff --git a/shell-rss-torrent b/shell-rss-torrent
index 598736a..e4ed4cb 100755
--- a/shell-rss-torrent
+++ b/shell-rss-torrent
@@ -18,6 +18,9 @@ parse_config() {
     if [ "$?" -ne 0 ]
     then
         echo "Error: invalid config file"
+        echo "WatchDir: \"$WatchDir\""
+        echo "ConfigData: \"$ConfigData\""
+        echo "ReadDir: \"$(echo "$ConfigData" | xmllint --xpath "string(//config/watchdir[1]/text())" -)\""
         exit 1
     fi
 

And try running your script like you usually do. It should print the values after your error.

from shell-rss-torrent.

Related Issues (4)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.