简体   繁体   English

通过前端将Feed添加到Feedjira

[英]Adding Feeds to Feedjira via Front-End

I'm looking to add feeds via the front-end to be fetched by Feedjira, I've followed the basic Railscast tutorial and got 1 feed set up and working. 我正在寻找通过Feedjira获取前端的提要,我已经遵循了基本的Railscast教程,并设置了1个提要并正常工作。 What I can't wrap my head around is allowing me to add a feed to feedjira via the front end (eg text box) and then letting the cron job pick it up and parse it. 我无法解决的问题是允许我通过前端(例如文本框)向feedjira添加提要,然后让cron作业将其提起并解析。

I have a user model and posts model, with a default Feedjira set-up. 我有一个用户模型和一个帖子模型,具有默认的Feedjira设置。 I'm guessing I need a 'feeds' table in the user model which stores the URL's of the users desired RSS feeds and then passes them into Feedjira to be parsed? 我猜我在用户模型中需要一个“提要”表,该表存储用户所需的RSS提要的URL,然后将它们传递给Feedjira进行解析?

Pretty new at rails/ruby and would love some help/guidance on this matter. 在rails / ruby​​上还很新,希望在此问题上有所帮助/指导。

Thanks 谢谢

Once you have URL store in a table, or in a field of your User model, you can parse it in your rake task. 将URL存储在表或用户模型的字段中之后,就可以在rake任务中对其进行解析。

In your task, itinerates users, or feeds, and do that you did with one feed inside your loop. 在您的任务中,会遍历用户或提要,并使用循环中的一个提要来执行此操作。

So finally, let your cron job do the job for your at interval time. 因此,最后,让您的Cron作业在间隔时间内完成。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM