火狐书签的本地文件_如何在Firefox中创建自定义智能书签文件夹

火狐书签的本地文件

火狐书签的本地文件

image

Have you ever wondered how the “Most Visited” bookmarks folder included with Firefox works? It’s not just a special-cased folder – it takes advantage of the Places database introduced in Firefox 3, and you can create your own smart bookmarks.

您是否想知道Firefox附带的“ Most Visited”书签文件夹如何工作? 它不仅是一个特殊情况的文件夹,它还利用了Firefox 3中引入的Places数据库,并且您可以创建自己的智能书签。

Firefox’s Places system stores your bookmarks and history in an SQLite database. Firefox includes a powerful query: syntax for working this this database, but this feature is all but hidden by default.

Firefox的Places系统将您的书签和历史记录存储在SQLite数据库中。 Firefox包含一个强大的查询:用于处理该数据库的语法,但是默认情况下该功能几乎全部隐藏。

保存搜索 (Saving a Search)

Firefox exposes a single way of creating a smart folder by default. To get started, open the Library window by selecting the Bookmarks or History option in the menu.

Firefox公开了默认情况下创建智能文件夹的一种方法。 首先,通过选择菜单中的“书签”或“历史记录”选项来打开“库”窗口。

image

Perform a search using the search box in the Library window. You can search both page titles and page URLs – for example, type “How-To Geek” to find all pages with How-To Geek in their title or type “howtogeek.com” to find all pages on the How-To Geek website.

使用“库”窗口中的搜索框执行搜索。 您可以搜索页面标题和页面URL,例如,键入“ How-To Geek”以查找标题中包含“ How-To Geek”的所有页面,或键入“ howtogeek.com”以查找How-To Geek网站上的所有页面。 。

image

You can have the smart bookmark search your bookmarks or history. After selecting Bookmarks or History, click the Save button and provide a name to save your search as a smart bookmark folder.

您可以让智能书签搜索您的书签或历史记录。 选择“书签”或“历史记录”后,单击“保存”按钮并提供名称以将搜索另存为智能书签文件夹。

image

Firefox creates the bookmark folder in your bookmarks menu by default, but you can place it anywhere you like – for example, on your bookmarks toolbar.

Firefox默认情况下在您的书签菜单中创建书签文件夹,但是您可以将其放置在任意位置,例如,在书签工具栏上。

image

Firefox automatically updates the smart bookmark folder – it’s just a database query, like a smart playlist in iTunes. If you’ve been following along, you now have a smart bookmark folder that displays the pages you’ve recently visited on How-To Geek.

Firefox自动更新智能书签文件夹–只是数据库查询,就像iTunes中的智能播放列表一样。 如果您一直在关注,那么您现在将拥有一个智能书签文件夹,该文件夹显示您最近在How-To Geek上访问过的页面。

image

使用扩展 (Using an Extension)

To get at the advanced functionality, you can write places URIs yourself – but most users will probably want an easy-to-use graphical interface. Mozilla doesn’t provide one, so you’ll have to install an extension like SearchPlaces.

为了获得高级功能,您可以自己编写场所URI,但是大多数用户可能希望使用易于使用的图形界面。 Mozilla不提供此功能,因此您必须安装SearchPlaces之类的扩展程序。

After you install the extension and restart Firefox, you’ll see a new SearchPlaces option in your Bookmarks menu.

安装扩展程序并重新启动Firefox后,您将在“书签”菜单中看到一个新的SearchPlaces选项。

image

SearchPlaces provides a graphical interface for creating new smart bookmarks and editing existing ones. It exposes much of the power left out of Firefox’s default interface.

SearchPlaces提供了一个图形界面,用于创建新的智能书签和编辑现有的智能书签。 它充分展现了Firefox默认界面所没有的功能。

image

SearchPlaces offers a lot of options for constructing your Places URI. For example, here we’re searching for pages containing the word “Android” that have been visited between 10 and 20 times. We could also specify a time range the web pages were visited between, although this is a bit complex to do – you have to specify a number of seconds from a relative time.

