Feature/cmd list terms #38

wants to merge 5 commits into


None yet

2 participants

agordon commented Jul 20, 2012


This is a proof-of-concept "list" command: it lists all the stored terms in the mu xapian database, with their type ( body/subject/from/to/uid/tag/) and their frequency.


$ ./mu/mu list
body    0   3
body    0.0 1
body    0.2 1
flag    u   11
msgid   500876e4_9060401_cshl_edu   1
msgid   50087ad7_1010005_cshl_edu   1
subject and 3
subject are 1
subject awk 1
subject bam 1
uid 1391647acbe22335    1
uid 359911bb72c55736    1
uid 57d140325497494d    1
tag revcomp 1
tag reverse 1
tag sam 1
tag seq 1

This will enable front-ends to build lists for auto-complete and such.

The patch isn't yet production quality, but any comments are welcomed.


djcb commented Jul 23, 2012

Ah -- that could be useful for debugging etc. Maybe 'inspect' would be a better name than 'list'?

agordon commented Jul 23, 2012

In this update:

  1. renamed "list" to "inspect"
 $ mu help inspect
 $ mu inspect
  1. allows user to inspect specific types:
 $ mu inspect body
 $ mu inspect from to cc bcc
  1. Allows user to list all available types:
 $ mu inspect --types

Or just specific types:

$ mu --types to from cc bcc
DB  find    ID  name
H   h   0   bcc
C   c   3   cc
F   f   6   from
T   t   12  to

Comments are welcomed,

djcb commented Jul 23, 2012

Hi Gordon,

Cool stuff! Couple of notes:

  • please check HACKING/Coding Style; there are a couple of deviations
  • the help section should actually go into mu-help-strings.txt; mu-help-strings.h is generated from that
  • feel free to put your own name in the (c) header of mu-cmd-inspect :)


djcb commented Aug 9, 2012

Hi Gordon!

Any update on this?

agordon commented Aug 9, 2012


I didn't get a chance yet to make those changes...

djcb commented Aug 9, 2012

No problem of course -- take your time ;-)

djcb commented May 14, 2013

Closing this -- but feel free to open a new issue if you get to implementing it, it looks interesting!

@djcb djcb closed this May 14, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment