{"id":15681151,"url":"https://github.com/gabrielbb/rss-node-mongo","last_synced_at":"2025-05-07T12:10:54.921Z","repository":{"id":218249185,"uuid":"99502662","full_name":"GabrielBB/rss-node-mongo","owner":"GabrielBB","description":"RNM is a Node JS module to request and parse a RSS feed and save the contents to Mongo DB","archived":false,"fork":false,"pushed_at":"2018-04-01T15:27:37.000Z","size":16,"stargazers_count":11,"open_issues_count":1,"forks_count":2,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-03-31T09:51:09.696Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"https://www.npmjs.com/package/rss-node-mongo","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GabrielBB.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null}},"created_at":"2017-08-06T17:32:30.000Z","updated_at":"2021-09-26T19:48:01.000Z","dependencies_parsed_at":"2024-01-20T19:00:47.374Z","dependency_job_id":null,"html_url":"https://github.com/GabrielBB/rss-node-mongo","commit_stats":null,"previous_names":["gabrielbb/rss-node-mongo"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2Frss-node-mongo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2Frss-node-mongo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2Frss-node-mongo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GabrielBB%2Frss-node-mongo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GabrielBB","download_url":"https://codeload.github.com/GabrielBB/rss-node-mongo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252873949,"owners_count":21817714,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-10-03T16:50:12.745Z","updated_at":"2025-05-07T12:10:54.899Z","avatar_url":"https://github.com/GabrielBB.png","language":"JavaScript","readme":"# rss-node-mongo\n\n![see module on NPM](https://nodei.co/npm/rss-node-mongo.png?downloads=true\u0026downloadRank=true\u0026stars=true)\n\nRNM is a Node JS module to request and parse RSS feeds and save the contents to Mongo DB. It makes sure only the new content is appended to your collection. You only provide the RSS URI and your database connection string and it is done.\n\nImportant Note: This module is only for version 8 of Node JS. We are working on a new version with backward compatibility\n \n## Usage\n\n```javascript\nconst RSSToMongo = require('rss-node-mongo');\n\nconst rss = new RSSToMongo(properties)\n\nrss.work(function (err, success) {\n    if (!err) {\n         console.log(success.saved + \" items were inserted\")\n    } else {\n         console.error(err)\n    }\n})\n```\n\n**properties**\n\nThis parameter can have the following properties:\n\n - `rss`: The RSS URL\n \n - `db`: The mongo db connection string (if not provided it creates a database named \"rss\" under mongodb://localhost:27017)\n \n - `collection`: Name for the collection where items will be saved (if not provided then it creates a collection named \"feeds\")\n\n**success**\n\nThis object has the following properties: \n\n - `saved`: Number of items that were inserted to database\n \n - `total`: Total number of items from the RSS\n \n - `ignored`: Number of items that were ignored because they were already in the database collection\n\n## Further\n\nYou can also pass a function as a second parameter of the class that will be called for each retrieved item.\n```javascript\nconst rss = new RSSToMongo(properties, function(item) { \n\t// The item will be inserted with the changes you make here to the database. \n\n\titem._id = item.link; // For example, you might want your _id to be something else\n\titem[\"PutNewPropertyNameHere\"] = \"I'm additional\": // Or Add an additional property\n\t// Or remove special characters from the item content\n})\n```\n\n### Installation\n\nInstall the dependency\n``` sh\nnpm install rss-node-mongo\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielbb%2Frss-node-mongo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgabrielbb%2Frss-node-mongo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgabrielbb%2Frss-node-mongo/lists"}