angular pipes_使用Yahoo Pipes和IFTTT监视您需要的新闻

angular pipes

angular pipes

pipes_ifttt_0

Automation is great. Anything that can be done to reduce the amount of effort needed to achieve a goal is to be welcomed with open arms. We have looked at various tools that can be used to automate tasks you might carry out on a regular basis, including using Wappwolf to automate cloud storage and using IFTTT to automate backups.  Now we’ll show how IFTTT can be used in conjunction with Yahoo Pipes to create custom news feeds and alerts.

自动化很棒。 任何可以减少实现目标所需的精力的事情,都应张开双臂欢迎。 我们已经研究了可用于自动化您可能定期执行的任务的各种工具,包括使用Wappwolf自动化云存储和使用IFTTT自动化备份。 现在,我们将展示如何将IFTTT与Yahoo Pipes结合使用以创建自定义新闻源和警报。

Yahoo Pipes is an often overlooked tool that can be used to bend and shape news feeds to meet your requirements. Even if there is a website you’re particularly keen on and you have taken the step of subscribing to its RSS feed, it is unlikely you’re going to be interested in every single post that is made – there may be some topics that you would like to avoid altogether.

Yahoo Pipes是一个经常被忽略的工具,可用于弯曲和调整新闻源的形状以满足您的要求。 即使有一个您特别热衷的网站,并且已经采取了订阅其RSS feed的步骤,您也不大可能会对所发表的每一篇帖子都感兴趣–可能会有一些主题希望完全避免。

pipes_ifttt_1

Used on its own, Yahoo Pipes can be used to create your own custom RSS feeds. It is possible to combine multiple feeds from different sites into a single feed, and each separate feed can be filtered in a number of ways.

Yahoo Pipes可单独使用,可用于创建自己的自定义RSS feed。 可以将来自不同站点的多个提要合并为一个提要,并且可以通过多种方式过滤每个单独的提要。

What this means is that it is possible to follow a site’s feed, but ensure that you only see the content you are interested in. Only interested in Android news? Set up a filter so that only Android related stories reach you. Want to know about everything but Linux? Build a pipe that filters out Linux related news.

这意味着可以跟踪网站的提要,但要确保您只看到自己感兴趣的内容。只对Android新闻感兴趣? 设置过滤器,以便只有与Android相关的故事才能找到您。 是否想了解除Linux之外的所有信息? 建立一个管道,以过滤掉与Linux有关的新闻。

建立管道 (Build A Pipe)

Head over to the Yahoo Pipes website and sign into an existing Yahoo account, or create a new one (it’s also possible to sign in with Google and Facebook credentials). Click the ‘Create a pipe’ button at the top of the page and drag a Fetch Feed module from the Source section to the left onto the workspace.

转到Yahoo Pipes网站并登录现有的Yahoo帐户,或创建一个新帐户(也可以使用Google和Facebook凭据登录)。 单击页面顶部的“创建管道”按钮,然后将“提取提要”模块从“源”部分向左拖到工作区中。

pipes_ifttt_2

Enter the URL of an RSS feed you’d like to work with – you can add several, so don’t spend ages deciding which one is going to be best. Each Fetch Feed module can be used to house  a single RSS feed, so  just keep adding as many as you need.

输入您想使用的RSS feed的URL –您可以添加多个RSS feed,所以不要花很多时间来决定哪个是最好的。 每个提取提要模块都可以用来容纳单个RSS提要,因此只需添加所需数量即可。

The point of creating a pipe is to design a feed that contains just the news you’re interested in, and this is where filtering comes into play. Expand the Operators section to the left and drag a Filter module onto the workspace – you can add one for each news feed you have added.

创建管道的关键是设计一个仅包含您感兴趣的新闻的提要,这就是过滤起作用的地方。 展开左侧的“操作员”部分,然后将“过滤器”模块拖到工作区中-您可以为已添加的每个新闻提要添加一个。

pipes_ifttt_3

For this article, we’re going to filter news feeds so that only stories about iOS 7 and Play Station 4 are displayed. Select Permit from the first drop down menu in the Filter module and select ‘any’ from the second.

对于本文,我们将过滤新闻提要,以便仅显示有关iOS 7和Play Station 4的故事。 从“过滤器”模块的第一个下拉菜单中选择“允许”,然后从第二个菜单中选择“任意”。

Set the first field to ‘item.title’ make sure that the second field is set to Contains and then use the final field to specify your search or filter terms. You can add more filters by clicking the + icon next to Rules to build up a custom feed for individual sites.

将第一个字段设置为“ item.title”,确保将第二个字段设置为“包含”,然后使用最后一个字段指定搜索或过滤条件。 您可以通过单击“规则”旁边的+图标来添加更多过滤器,以为各个网站建立自定义供稿。

pipes_ifttt_4

Having set up filters for one feed, the Filter module needs to be connected to the relevant Fetch Feed module. This can be done by simply dragging the node at the bottom of Fetch Feed to the node at the top of Filter.

为一个Feed设置好过滤器后,需要将Filter模块连接到相关的Fetch Feed模块。 只需将“提取提要”底部的节点拖动到“过滤器”顶部的节点即可完成。

Set up all of the filters you would like to use for each of the feeds you have chosen to work with and make sure that all of the modules are linked to allow for filtering. It is possible to combine feeds before filtering, but this does not allow for such finely grained filtering; you may not be interested in news about both iOS7 and Play Station 4 from one particular site, for instance.

