汤姆的联系人名单

cbuh的Python项目详细描述


安装Xapian和CBUH。在ArchLinux中,我这样做。

sudo pacman -S python2-xapian
sudo pip2 install cbuh

~/.cbuh/contacts格式保存联系人,格式如下。

[thomas.levine]
name = Thomas Levine
email = _@thomaslevine.com
phone = +1 831 713 1131
place = Scarsdale; Ithaca; New York; Oakland, California; Berlin, Germany
6birthday = 19900330

[someone.else]
email = someone@dada.pink
# ...

运行cbuh -h查看如何运行。(或看下面。)

usage: cbuh [-h] [-s] [-m] [-c path] [-d path] [-p path] [-i]
            [[search term] [[search term] ...]]

Query the contact list.

positional arguments:
  [search term]         The search terms, if you're running a search

optional arguments:
  -h, --help            show this help message and exit
  -s, --sort            Sort the contacts file by person identifier.
  -m, --mutt            Export the contact list as a mutt alias file.
  -c path, --contacts path
                        The contacts file
  -d path, --database path
                        The database directory
  -p path, --prefixes path
                        The prefixes file
  -i, --index           Index the contact list.

Search the contact list in ~/.cbuh/contacts. The search is an ordinary Xapian
query (http://xapian.org/docs/queryparser.html) with whatever prefixed terms
you like. I suggest these.

* id
* name
* email
* phone
* place

If you apply these prefixes, you search within that field only;
for example, "name:Francisco" searches for people with names like
"Francisco". Searching for simply "Francisco", on the other hand,
will also match everyone who lives in San Francisco.

Prefixes that start with digits 0 to 4 are treated as numeric values,
with the digit being the slot. For example, I use ``1want`` to
indicate how much I want to see someone, so I can search for people
I really want to see with ``want20..``.

Prefixes that start with digits 5 to 9 are treated as date values,
with the digit being the slot. For example, I use ``6born`` to indicate
when someone was born.

欢迎加入QQ群-->: 979659372 Python中文网_新手群

推荐PyPI第三方库


热门话题
Java类之间并发性不一致的HashMap   插件如何在JavaSwing中使用UIManager和Classloader从外部jar安装外观?   java JasperReports:找不到子报表   在项目中找不到java生成的Javadoc文件   java BigDecimal。multiply()和divide()方法返回十六进制数。为什么?   java统计出现次数并从字符串中删除重复项   调用运算符时发生java NullPointerException   Spring和Hibernate之间的java配置错误   JavaZK将用户重定向回上一页   Javasocket为传出连接指定特定的网络接口   如果拖动到某个区域外,java Make按钮操作将被取消   如何在Eclipse for selenium 3.141.59中添加Java文档链接   java从匹配条件的数组中获取所有索引   docker未连接到RemoteWebDriver的java Gitlab ci selenium测试   java重写run方法   utf 8如何使用java解码UTF8编码的字符串?   java如何从eclipse调试部署在tomcat上的web应用程序?   将字母字符与前面没有百分号的Java正则表达式匹配