{"thread":{"id":"13875","subject":"[PATCH] Add a helper script to send patches with Mozilla Thunderbird","startedAt":"2008-06-09T17:37:04Z","lastAt":"2008-06-20T02:58:57Z","messageCount":7,"participants":["Lukas Sandström","Johannes Sixt","Junio C Hamano","しらいしななこ"],"isPatch":true,"patchVersion":1,"patchTotal":null},"messages":[{"id":"79247","messageId":"484D6A40.60002@etek.chalmers.se","threadId":"13875","inReplyTo":null,"subject":"[PATCH] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Lukas Sandström","fromEmail":"lukass@etek.chalmers.se","sentAt":"2008-06-09T17:37:04Z","receivedAt":"2008-06-09T17:37:04Z","isPatch":true,"sender":{"key":"luksan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152281?v=4"},"body":"The script appp.sh can be used with the External Editor extension for\nMozilla Thunderbird in order to be able to send inline patches in an\neasy way.\n\nSigned-off-by: Lukas Sandström <lukass@etek.chalmers.se>\n---\n\nHi,\nI sent this out a year ago or so. I figured I'd put the script\nin contrib/, in case someone finds it useful.\n(and yes, this patch is sent using appp.sh)\n\n Documentation/SubmittingPatches          |    5 +++\n contrib/thunderbird-patch-inline/README  |   20 +++++++++++\n contrib/thunderbird-patch-inline/appp.sh |   55 ++++++++++++++++++++++++++++++\n 3 files changed, 80 insertions(+), 0 deletions(-)\n create mode 100644 contrib/thunderbird-patch-inline/README\n create mode 100755 contrib/thunderbird-patch-inline/appp.sh\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex 0e155c9..7c16852 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -419,6 +419,11 @@ settings but I haven't tried, yet.\n \tmail.identity.default.compose_html\t=> false\n \tmail.identity.id?.compose_html\t\t=> false\n \n+( Lukas Sandström )\n+\n+There is a script in contrib/thunderbird-patch-inline which can help\n+you include patches with Thunderbird in an easy way. To use it, do the\n+steps above and then use the script as the external editor.\n \n Gnus\n ----\ndiff --git a/contrib/thunderbird-patch-inline/README b/contrib/thunderbird-patch-inline/README\nnew file mode 100644\nindex 0000000..39f96aa\n--- /dev/null\n+++ b/contrib/thunderbird-patch-inline/README\n@@ -0,0 +1,20 @@\n+appp.sh is a script that is supposed to be used together with ExternalEditor\n+for Mozilla Thundebird. It will let you include patches inline in e-mails\n+in an easy way.\n+\n+Usage:\n+- Generate the patch with git format-patch.\n+- Start writing a new e-mail in Thunderbird.\n+- Press the external editor button (or Ctrl-E) to run appp.sh\n+- Select the previosly generated patch file.\n+- Finish editing the e-mail.\n+\n+Any text that is entered into the message editor before appp.sh is called\n+will be moved to the section between the --- and the diffstat.\n+\n+All S-O-B:s and Cc:s in the patch will be added to the CC list.\n+\n+To set it up, just install External Editor and tell it to use appp.sh as the\n+editor.\n+\n+Zenity is a required dependency.\ndiff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh\nnew file mode 100755\nindex 0000000..cc518f3\n--- /dev/null\n+++ b/contrib/thunderbird-patch-inline/appp.sh\n@@ -0,0 +1,55 @@\n+#!/bin/bash\n+# Copyright 2008 Lukas Sandström <luksan@gmail.com>\n+#\n+# AppendPatch - A script to be used together with ExternalEditor\n+# for Mozilla Thunderbird to properly include pathes inline i e-mails.\n+\n+# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2\n+\n+CONFFILE=~/.appprc\n+\n+SEP=\"-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-\"\n+if [ -e \"$CONFFILE\" ] ; then\n+\tLAST_DIR=`grep -m 1 \"^LAST_DIR=\" \"${CONFFILE}\"|sed -e 's/^LAST_DIR=//'`\n+\tcd \"${LAST_DIR}\"\n+else\n+\tcd > /dev/null\n+fi\n+\n+PATCH=$(zenity --file-selection)\n+\n+if [ \"$?\" != \"0\" ] ; then\n+\t#zenity --error --text \"No patchfile given.\"\n+\texit 1\n+fi\n+\n+cd - > /dev/null\n+\n+SUBJECT=`sed -n -e '/^Subject: /p' \"${PATCH}\"`\n+HEADERS=`sed -e '/^'\"${SEP}\"'$/,$d' $1`\n+BODY=`sed -e \"1,/${SEP}/d\" $1`\n+CMT_MSG=`sed -e '1,/^$/d' -e '/^---$/,$d' \"${PATCH}\"`\n+DIFF=`sed -e '1,/^---$/d' \"${PATCH}\"`\n+\n+CCS=`echo -e \"$CMT_MSG\\n$HEADERS\" | sed -n -e 's/^Cc: \\(.*\\)$/\\1,/gp' \\\n+\t-e 's/^Signed-off-by: \\(.*\\)/\\1,/gp'`\n+\n+echo \"$SUBJECT\" > $1\n+echo \"Cc: $CCS\" >> $1\n+echo \"$HEADERS\" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1\n+echo \"$SEP\" >> $1\n+\n+echo \"$CMT_MSG\" >> $1\n+echo \"---\" >> $1\n+if [ \"x${BODY}x\" != \"xx\" ] ; then\n+\techo >> $1\n+\techo \"$BODY\" >> $1\n+\techo >> $1\n+fi\n+echo \"$DIFF\" >> $1\n+\n+LAST_DIR=`dirname \"${PATCH}\"`\n+\n+grep -v \"^LAST_DIR=\" \"${CONFFILE}\" > \"${CONFFILE}_\"\n+echo \"LAST_DIR=${LAST_DIR}\" >> \"${CONFFILE}_\"\n+mv \"${CONFFILE}_\" \"${CONFFILE}\"\n-- \n1.5.3.7\n"},{"id":"79338","messageId":"484E74AC.2060306@viscovery.net","threadId":"13875","inReplyTo":"484D6A40.60002@etek.chalmers.se","subject":"Re: [PATCH] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Johannes Sixt","fromEmail":"j.sixt@viscovery.net","sentAt":"2008-06-10T12:33:48Z","receivedAt":"2008-06-10T12:33:48Z","isPatch":true,"sender":{"key":"j6t@kdbg.org","avatar":"https://avatars.githubusercontent.com/u/14810926?v=4"},"body":"Lukas Sandström schrieb:\n> The script appp.sh can be used with the External Editor extension for\n> Mozilla Thunderbird in order to be able to send inline patches in an\n> easy way.\n\nThanks a lot.\n\nBut sadly, it still wraps long lines. Is there a way to inhibit this short\nof modifying the settings?\n\n-- Hannes\n"},{"id":"79341","messageId":"484E80B9.9000805@etek.chalmers.se","threadId":"13875","inReplyTo":"484E74AC.2060306@viscovery.net","subject":"Re: [PATCH] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Lukas Sandström","fromEmail":"lukass@etek.chalmers.se","sentAt":"2008-06-10T13:25:13Z","receivedAt":"2008-06-10T13:25:13Z","isPatch":true,"sender":{"key":"luksan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152281?v=4"},"body":"Johannes Sixt wrote:\n> Lukas Sandström schrieb:\n>> The script appp.sh can be used with the External Editor extension for\n>> Mozilla Thunderbird in order to be able to send inline patches in an\n>> easy way.\n> \n> Thanks a lot.\n> \n> But sadly, it still wraps long lines. Is there a way to inhibit this short\n> of modifying the settings?\n> \n\nI don't know. I wouldn't expect so. It is a long time since I configured\nThunderbird to send patches. I think I more or less followed the\ninstructions in SubmittingPatches when I did.\n\n/Lukas\n"},{"id":"80402","messageId":"485AE9FD.8050508@etek.chalmers.se","threadId":"13875","inReplyTo":"484D6A40.60002@etek.chalmers.se","subject":"[PATCH -resend] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Lukas Sandström","fromEmail":"lukass@etek.chalmers.se","sentAt":"2008-06-19T23:21:33Z","receivedAt":"2008-06-19T23:21:33Z","isPatch":true,"sender":{"key":"luksan@gmail.com","avatar":"https://avatars.githubusercontent.com/u/152281?v=4"},"body":"The script appp.sh can be used with the External Editor extension for\nMozilla Thunderbird in order to be able to send inline patches in an\neasy way.\n\nSigned-off-by: Lukas Sandström <lukass@etek.chalmers.se>\n---\n\nResending. It would be nice if this ended up in contrib/\n\n/Lukas\n\n Documentation/SubmittingPatches          |    5 +++\n contrib/thunderbird-patch-inline/README  |   20 +++++++++++\n contrib/thunderbird-patch-inline/appp.sh |   55 ++++++++++++++++++++++++++++++\n 3 files changed, 80 insertions(+), 0 deletions(-)\n create mode 100644 contrib/thunderbird-patch-inline/README\n create mode 100755 contrib/thunderbird-patch-inline/appp.sh\n\ndiff --git a/Documentation/SubmittingPatches b/Documentation/SubmittingPatches\nindex 0e155c9..7c16852 100644\n--- a/Documentation/SubmittingPatches\n+++ b/Documentation/SubmittingPatches\n@@ -419,6 +419,11 @@ settings but I haven't tried, yet.\n \tmail.identity.default.compose_html\t=> false\n \tmail.identity.id?.compose_html\t\t=> false\n \n+( Lukas Sandström )\n+\n+There is a script in contrib/thunderbird-patch-inline which can help\n+you include patches with Thunderbird in an easy way. To use it, do the\n+steps above and then use the script as the external editor.\n \n Gnus\n ----\ndiff --git a/contrib/thunderbird-patch-inline/README b/contrib/thunderbird-patch-inline/README\nnew file mode 100644\nindex 0000000..39f96aa\n--- /dev/null\n+++ b/contrib/thunderbird-patch-inline/README\n@@ -0,0 +1,20 @@\n+appp.sh is a script that is supposed to be used together with ExternalEditor\n+for Mozilla Thundebird. It will let you include patches inline in e-mails\n+in an easy way.\n+\n+Usage:\n+- Generate the patch with git format-patch.\n+- Start writing a new e-mail in Thunderbird.\n+- Press the external editor button (or Ctrl-E) to run appp.sh\n+- Select the previosly generated patch file.\n+- Finish editing the e-mail.\n+\n+Any text that is entered into the message editor before appp.sh is called\n+will be moved to the section between the --- and the diffstat.\n+\n+All S-O-B:s and Cc:s in the patch will be added to the CC list.\n+\n+To set it up, just install External Editor and tell it to use appp.sh as the\n+editor.\n+\n+Zenity is a required dependency.\ndiff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh\nnew file mode 100755\nindex 0000000..cc518f3\n--- /dev/null\n+++ b/contrib/thunderbird-patch-inline/appp.sh\n@@ -0,0 +1,55 @@\n+#!/bin/bash\n+# Copyright 2008 Lukas Sandström <luksan@gmail.com>\n+#\n+# AppendPatch - A script to be used together with ExternalEditor\n+# for Mozilla Thunderbird to properly include pathes inline i e-mails.\n+\n+# ExternalEditor can be downloaded at http://globs.org/articles.php?lng=en&pg=2\n+\n+CONFFILE=~/.appprc\n+\n+SEP=\"-=-=-=-=-=-=-=-=-=# Don't remove this line #=-=-=-=-=-=-=-=-=-\"\n+if [ -e \"$CONFFILE\" ] ; then\n+\tLAST_DIR=`grep -m 1 \"^LAST_DIR=\" \"${CONFFILE}\"|sed -e 's/^LAST_DIR=//'`\n+\tcd \"${LAST_DIR}\"\n+else\n+\tcd > /dev/null\n+fi\n+\n+PATCH=$(zenity --file-selection)\n+\n+if [ \"$?\" != \"0\" ] ; then\n+\t#zenity --error --text \"No patchfile given.\"\n+\texit 1\n+fi\n+\n+cd - > /dev/null\n+\n+SUBJECT=`sed -n -e '/^Subject: /p' \"${PATCH}\"`\n+HEADERS=`sed -e '/^'\"${SEP}\"'$/,$d' $1`\n+BODY=`sed -e \"1,/${SEP}/d\" $1`\n+CMT_MSG=`sed -e '1,/^$/d' -e '/^---$/,$d' \"${PATCH}\"`\n+DIFF=`sed -e '1,/^---$/d' \"${PATCH}\"`\n+\n+CCS=`echo -e \"$CMT_MSG\\n$HEADERS\" | sed -n -e 's/^Cc: \\(.*\\)$/\\1,/gp' \\\n+\t-e 's/^Signed-off-by: \\(.*\\)/\\1,/gp'`\n+\n+echo \"$SUBJECT\" > $1\n+echo \"Cc: $CCS\" >> $1\n+echo \"$HEADERS\" | sed -e '/^Subject: /d' -e '/^Cc: /d' >> $1\n+echo \"$SEP\" >> $1\n+\n+echo \"$CMT_MSG\" >> $1\n+echo \"---\" >> $1\n+if [ \"x${BODY}x\" != \"xx\" ] ; then\n+\techo >> $1\n+\techo \"$BODY\" >> $1\n+\techo >> $1\n+fi\n+echo \"$DIFF\" >> $1\n+\n+LAST_DIR=`dirname \"${PATCH}\"`\n+\n+grep -v \"^LAST_DIR=\" \"${CONFFILE}\" > \"${CONFFILE}_\"\n+echo \"LAST_DIR=${LAST_DIR}\" >> \"${CONFFILE}_\"\n+mv \"${CONFFILE}_\" \"${CONFFILE}\"\n-- \n1.5.3.7\n"},{"id":"80422","messageId":"7vmylhq6lb.fsf@gitster.siamese.dyndns.org","threadId":"13875","inReplyTo":"485AE9FD.8050508@etek.chalmers.se","subject":"Re: [PATCH -resend] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-20T00:43:12Z","receivedAt":"2008-06-20T00:43:12Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"Lukas Sandström <lukass@etek.chalmers.se> writes:\n\n> The script appp.sh can be used with the External Editor extension for\n> Mozilla Thunderbird in order to be able to send inline patches in an\n> easy way.\n>\n> Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>\n> ---\n>\n> Resending. It would be nice if this ended up in contrib/\n>\n> /Lukas\n>\n>  Documentation/SubmittingPatches          |    5 +++\n>  contrib/thunderbird-patch-inline/README  |   20 +++++++++++\n>  contrib/thunderbird-patch-inline/appp.sh |   55 +++++++++++++++++++++++++++\n\nA silly question.  What does \"appp\" stand for?  AppendPatch does not have\nthat many P's in it.\n\n> diff --git a/contrib/thunderbird-patch-inline/appp.sh b/contrib/thunderbird-patch-inline/appp.sh\n> new file mode 100755\n> index 0000000..cc518f3\n> --- /dev/null\n> +++ b/contrib/thunderbird-patch-inline/appp.sh\n> @@ -0,0 +1,55 @@\n> +#!/bin/bash\n> +# Copyright 2008 Lukas Sandström <luksan@gmail.com>\n> +#\n> +# AppendPatch - A script to be used together with ExternalEditor\n> +# for Mozilla Thunderbird to properly include pathes inline i e-mails.\n> ...\n\nEh, pathes?\n"},{"id":"80425","messageId":"20080620102212.6117@nanako3.lavabit.com","threadId":"13875","inReplyTo":"7vmylhq6lb.fsf@gitster.siamese.dyndns.org","subject":"Re: [PATCH -resend] Add a helper script to send patches with Mozilla Thunderbird","fromName":"しらいしななこ","fromEmail":"nanako3@lavabit.com","sentAt":"2008-06-20T01:22:12Z","receivedAt":"2008-06-20T01:22:12Z","isPatch":true,"sender":{"key":"nanako3@lavabit.com","avatar":"https://gravatar.com/avatar/3777b9e201c5883a62b1a6fdf7c53f2d712d1d80989146063ea861e33aad72a8?d=mp&s=160"},"body":"Quoting Junio C Hamano <gitster@pobox.com>:\n\n> Lukas Sandström <lukass@etek.chalmers.se> writes:\n>\n>> The script appp.sh can be used with the External Editor extension for\n>> Mozilla Thunderbird in order to be able to send inline patches in an\n>> easy way.\n>>\n>> Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>\n>> ---\n>>\n>> Resending. It would be nice if this ended up in contrib/\n>>\n>> /Lukas\n>>\n>>  Documentation/SubmittingPatches          |    5 +++\n>>  contrib/thunderbird-patch-inline/README  |   20 +++++++++++\n>>  contrib/thunderbird-patch-inline/appp.sh |   55 +++++++++++++++++++++++++++\n>\n> A silly question.  What does \"appp\" stand for?  AppendPatch does not have\n> that many P's in it.\n\nSilly Junio (^_^).  Count them again.\n\n-- \nNanako Shiraishi\nhttp://ivory.ap.teacup.com/nanako3/\n"},{"id":"80431","messageId":"7vfxr8q0b2.fsf@gitster.siamese.dyndns.org","threadId":"13875","inReplyTo":"20080620102212.6117@nanako3.lavabit.com","subject":"Re: [PATCH -resend] Add a helper script to send patches with Mozilla Thunderbird","fromName":"Junio C Hamano","fromEmail":"gitster@pobox.com","sentAt":"2008-06-20T02:58:57Z","receivedAt":"2008-06-20T02:58:57Z","isPatch":true,"sender":{"key":"gitster@pobox.com","avatar":"https://avatars.githubusercontent.com/u/54884?v=4"},"body":"しらいしななこ  <nanako3@lavabit.com> writes:\n\n> Quoting Junio C Hamano <gitster@pobox.com>:\n>\n>> Lukas Sandström <lukass@etek.chalmers.se> writes:\n>>\n>>> The script appp.sh can be used with the External Editor extension for\n>>> Mozilla Thunderbird in order to be able to send inline patches in an\n>>> easy way.\n>>>\n>>> Signed-off-by: Lukas Sandström <lukass@etek.chalmers.se>\n>>> ---\n>>>\n>>> Resending. It would be nice if this ended up in contrib/\n>>>\n>>> /Lukas\n>>>\n>>>  Documentation/SubmittingPatches          |    5 +++\n>>>  contrib/thunderbird-patch-inline/README  |   20 +++++++++++\n>>>  contrib/thunderbird-patch-inline/appp.sh |   55 +++++++++++++++++++++++++++\n>>\n>> A silly question.  What does \"appp\" stand for?  AppendPatch does not have\n>> that many P's in it.\n>\n> Silly Junio (^_^).  Count them again.\n\n*Blush*  Sorry for the noise.\n"}]}