SearchPlaces提供了许多用于构建Places URI的选项。 例如,在这里我们要搜索包含“ Android”一词的页面,这些页面已被访问10到20次。 我们也可以指定访问网页的时间范围,尽管这样做有点复杂-您必须指定相对时间的秒数。

However, you can easily specify “today” as a time range. Set the relative time to “Midnight this morning” and enter “0” as the time.

但是,您可以轻松地将“今天”指定为时间范围。 将相对时间设置为“今天午夜”,然后输入“ 0”作为时间。

image

To edit a smart bookmark folder that comes with Firefox, select it and click the Edit button.

要编辑Firefox随附的智能书签文件夹,请选择它并单击“编辑”按钮。

image

SearchPlaces shows you each smart bookmark’s place: URI. Firefox hides these in the default interface – presumably to avoid scaring inexperienced users.

SearchPlaces向您显示每个智能书签的位置:URI。 Firefox将它们隐藏在默认界面中-大概是为了避免吓到没有经验的用户。

image

编写场所URI (Writing Places URIs)

Mozilla provides a detailed guide to place: query URIs on the Mozilla Developer Network website. There are a wide variety of options that you can use to construct complex query URIs.

Mozilla提供了详细的放置指南:在Mozilla开发人员网络网站上查询URI 。 您可以使用多种选项来构造复杂的查询URI。

For example, let’s say we want to create a smart bookmark folder showing all the pages we’ve visited on How-To Geek today, sorted in alphabetical order. This is the query string we’d use:

例如,假设我们要创建一个智能书签文件夹,其中显示了我们今天在How-To Geek上访问过的所有页面,并按字母顺序排序。 这是我们要使用的查询字符串:

place:terms=howtogeek.com&beginTimeRef=1&beginTime=0&sort=1

地点:terms = howtogeek.com&beginTimeRef = 1&beginTime = 0&sort = 1

There are four parts to this query:

此查询分为四个部分:

  • terms=howtogeek.com – Searches for the term “howtogeek.com”.

    term = howtogeek.com –搜索术语“ howtogeek.com”。
  • beginTimeRef=1 – The begin time is relative to midnight this morning.

    beginTimeRef = 1 –开始时间是相对于今天上午的午夜。
  • beginTime=0 – The “0” is a special value that includes all results since the relative time. In this case, it matches all results since midnight this morning – that is, all pages visited today.

    beginTime = 0 –“ 0”是一个特殊值,包括自相对时间以来的所有结果。 在这种情况下,它会匹配自今天午夜以来的所有结果,即今天访问的所有页面。
  • sort=1 – Orders results in alphabetical order.

    sort = 1 –顺序按字母顺序排列。

Once you have a query URI, create a new bookmark from the Library window or Bookmarks menu.

获得查询URI后,从“库”窗口或“书签”菜单中创建一个新书签。

image

Name the bookmark and use the place: URI as the bookmark’s address.

为书签命名,并使用场所:URI作为书签的地址。

image

Due to an apparent bug, you can’t create a smart bookmark directly on the browser toolbar. Firefox will treat it like a normal bookmark instead of noticing the place: URI and treating it properly.

由于存在明显的错误,您不能直接在浏览器工具栏上创建智能书签。 Firefox会将其视为普通书签,而不是注意该位置:URI并对其进行适当处理。

image

Create it elsewhere – such as in your bookmarks menu — and drag and drop it onto the toolbar. Firefox will notice it’s a smart bookmark.

在其他地方(例如在书签菜单中)创建它,并将其拖放到工具栏上。 Firefox将注意到这是一个智能书签。

image


Firefox’s Places database hides a lot of power – it could be a killer feature for some people, but most will never notice it’s there.

Firefox的Places数据库具有强大的功能-对于某些人来说,它可能是一个杀手级功能,但大多数人永远不会注意到它的存在。

翻译自: https://www.howtogeek.com/111820/how-to-create-custom-smart-bookmarks-folders-in-firefox/

火狐书签的本地文件

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值