Read the statement by Michael Teeuw here.
folder monitor/ file creation...
-
@banbutcher said in folder monitor/ file creation...:
if(this.dataFile){ wrapper.innerHTML = this.dataFile; } else { wrapper.innerHTML = "No data"; }
if the content you are injecting in NOT html, then you should use innerText…
it might recognize the line ends as such… they are not line ends in htmlif the innerText doesn’t work, then u will have to convert the line ends t html line breaks
replace '\n\ with ‘
’note that html is NOT UTF 8
-
here is the script that im using to retreve file names…
#!/bin/bash TARGET=/media/TheVault/UnWatched/ PROCESSED=/media/TheVault/Torrentopia/Torrent-Files/ inotifywait -m -e create -e moved_to -r --format "%f" $TARGET \ | while read FILENAME do echo Detected $FILENAME, Adding to list... echo $FILENAME | cat - $PROCESSED/new-tv-list.txt > temp && mv temp $PROCESSED/new-tv-list.txt # echo $FILENAME `date` >> $PROCESSED/new-tv-list.txt cp $PROCESSED/new-tv-list.txt /home/pi/MagicMirror/new-tv-list.txt done
if i take out the utf8 part i get an [object array buffer] instead of my file names…
-
so i put back in the utf8 and then added
<br>
after i echo the filename and now its working fine now, i need to tweek it more to suit my needs but so far so good! thanks for your help @sdetweil im sure ill be asking more silly questions again soon! :) -
@banbutcher said in folder monitor/ file creation...:
ill be asking more silly questions
no such thing… ask away…
-
@banbutcher you can also convert the buffer to a string
buffer_object.toString()