设置要用于选择的每个提要的所有过滤器,并确保所有模块都已链接以允许过滤。 可以在过滤之前合并提要,但这不允许进行这种细粒度的过滤。 例如,您可能对某个特定站点上有关iOS7和Play Station 4的新闻不感兴趣。

pipes_ifttt_5

Complete your pipe by dragging a Union module from the Operators section to the left and then linking it up to each of the Filter modules. The Union Module also needs to be connected to the top of the Pipe Output at the bottom of the workspace.

通过从“操作员”部分向左拖动“联合”模块,然后将其链接到每个“过滤器”模块,完成管道。 工会模块还需要连接到工作空间底部管道输出的顶部。

pipes_ifttt_6

Click Save at the upper right of the page, enter a name for the Pipe and click Save. With the pipe saved, click the Run Pipe link that appears at the very top of the page. You can then grab the newly created RSS feed from the ‘Get as RSS’ link.

单击页面右上方的“保存”,输入管道的名称,然后单击“保存”。 保存管道后,单击页面顶部显示的“运行管道”链接。 然后,您可以从“获取为RSS”链接中获取新创建的RSS feed。

使用IFTTT进行监视 (Monitoring With IFTTT)

You could use the likes of Google Reader to manually monitor your feed, but you can also make use of IFTTT so you can be alerted when new articles appear. Pay a visit to the IFTTT website and log into or create an account. Click the Create link at the top of the page.

您可以使用Google阅读器之类的工具手动监视您的供稿,但也可以使用IFTTT,以便在出现新文章时向您发出警报。 访问IFTTT网站并登录或创建一个帐户。 点击页面顶部的创建链接。

pipes_ifttt_7

Click ‘this’ and then click the Feed icon. As we’re interested in being notified when articles matching specific terms appear, click ‘New feed item matches’. Selecting this option opens up the possibility of creating multiples rules to deal with different types of article – you may want to be notified via email of news stories about iOS 7, but you may prefer to add PS4 related stories to Instapaper.

点击“此”,然后点击Feed图标。 由于我们希望在出现与特定术语匹配的文章时收到通知,因此请点击“新供稿项目匹配”。 选择此选项可以创建创建多个规则以处理不同类型的文章的可能性–您可能希望通过电子邮件收到有关iOS 7的新闻报道的通知,但您可能希望将与PS4相关的报道添加到Instapaper中。

Enter the term that should be used as the trigger and then paste in the URL of the RSS feed created in Yahoo Pipes. Click Create Trigger.

输入应该用作触发器的术语,然后粘贴在Yahoo Pipes中创建的RSS feed的URL。 单击创建触发器。

pipes_ifttt_8

Click the ‘that’ link followed by Email. Click ‘Send me an email’, choose how the email should be formatted and click Create Action (the email will be sent to the address associated with your IFTTT account). Enter a description and click Create.

点击“那个”链接,然后点击电子邮件。 单击“向我发送电子邮件”,选择电子邮件的格式,然后单击“创建操作”(电子邮件将发送到与您的IFTTT帐户关联的地址)。 输入描述,然后单击创建。

You can then repeat the process, this time selecting the Feed trigger and Instapaper action for articles that include reference to PS4, or whatever you have tailored your feed towards.

然后,您可以重复该过程,这次为包含PS4引用或针对您的feed进行了调整的文章选择Feed触发器和Instapaper操作。

Have you managed to find a great use for IFTTT and Yahoo Pipes? Share your thoughts in the commends below.

您是否设法为IFTTT和Yahoo Pipes找到了很好的用途? 在下面的建议中分享您的想法。

翻译自: https://www.howtogeek.com/139441/monitor-the-news-you-need-with-yahoo-pipes-and-ifttt/

angular pipes

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Angular中的@Input和@Output是用来实现组件之间通信的注解。 @Input用来接收父组件传递过来的数据,而@Output则用来向父组件传递数据。 下面是它们的使用方法: 1. @Input 在子组件中使用@Input注解来接收父组件传递的数据。例如: ``` import { Component, Input } from '@angular/core'; @Component({ selector: 'child-component', template: ` <div>{{data}}</div> ` }) export class ChildComponent { @Input() data: string; } ``` 在父组件中使用属性绑定的方式将数据传递给子组件。例如: ``` import { Component } from '@angular/core'; @Component({ selector: 'parent-component', template: ` <child-component [data]="myData"></child-component> ` }) export class ParentComponent { myData = 'Hello world'; } ``` 2. @Output 在子组件中使用@Output注解来定义一个事件。例如: ``` import { Component, Output, EventEmitter } from '@angular/core'; @Component({ selector: 'child-component', template: ` <button (click)="onClick()">Click me</button> ` }) export class ChildComponent { @Output() clicked = new EventEmitter<void>(); onClick() { this.clicked.emit(); } } ``` 在父组件中使用事件绑定的方式监听子组件的事件。例如: ``` import { Component } from '@angular/core'; @Component({ selector: 'parent-component', template: ` <child-component (clicked)="onChildClicked()"></child-component> ` }) export class ParentComponent { onChildClicked() { console.log('Child component clicked'); } } ``` 这样就实现了子组件向父组件传递数据的功能。

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值