微型摘要-Über简单联合

I'm still not quite sure why Microsummaries are useful...seems like USS (Über Simple Syndication - my term) to me. I've been meaning to add this to my blog since I heard about it a few months ago, but then MikeG added microsummaries to his site and I figured if a Luddite like Mike would support this emerging format, then I would too. :)

我仍然不太确定为什么Microsummaries有用...似乎对我来说就像USS( Über简单联合组织,我的术语)。 自几个月前听说以来,我一直想将其添加到我的博客中,但是MikeG在他的网站上添加了微摘要,我想知道像Mike这样的Luddite是否会支持这种新兴格式,我也会这样做。 :)

Basically this is how it works:

基本上是这样的:

  • Add a <link> tag inside the <head> of your document like this.

    像这样在文档的<head>内添加<link>标记。
  • In your Microsummary endpoint, return some text/plain with the text you want to show up in the live bookmark.

    在您的Microsummary端点中,返回一些文本/纯文本以及要在实时书签中显示的文本。
  • In FireFox Beta 2, either bookmark this site, or drag a link to this site to your toolbar:

    在FireFox Beta 2中,可以将此站点添加为书签,或将指向该站点的链接拖动到工具栏上:

    Hanselmanmicrosummaries
  • If you've created the link in your toolbar, right click and select Properties and pick the Microsummary (or "Live Title"). If you've created the link via Add Bookmark, you should already be at this dialog.

    如果您已经在工具栏中创建了链接,请右键单击并选择“属性”,然后选择“摘要”(或“实时标题”)。 如果您已经通过“添加书签”创建了链接,那么您应该已经在此对话框中。
  • Once the Microsummary has been selected, it will show up as the title of your bookmark or toolbar button.

    选择了“摘要”后,它将显示为书签或工具栏按钮的标题。

This is easy to do to any ASP.NET site. Add an very basic HttpHandler with code like this:

这对于任何ASP.NET站点都是很容易做到的。 使用以下代码添加一个非常基本的HttpHandler:

using System;

使用系统;

using System.Web;

使用System.Web;

namespace Foo.Web.Services

命名空间Foo.Web.Services

{

{

    public class MicrosummaryHandler : IHttpHandler

公共类MicrosummaryHandler:IHttpHandler

    {

{

        public MicrosummaryHandler() {}

公共MicrosummaryHandler(){}

        public bool IsReusable{get{return true;}}

公共布尔IsReusable { get { return true ;}}

        public void ProcessRequest( HttpContext context )

公共无效ProcessRequest(HttpContext context)

        {

{

             context.Response.Write("Yay Microsummaries...get your summaries here. Get them anywhere.");

context.Response.Write(“是的,摘要...在这里获取您的摘要。在任何地方获取它们。”);

        }

}

    }

}

}

}

And add it to your web.config, of course:

并将其添加到您的web.config中,当然:

<httpHandlers>
            <add verb="*" path="microsummary.ashx"
                      type="Foo.Web.Services.MicrosummaryHandler, 
                            Foo.Web.Services" />
</httpHandlers>

<httpHandlers> <添加动词=“ *” path =“ microsummary.ashx” type =“ Foo.Web.Services.MicrosummaryHandler, Foo.Web.Services“ /> </ httpHandlers>

You can also use Microsummary Generators that are basically formalized screenscraping of existing (x)HTML. You make an XSLT that yanks what you want and turns that into plain text suitable for a toolbar button.

您还可以使用Microsummary生成器,这些生成器基本上是对现有(x)HTML进行形式化的屏幕截图。 您制作了一个XSLT,该XSLT可以提取您想要的内容,并将转换为适合工具栏按钮的纯文本。

Direct (free) support for this has been checked into DasBlog and will be in the daily builds if we ever get this g*dforsaken thing to ship. :)

直接(免费)支持对此已经在DasBlog中进行了检查,如果我们可以将此g * dforsaken发货,它将被添加到每日构建中。 :)

翻译自: https://www.hanselman.com/blog/microsummaries-Über-simple-syndication

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值