Created
April 1, 2015 05:58
-
-
Save ossdev-somewhere/b4440aa864f4ed6a72ea to your computer and use it in GitHub Desktop.
mbox2mh - Converts Firefox's mbox format into Mew's MH format.
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
#!/bin/sh | |
# | |
# FirefoxのmboxファイルをMewのMH形式に変換します。 | |
# (Firefoxの管理用フィールドを削除して変換します。) | |
# | |
# ■使い方 | |
# $ mbox2mh input-mbox-file | |
# | |
# ■出力 | |
# _(入力ファイル名)/* ... 出力ディレクトリ | |
# (入力ファイル名).conv ... 一時ファイル | |
mkdir -p "_$1" | |
sed -e '/^X-Mozilla-Status:.*$/d' \ | |
-e '/^X-Mozilla-Status2:.*$/d' \ | |
-e '/^X-Mozilla-Keys:.*$/d' \ | |
-e 's/\r//g' < "$1" > "$1.conv" | |
incm -d "$1.conv" -i "_$1" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment