Switch to unified view

a/src/python/samples/mutt-recoll.py b/src/python/samples/mutt-recoll.py
...
...
5
This is a recoll version of the original mutt-notmuch script.
5
This is a recoll version of the original mutt-notmuch script.
6
6
7
It will interactively ask you for a search query and then symlink the matching
7
It will interactively ask you for a search query and then symlink the matching
8
messages to $HOME/.cache/mutt_results.
8
messages to $HOME/.cache/mutt_results.
9
9
10
Add this to your muttrc.
10
Add this to your .muttrc.
11
11
12
macro index / "<enter-command>unset wait_key<enter><shell-escape>mutt-recoll.py<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
12
macro index / "<enter-command>unset wait_key<enter><shell-escape>mutt-recoll.py<enter><change-folder-readonly>~/.cache/mutt_results<enter>" \
13
          "search mail (using recoll)"
13
          "search mail (using recoll)"
14
14
15
This script overrides the $HOME/.cache/mutt_results each time you run a query.
15
This script overrides the $HOME/.cache/mutt_results each time you run a query.
...
...
102
    (options, args) = p.parse_args()
102
    (options, args) = p.parse_args()
103
103
104
    if args:
104
    if args:
105
        dest = args[0]
105
        dest = args[0]
106
    else:
106
    else:
107
        dest = '~/.cache/mutt_results'
107
        dest = os.path.expanduser('~/.cache/mutt_results')
108
        if not os.path.exists(dest):
108
        if not os.path.exists(dest):
109
            os.makedirs(dest)
109
            os.makedirs(dest)
110
        
110
        
111
    # Use expanduser() so that os.symlink() won't get weirded out by tildes.
111
    # Use expanduser() so that os.symlink() won't get weirded out by tildes.
112
    main(os.path.expanduser(dest).rstrip('/'), options.gmail)
112
    main(os.path.expanduser(dest).rstrip('/'), options.gmail)