Skip to content

Converts a SpotTheStationRSSParser javascript object into a valid ICS file.

License

Notifications You must be signed in to change notification settings

colw/spotthestation-ics-creator

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

SpotTheStation ICS Creator

Converts a SpotTheStation RSS Reader Javascript object into a valid ics file.

Example

var request = require("request");
var IssReader = require('spotthestation-rss-reader');
var IcsCreator = require('spotthestation-ics-creator');

var issReader = new IssReader();
var icsCreator = new IcsCreator();

var RSSURI = 'http://spotthestation.nasa.gov/sightings/indexrss.cfm?'
		       + 'country=Germany&region=None&city=Berlin';

request(RSSURI, function(error, response, body) {
    if (!error && response.statusCode == 200) {
        issReader.parseRSS(body, function(err, jsonData) {
          if (err) throw err;            
        	icsCreator.createICS(jsonData, function(err, icsData) {
        	  if (err) throw err;
        	  console.log(icsData);
        	});
        })
    }
});

Todo

  • Improve line feed handling in ICS output.
  • Improve error handling.

About

Converts a SpotTheStationRSSParser javascript object into a valid ICS file.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published