I have the following setting: My Raspberry Pi is connected to a display. The Raspberry Pi shows a HTML-Webpage with a RSS Newsfeed. The Raspberry Pi also hosts a Configuration Web-page
The HTML that shows the RSS looks like this:
<script type="text/javascript" src="FeedEk.js"></script>
<script type="text/javascript">
var feed=function(){
$('#divRss').FeedEk({
**FeedUrl: 'http://www.tagesschau.de/xml/rss2'**,
MaxCount: 5,
ShowDesc: true,
ShowPubDate: true,
DescCharacterLimit: 100,
DateFormat: 'L',
DateFormatLang: 'en'
});
;}
feed();
setInterval(feed, 10*60*1000);
</script>
<div id="divRss"></div>
The Variable FeedUrl
is currently hard coded and decides which RSS-Feed to be shown.
Now I want to have a config-file with the FeedUrl
.
The Configuration Webpage should write the FeedUrl
in the config-file.
And the HTML should read the FeedUrl
from the config-file. As you can see I dont know which file format the config file should be.
The Config-Webpage should be like this. When you click the button the URL should be saved in the config-file
<form>
<label for="URL">URL: </label>
<input type="text" id="FeedURL" name="URL">
<button type="submit">SAVE!"</button>
</form>
=> So my Questions are: 1. Which file format do I need to save and extract information? 2. How can I write information in the file? 3. How do I read the informations from the file?