diff --git a/www/cheatsheet.md b/www/cheatsheet.md deleted file mode 100644 index 3ff6553f..00000000 --- a/www/cheatsheet.md +++ /dev/null @@ -1,148 +0,0 @@ ---- -layout: default -permalink: code/mu/cheatsheet.html ---- - -# Mu Cheatsheet - - Here are some tips for using `mu`. If you want to know more, please - refer to the `mu` man pages. For a quick warm-up, there's also the - `mu-easy` man-page. - -## Indexing your mail -``` $ mu index``` - -If `mu` did not guess the right Maildir, you can set it explicitly: - -``` $ mu index --maildir=~/MyMaildir``` - -### Excluding directories from indexing - -If you want to exclude certain directories from being indexed (for example, -directories with spam-messages), put a file called `.noindex` in the directory -to exclude, and it will be ignored when indexing (including its children) - -## Finding messages - -After you have indexed your messages, you can search them. Here are some -examples. Also note the `--threads` argument to get a threaded display of -the messages, and `--color` to get colors (both since 0.9.7). - -### messages about Helsinki (in message body, subject, sender, ...) -``` $ mu find Helsinki``` - -### messages to Jack with subject jellyfish containing the word tumbleweed -``` $ mu find to:Jack subject:jellyfish tumbleweed``` - -### messages between 2 kilobytes and a 2Mb, written in December 2009 with an attachment from Bill -``` $ mu find size:2k..2m date:20091201..20093112 flag:attach from:bill``` - -### signed messages about apples *OR* oranges -``` $ mu find flag:signed apples OR oranges``` - -### messages about yoghurt in the Sent Items folder (note the quoting): -``` $ mu find maildir:'/Sent Items' yoghurt``` - - -### unread messages about things starting with 'soc' (soccer, society, socrates, ...) -``` $ mu find 'subject:soc*' flag:unread``` - -Note, the '*' only works at the /end/ of a search term, and you need to -quote it or the shell will interpret it before `mu` sees it. -(searching using the '*' wildcard is available since mu 0.9.6) - -### finding messages with images as attachment -``` $ mu find 'mime:image/*' ``` - (since mu version 0.9.8) - -### finding messages with 'milk' in one of its text parts (such as text-based attachments): -``` $ mu find embed:milk ``` - (since mu version 0.9.8) - -### finding /all/ your messages -``` $ mu find ""``` - (since mu version 0.9.7) - -## Finding contacts - -Contacts (names + email addresses) are cached separately, and can be -searched with `mu cfind` (after your messages have been indexed): - -### all contacts with 'john' in either name or e-mail address -``` $ mu cfind john``` - - `mu cfind` takes a regular expression for matching. - -You can export the contact information to a number of formats for use -in e-mail clients. For example: - -### export /all/ your contacts to the `mutt` addressbook format -``` $ mu cfind --format=mutt-alias``` - -Other formats are: `plain`, `mutt-ab`, `wl` (Wanderlust), `org-contact`, -`bbdb` and `csv` (comma-separated values). - -## Retrieving attachments from messages - -You can retrieve attachments from messages using `mu extract`, which takes a -message file as an argument. Without any other arguments, it displays the -MIME-parts of the message. You can then get specific attachments: - -``` $ mu extract --parts=3,4 my-msg-file``` - -will get you parts 3 and 4. You can also extract files based on their name: - -``` $ mu extract my-msg-file '.*\.jpg'``` - -The second argument is a case-insensitive regular expression, and the command -will extract any files matching the pattern -- in the example, all -`.jpg`-files. - -Do not confuse the '.*' /regular expression/ in `mu extract` (and `mu -cfind`) with the '*' /wildcard/ in `mu find`. - -## Getting more colorful output - -Some of the `mu` commands, such as `mu find`, `mu cfind` and `mu view` -support colorized output. By default this is turned off, but you can enable -it with `--color`, or setting the `MU_COLORS` environment variable to -non-empty. - -``` $ mu find --color capibara``` - - (since `mu` version 0.9.6) - -## Integration with mail clients - -The `mu-find` man page contains examples for `mutt` and `wanderlust`. And -since version 0.9.8, `mu` includes its own e-mail client for `emacs`, `mu4e`. - -## Viewing specific messages - -You can view message contents with `mu view`; it does not use the database -and simply takes a message file as it's argument: - -``` $ mu view ~/Maildir/inbox/cur/message24``` - -You can also use `--color` to get colorized output, and `--summary` to get a -summary of the message contents instead of the whole thing. - -## Further processing of matched messages - -If you need to process the results of your queries with some other program, -you can return the results as a list of absolute paths to the messages found: - -For example, to get the number of lines in all your messages mentioning -/banana/, you could use something like: - -``` $ mu find --exec='wc -l'``` - -Note that we use 'l', so the returned message paths will be quoted. This is -useful if you have maildirs with spaces in their names. - -For further processing, also the ~--format`(xml|sexp)~ can be useful. For -example, - -``` $ mu find --format=xml pancake``` - -will give you a list of pancake-related messages in XML-format. diff --git a/www/graph01.png b/www/graph01.png deleted file mode 100644 index 327e0795..00000000 Binary files a/www/graph01.png and /dev/null differ diff --git a/www/index.md b/www/index.md deleted file mode 100644 index 0c68380b..00000000 --- a/www/index.md +++ /dev/null @@ -1,190 +0,0 @@ ---- -layout: default -permalink: /code/mu/ ---- - -# Welcome to mu! - - With the *enormous* amounts of e-mail many people -gather and the importance of e-mail messages in our daily work-flow, it is very important to be able -to quickly deal with all that - in particular, to instantly find that one important e-mail you need -right now. - -For that, *mu* was created. *mu* is a tool for dealing with e-mail messages stored in the -[Maildir](http://en.wikipedia.org/wiki/Maildir)-format, on Unix-like systems. *mu*'s main purpose is -to help you to find the messages you need, quickly; in addition, it allows you to view messages, -extract attachments, create new maildirs, ... See the [mu cheatsheet](cheatsheet.html) for some -examples. Mu's source code is available [in github](https://github.com/djcb/mu), and there is the -[mu-discuss](http://groups.google.com/group/mu-discuss) mailing list. - -*mu* includes an emacs-based e-mail client (`mu4e`), a simple GUI (`mug`) and bindings for the -Guile/Scheme programming language. - -## Features - -- fast indexing for [Maildir](http://en.wikipedia.org/wiki/Maildir), Maildir+ and Maildir-on-VFAT -- search for messages based on the sender, receiver, subject, date-range, -size, priority, words in message, flags (signed, encrypted, new, replied, -has-attachment,...), message-id, maildir, tags, attachment (name, -mime-type, text) and more -- support for encrypted and signed messages -- command-line tools for indexing, searching, viewing, adding/removing -messages, extracting attachments, exporting/searching address lists, -creating maildirs, ... -- accent/case normalization - so *angstrom* matches *Ångström* -- can be integrated with other e-mail clients such as -[mutt](http://www.mutt.org/) and -[Wanderlust](http://www.emacswiki.org/emacs/WanderLust). -- [mu4e](mu4e.html), an emacs-based e-mail client based on `mu` (see screenshot). -- [mu-guile](mu-guile.html): -[guile 2.0](http://www.gnu.org/software/guile/) bindings that -allow for scripting, advanced processing of your data, and doing -all kinds of statistics -- fully documented (man pages, info pages) - -## News - -### 2021-07-27: mu/mu4e 1.6 is available - -A new release is available; [release notes](https://github.com/djcb/mu/releases/tag/1.6) and -grab the [tarball](https://github.com/djcb/mu/releases/download/1.6.10/mu-1.6.10.tar.xz) (latest 1.6.x release). - -### 2020-04-18: mu/mu4e 1.4 is available - -A new release is available; [release notes](https://github.com/djcb/mu/releases/tag/1.4) and -grab the [tarball](https://github.com/djcb/mu/releases/download/1.4.15/mu-1.4.15.tar.xz) (latest 1.4.x release). - - -### 2019-04-07: mu/mu4e 1.2 is available - -A new release is available; see the [release notes](https://github.com/djcb/mu/releases/tag/1.2) and -grab the [tarball](https://github.com/djcb/mu/releases/download/1.2/mu-1.2.0.tar.xz). - - -### 2018-02-03: mu/mu4e 1.0 is available - -After a decade of development, mu 1.0 is available. Read -[NEWS](https://github.com/djcb/mu/blob/v1.0/NEWS.org) with all the details. - -### 2016-12-05: mu/mu4e 0.9.18 is available - -mu 0.9.18 offers a number of improvements across the board. For -example, people with huge maildirs can use a special "lazy-checking" -mode to speed up indexing; it's now possible to view rich-text message -in an embedded webkit-view, and the release adds support for org-mode -9.x. There also many small fixes and tweaks in mu4e, all based on -user-feedback. - -For all the details, -see: [NEWS.org](https://github.com/djcb/mu/blob/0.9.18/NEWS.org). - -Get it from the [Release page](https://github.com/djcb/mu/releases). - -### 2016-01-21: mu/mu4e 0.9.16 is here, and it is our latest stable release! - -#### Better behaviour and context handling -- Context Handling just got smart: new ‘mu4e-context’ defines and switches between various contexts, which are groups of settings. This may be used for instance to easily configure and switch between multiple accounts. -- Improved behaviour in html and messages marks: ability to toggle between html and text display of messages & better management of messages marked as read or unread. - -#### User Interface improvements -- Numerous improvements in threads view and mailing lists management -- Fancy characters can now be properly used as well as special customizations for message views - -#### Faster Indexing and message management -- Indexing & caching optimizations - -You can grab the tarball directly -[from Github](https://github.com/djcb/mu-releases) or wait a bit to -get it through your distribution channels (details may vary from one -distribution to another). - -None of this would be possible without a team of dedicated -individuals: Adam Sampson, Ævar Arnfjörð Bjarmason, Bar Shirtcliff, -Charles-H. Schulz, Clément Pit--Claudel, Damien Cassou, Declan Qian, -Dima Kogan, Dirk-Jan C. Binnema, Foivos, Foivos S. Zakkak, Hinrik Örn -Sigurðsson, jeroen tiebout, JJ Asghar, Jonas Bernoulli, Jun Hao, -Martin Yrjölä, Maximilian Matthé, Piotr Trojanek, prsarv, Thierry -Volpiatto, Titus von der Malsburg (and of course all people who -reported issues, provided suggestions etc.) - -We hope you will enjoy this release as much as we do. Happy Hacking! - --- The mu/mu4e Team - -## Old News - -- 2015-09-24: After almost 6 months, a new release of mu/mu4e. We are -happy to announce mu and mu4e 0.9.9.13! have just been -released. The following key features and improvements have been -added: - -* Change the way the headers are displayed and sorted -* Fancy characters now enabled distinctively both for marks and -headers -* Composing a message is now possible in a separate frame -* Ability to display the subject of a thread only on top of it for -enhanced clarity -* Lots of bugs squashed, updates to the documentation (BDDB), as -well as embedding the News file inside mu4e itself. - - -- 2013-03-30: released [mu-0.9.9.5](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.9.5.tar.gz); full with new features and bug -fixes – see the download link for some of the details. Many -thanks to all who contributed! -- 2012-10-14: released [mu-0.9.9](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.9.tar.gz); a new barrage of fixes and -improvements – check the link and [NEWS](https://github.com/djcb/mu/blob/master/NEWS). Also, note the -[mu4e-manual](http://code.google.com/p/mu0/downloads/detail?name%3Dmu4e-manual-0.9.9.pdf) (PDF). -- 2012-07-01: released [mu-0.9.8.5](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.5.tar.gz); more fixes, improvements (see -the link). -- 2012-05-08: released -[mu-0.9.8.4](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.4.tar.gz) -with even more improvements (the link has all the details) -- 2012-04-06: released -[mu-0.9.8.3](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.3.tar.gz), -with many improvements, fixes. See the link for details. *NOTE*: -existing `mu` and `mu4e` users are recommended to execute `mu -index --rebuild` after installation. -- 2012-03-11: released -[mu-0.9.8.2](http://code.google.com/p/mu0/downloads/detail?name=mu-0.9.8.2.tar.gz), -with a number of fixes and improvements, see the link for the -details. -- 2012-02-17: released -[mu-0.9.8.1](http://code.google.com/p/mu0/downloads/detail?name%3Dmu-0.9.8.1.tar.gz), -which has a number of improvements to the 0.9.8 release: add mark -as read/unread, colorize cited message parts, better handling of -text-based message parts, documentation fixes, documentation -updates and a few fixes here and there -- 2012-02-09: moved the mu source code repository -[to Github](https://github.com/djcb/mu). -- 2012-01-31: finally, -[mu-0.9.8](http://mu0.googlecode.com/files/mu-0.9.8.tar.gz) is -available. It comes with an emacs-based e-mail client, -[mu4e](file:mu4e.html), and much improved -[guile bindings](file:mu-guile.html). Furthermore, It adds -search for attachment mime type and search inside any text part -of a message, more tests, improvements in many parts of the code. -- 2011-09-03: mu 0.9.7 is now available; compared to the -pre -version there are a few small changes; the most important one is -a fix specifically for running mu on MacOS. - -- [Old news](file:old-news.org) - -## Development & download - - - -Some Linux-distributions already provide pre-built mu packages; if -there's no packagage for your distribution, or if you want the -latest release, you can [download mu source packages](http://code.google.com/p/mu0/downloads/list) from Google -Code. In case you find a bug, or have a feature requests, please -use the [issue tracker](https://github.com/djcb/mu/issues). - -If you'd like to work with the mu source code, you can find it [in Github](https://github.com/djcb/mu); -also, see the notes on [HACKING](https://github.com/djcb/mu/blob/master/HACKING) the mu source code. - -There's also a [mailing list](http://groups.google.com/group/mu-discuss). - -## License & Copyright - -*mu* was designed and implemented by Dirk-Jan C. Binnema, and is Free -Software, licensed under the GNU GPLv3 diff --git a/www/mu-guile.md b/www/mu-guile.md deleted file mode 100644 index 168afc30..00000000 --- a/www/mu-guile.md +++ /dev/null @@ -1,164 +0,0 @@ ---- -layout: default -permalink: /code/mu/mu-guile.html ---- - -# mu-guile - -Starting from version 0.9.7, -[GNU/Guile](http://www.djcbsoftware.nl/code/mu][mu]] had experimental -bindings for the -[[http://www.gnu.org/software/guile/) programming language, which is a version of the [Scheme](http://en.wikipedia.org/wiki/Scheme_(programming_language)) -programming language, specifically designed for extending existing -programs. - -`mu` version 0.9.8 has much improved bindings, and they are -[documented](file:mu-guile/index.html), with many examples. You can -find more examples in the `guile/examples` directory of the `mu` -source package. - -It must be said that Scheme (and in general, languages from the Lisp-family) -initially may look a bit 'strange' -- all these parentheses etc.; so please -bear with us -- you will get used to it. - -## Some examples - -Here are some examples; we don't provide too much explanation /how/ they do -what they do, but the [manual](file:mu-guile/index.html) takes you through that, step-by-step. - -*NOTE (1)*: if you get errors like `ERROR: no code for module (mu)`, -`guile` cannot find the `mu` modules. To solve this, you need to set -the `GUILE_LOAD_PATH` to the directory with the installed `mu.scm`, -e.g. - -``` sh - export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.0" -``` - -(you need to adapt this if you installed `mu` in some non-standard place; but -it's always the directory with the installed `mu.scm`). - -*NOTE (2)*: for the graphs (below) to work, you will need to have the `gnuplot` -program installed. - -*NOTE (3)*: the examples below assume that you have your messages indexed -already using `mu`; see the man pages, or the [mu cheat sheet](http://www.djcbsoftware.nl/code/mu/cheatsheet.html). - -### Messages per weekday - - #!/bin/sh - exec guile -s $0 $@ - !# - - (use-modules (mu) (mu message) (mu stats) (mu plot)) - (mu:initialize) - - ;; create a list like (("Mon" . 13) ("Tue" . 23) ...) - (define weekday-table - (mu:weekday-numbers->names - (sort - (mu:tabulate-messages - (lambda (msg) - (tm:wday (localtime (mu:date msg))))) - (lambda (a b) (< (car a) (car b)))))) - - (for-each - (lambda (elm) - (format #t "`a: `a\n" (car elm) (cdr elm))) - weekday-table) - -Which outputs something like: - - - Sun: 2278 - Mon: 2991 - Tue: 3077 - Wed: 2734 - Thu: 2796 - Fri: 2343 - Sat: 1856 - -The numbers may be a bit different though... In my case, Saturday -seems a particularly slow day for e-mail. - -### Drawing graphs - -We can also draw graphs from this, by adding the following to the script: - - ;; plain-text graph - (mu:plot (weekday-table) "Messages per weekday" "Day" "Messages" #t) - - ;; GUI graph - (mu:plot (weekday-table) "Messages per weekday" "Day" "Messages") - - -This gives us the following: - -### plain text graph - - Messages per weekday - Messages - 3200 ++---+--------+---------+--------+---------+---------+--------+---++ - | + + "/tmp/filel8NGRf" using 2:xticlabels(1) ****** | - 3000 ++ * * ++ - | *********** * | - | * ** * | - 2800 ++ * ** * ********* ++ - | * ** ************ * | - 2600 ++ * ** ** ** * ++ - | * ** ** ** * | - | * ** ** ** * | - 2400 ++ * ** ** ** *********** ++ - *********** ** ** ** ** * | - 2200 *+ ** ** ** ** ** * ++ - * ** ** ** ** ** * | - * ** ** ** ** ** * | - 2000 *+ ** ** ** ** ** * ++ - * + ** + ** + ** + ** + ** + *********** - 1800 ******************************************************************** - Sun Mon Tue Wed Thu Fri Sat - Day -#### GUI graph - - - -### Export contacts to `mutt` - -`mu` provides `mu cfind` to get contact information from the database; -it's fast, since it uses cached contact data. But sometimes, we may -want to get a bit more advanced. For examples, suppose I want a list -of names and e-mail addresses of people that were seen at least 20 -times since 2010, in the `mutt` address book format. - -We could get such a list with something like the following: - - !/bin/sh - exec guile -s $0 $@ - !# - - (use-modules (mu) (mu message) (mu contact)) - (mu:initialize) - - ;; Get a list of contacts that were seen at least 20 times since 2010 - (define (selected-contacts) - (let ((addrs '()) - (start (car (mktime (car (strptime "%F" "2010-01-01"))))) - (minfreq 20)) - (mu:for-each-contact - (lambda (contact) - (if (and (mu:email contact) - (>= (mu:frequency contact) minfreq) - (>= (mu:last-seen contact) start)) - (set! addrs (cons contact addrs))))) - addrs)) - - (for-each - (lambda (contact) - (format #t "~a\n" (mu:contact->string contact "mutt-alias"))) - (selected-contacts)) - - -## License & Copyright - -*mu-guile* was designed and implemented by Dirk-Jan C. Binnema, and is -Free Software, licensed under the GNU GPLv3 diff --git a/www/mu-guile.org b/www/mu-guile.org deleted file mode 100644 index de6ad7db..00000000 --- a/www/mu-guile.org +++ /dev/null @@ -1,177 +0,0 @@ -#+title: mu-guile: guile-bindings for mu -#+style: -#+options: skip t - - Starting from version 0.9.7, [[http://www.djcbsoftware.nl/code/mu][mu]] had experimental bindings for the [[http://www.gnu.org/software/guile/][GNU/Guile]] - programming language, which is a version of the [[http://en.wikipedia.org/wiki/Scheme_(programming_language)][Scheme]] programming language, - specifically designed for extending existing programs. - - =mu= version 0.9.8 has much improved bindings, and they are [[file:mu-guile/index.html][documented]], with - many examples. You can find more examples in the =guile/examples= directory of - the =mu= source package. - - It must be said that Scheme (and in general, languages from the Lisp-family) - initially may look a bit 'strange' -- all these parentheses etc.; so please - bear with us -- you will get used to it. - -** Some examples - - Here are some examples; we don't provide too much explanation /how/ they do - what they do, but the [[file:mu-guile/index.html][manual]] takes you through that, step-by-step. - - *NOTE (1)*: if you get errors like =ERROR: no code for module (mu)=, ~guile~ - cannot find the ~mu~ modules. To solve this, you need to set the - ~GUILE_LOAD_PATH~ to the directory with the installed ~mu.scm~, e.g. - -#+begin_src sh - export GUILE_LOAD_PATH="/usr/local/share/guile/site/2.0" -#+end_src - - (you need to adapt this if you installed =mu= in some non-standard place; but - it's always the directory with the installed ~mu.scm~). - - *NOTE (2)*: for the graphs (below) to work, you will need to have the =gnuplot= - program installed. - - *NOTE (3)*: the examples below assume that you have your messages indexed - already using =mu=; see the man pages, or the [[http://www.djcbsoftware.nl/code/mu/cheatsheet.html][mu cheat sheet]]. - -*** Messages per weekday - -#+begin_src scheme -#!/bin/sh -exec guile -s $0 $@ -!# - -(use-modules (mu) (mu message) (mu stats) (mu plot)) -(mu:initialize) - -;; create a list like (("Mon" . 13) ("Tue" . 23) ...) -(define weekday-table - (mu:weekday-numbers->names - (sort - (mu:tabulate-messages - (lambda (msg) - (tm:wday (localtime (mu:date msg))))) - (lambda (a b) (< (car a) (car b)))))) - -(for-each - (lambda (elm) - (format #t "~a: ~a\n" (car elm) (cdr elm))) - weekday-table) -#+end_src - - Which outputs something like: - -#+begin_example -Sun: 2278 -Mon: 2991 -Tue: 3077 -Wed: 2734 -Thu: 2796 -Fri: 2343 -Sat: 1856 -#+end_example - - The numbers may be a bit different though... In my case, Saturday seems a - particularly slow day for e-mail. - -*** Drawing graphs - - We can also draw graphs from this, by adding the following to the script: - -#+begin_src scheme -;; plain-text graph -(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages" #t) - -;; GUI graph -(mu:plot (weekday-table) "Messages per weekday" "Day" "Messages") -#+end_src scheme - - This gives us the following: - -**** plain text graph -#+begin_example - Messages per weekday - Messages - 3200 ++---+--------+---------+--------+---------+---------+--------+---++ - | + + "/tmp/filel8NGRf" using 2:xticlabels(1) ****** | - 3000 ++ * * ++ - | *********** * | - | * ** * | - 2800 ++ * ** * ********* ++ - | * ** ************ * | - 2600 ++ * ** ** ** * ++ - | * ** ** ** * | - | * ** ** ** * | - 2400 ++ * ** ** ** *********** ++ - *********** ** ** ** ** * | - 2200 *+ ** ** ** ** ** * ++ - * ** ** ** ** ** * | - * ** ** ** ** ** * | - 2000 *+ ** ** ** ** ** * ++ - * + ** + ** + ** + ** + ** + *********** - 1800 ******************************************************************** - Sun Mon Tue Wed Thu Fri Sat - Day -#+end_example - -**** GUI graph - - [[file:graph01.png]] - - - -*** Export contacts to =mutt= - - =mu= provides =mu cfind= to get contact information from the database; it's - fast, since it uses cached contact data. But sometimes, we may want to get a - bit more advanced. For examples, suppose I want a list of names and e-mail - addresses of people that were seen at least 20 times since 2010, in the - =mutt= address book format. - - We could get such a list with something like the following: - -#+begin_src scheme -#!/bin/sh -exec guile -s $0 $@ -!# - -(use-modules (mu) (mu message) (mu contact)) -(mu:initialize) - -;; Get a list of contacts that were seen at least 20 times since 2010 -(define (selected-contacts) - (let ((addrs '()) - (start (car (mktime (car (strptime "%F" "2010-01-01"))))) - (minfreq 20)) - (mu:for-each-contact - (lambda (contact) - (if (and (mu:email contact) - (>= (mu:frequency contact) minfreq) - (>= (mu:last-seen contact) start)) - (set! addrs (cons contact addrs))))) - addrs)) - -(for-each - (lambda (contact) - (format #t "~a\n" (mu:contact->string contact "mutt-alias"))) - (selected-contacts)) -#+end_src - -** License & Copyright - - *mu-guile* was designed and implemented by Dirk-Jan C. Binnema, and is Free - Software, licensed under the GNU GPLv3 - -#+html: