-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
This is a little specialized to my setup, though
- Loading branch information
Showing
6 changed files
with
88 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
FROM davidb/devel:alpine | ||
MAINTAINER David Brown <[email protected]> | ||
|
||
RUN apk update && \ | ||
apk add mutt w3m | ||
COPY bin/* /usr/bin/ | ||
COPY mailcap /etc/mailcap |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import os.path | ||
import sys | ||
from subprocess import check_call | ||
|
||
# Invoke mutt nicely on the given folder. | ||
|
||
def main(): | ||
rc = os.path.expanduser("~/.mutt/davidb") | ||
folder = '=' | ||
|
||
if len(sys.argv) >= 2: | ||
folder = "=" + sys.argv[1] | ||
|
||
if sys.argv[1] == "all": | ||
folder = "=[Gmail]/All Mail" | ||
elif sys.argv[1] == "starred": | ||
folder = "=[Gmail]/Starred" | ||
|
||
check_call(['mutt', "-F", rc, "-f", folder]) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#! /usr/bin/env python3 | ||
|
||
import os.path | ||
import sys | ||
from subprocess import check_call | ||
|
||
# Invoke mutt nicely on the given folder. | ||
|
||
def main(): | ||
rc = os.path.expanduser("~/.mutt/linaro") | ||
folder = '=' | ||
|
||
if len(sys.argv) >= 2: | ||
folder = "=" + sys.argv[1] | ||
|
||
if sys.argv[1] == "all": | ||
folder = "=[Gmail]/All Mail" | ||
elif sys.argv[1] == "starred": | ||
folder = "=[Gmail]/Starred" | ||
|
||
check_call(['mutt', "-F", rc, "-f", folder]) | ||
|
||
if __name__ == '__main__': | ||
main() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
#! /bin/bash | ||
|
||
docker build -t davidb/mutt:latest . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#! /bin/bash | ||
|
||
# Start the 'asme' container to run as the current user in the current | ||
# directory. | ||
|
||
# The bind volumes should probably be changed to be broader than just | ||
# the current example, but this case does work. | ||
# | ||
# You may want to bind your home directory, or at least things like | ||
# ~/.ssh:~/.ssh:ro | ||
|
||
container=davidb/mutt | ||
|
||
docker run --rm -ti \ | ||
-v "${HOME}/Sync/dotfiles/mutt:${HOME}/.mutt:ro" \ | ||
-v "${HOME}/.docker-mutt-cache:${HOME}/.mutt-cache" \ | ||
-v "${HOME}/.mutt_certificates:${HOME}/.mutt_certificates" \ | ||
-v $SSH_AUTH_SOCK:$SSH_AUTH_SOCK:ro \ | ||
-e USER=$USER \ | ||
-e HOME=$HOME \ | ||
-e SSH_AUTH_SOCK=$SSH_AUTH_SOCK \ | ||
-e UID=$(id -u) \ | ||
-e GID=$(id -g) \ | ||
-w $(pwd) \ | ||
$container \ | ||
bash -l \ | ||
"$@" | ||
|
||
# -v "$(pwd):$(pwd)" \ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
text/html; /usr/bin/w3m -o display_link_number=true -I %{charset} -dump -T text/html %s; copiousoutput; description=HTML Text; nametemplate=%s.html |