-
Notifications
You must be signed in to change notification settings - Fork 15
/
READ-ME.html
527 lines (503 loc) · 16.5 KB
/
READ-ME.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<style type="text/css">
body, html
{
margin : 0;
padding : 0;
background : #e5e5e5;
color : black;
font-family : Palatino, Georgia, serif;
font-size : 15px;
line-height : 150%;
text-align : justify;
}
.container
{
background : white;
width : 680px;
margin : 1em auto;
padding : 1em;
border : 4px solid #ccc;
-webkit-border-radius : 10px;
-moz-border-radius : 10px;
}
h1, h2, h3, h4, h5, h6
{
font-style : italic;
font-weight : normal;
text-align : center;
margin : 0.5em 0;
}
h1
{
font-weight : bold;
font-size : 250%;
margin-bottom: 1em;
}
h2
{
text-align : left;
margin : 1.5em 10% 1em 10%;
}
a
{
color : #009;
text-decoration: none;
}
a:hover
{
text-decoration: underline;
}
a[name] { color: inherit !important }
a[name]:hover { text-decoration: none }
ul, p, table
{
width : 80%;
}
ul
{
margin : 1em auto;
}
ul.toc, ul.toc li
{
list-style : none;
margin : 0;
padding : 0;
}
ul.toc
{
font-size : 110%;
margin : 0 10%;
}
ul.toc li
{
display : inline-block;
width : 49%;
}
ul.toc li:nth-child(odd) { text-align: left }
ul.toc li:nth-child(even) { text-align: right }
p
{
margin : 0.5em auto;
}
code
{
background: #ccc;
font-size: 12px;
}
code.block
{
display : block;
padding : 0.5em 1em;
border-radius : 8px;
border: 1px solid #bbb;
}
.pre
{
width : 70%;
margin : 0 auto;
font-family: monospace;
font-size : 85%;
text-align : justify;
}
table
{
margin : 0 10%;
border: 1px solid #ccc;
border-spacing : 1px;
}
table td
{
padding : 0 0.5em;
vertical-align: top;
border : 1px solid #ddd;
}
table tr td:first-child
{
font-family : monospace;
font-size : 12px;
background : #ccc;
}
</style>
</head>
<body>
<div class="container">
<h1>QuoteFix</h1>
<h2>Table of contents</h2>
<ul class="toc">
<li><a href="#what">what is it?</a></li>
<li><a href="#installing">installing the plug-in</a></li>
<li><a href="#using">using the plug-in</a></li>
<li><a href="#attribution">customized attributions</a></li>
<li><a href="#datetimeformatting">advanced date/time formatting</a></li>
<li><a href="#enabledisable">enabling/disabling</a></li>
<li><a href="#faq">frequently asked questions</a></li>
<li><a href="#licence">licence & copyright</a></li>
</ul>
<h2><a name="what">What is it?</a></h2>
<p>
QuoteFix is a plug-in for Mail.app which fixes some issues with
replying to e-mail:
</p>
<ul>
<li>it tries to remove the signature from the original message</li>
<li>it removes certain unnecessary empty lines</li>
<li>it positions the cursor below the original message, instead of above it (in other words, bottom-posting instead of top-posting)</li>
<li>it can (optionally) prune nested quotes from a specific level and above</li>
</ul>
<p>
It also provides customized attributions for replies and forwards.
</p>
<h2><a name="installing">Installing the plug-in</a></h2>
<p>
Before installing the plug-in, you'll need to make sure that
Mail.app's plug-in support is turned on. For this, execute the
following two commands in Terminal.app:
</p>
<p>
<code>
defaults write com.apple.mail EnableBundles -bool true<br/>
defaults write com.apple.mail BundleCompatibilityVersion -string 3
</code>
</p>
<p>
Next, perform the following steps:
<ul>
<li>Download the plugin if you haven't done so already</li>
<li>Navigate in Finder to <code>~/Library/Mail/</code><br/>
<i>(where <b>~</b> means: your home directory)</i>
</li>
<li>
If a <code>Bundles</code> folder doesn't yet exist, create an
empty one
</li>
<li>Extract the downloaded ZIP file and copy <code>QuoteFix.mailbundle</code> into the <code>Bundles</code> folder</li>
</ul>
</p>
<p>
Lastly, quit Mail.app if it's running, and start it up again.
</p>
<p>
<a name="uninstall">In case you run into any problems</a>, or want to
uninstall QuoteFix, just remove <code>QuoteFix.mailbundle</code> from
the bundle-folder and restart Mail.app.
</p>
<h2><a name="using">Using the plug-in</a></h2>
<p>
After installation, QuoteFix is enabled. It will perform its magic
automatically when you reply to, or forward, messages.
</p>
<p>
The behaviour of the plug-in is customizable via its preferences.
QuoteFix has it's own preference pane in the preferences window of
Mail.app. Most preferences speak for themselves, or have a useful
tooltip which pops up when you hover the cursor above it.
</p>
<p>
If you temporarily want to turn off QuoteFix, but don't want to
<a href="#uninstall">uninstall</a> it, check off the <i>QuoteFix is
enabled</i> checkbox. As of version 2.3.1, (de)activating
QuoteFix can be done from a menu item in the <code>Mail</code>
menu. You could use <a
href="http://lifehacker.com/343328/create-a-keyboard-shortcut-for-any-menu-action-in-any-program">the
standard way of assigning a keyboard shortcut to a menu item in
Mac OS X</a> to enable or disable QuoteFix with a keyboard
shortcut.
</p>
<h2><a name="attribution">Customized Attributions</a></h2>
<p>
QuoteFix also provides the ability to define your own attribution
lines (the first line of a reply/forward, usually looking something
like <code>On SOME DATE, at SOME TIME, SOMEONE wrote:</code>).
</p>
<p>
Customized attributions work by way of templates: you define
a template in the preferences, and parts of the template will
– at the time of replying or forwarding – be replaced
by values reflecting parts of the message you are replying to or
forwarding.
</p>
<p>
Templating works by replacing template variables with values.
A template variable looks like this:
<code>${VARIABLE}</code>. It will be replaced with a value
depending on what <code>VARIABLE</code> contains.
</p>
<p>
A (non-exhaustive) list of variables you can use:
<table border=0>
<tr>
<td>${message.from}</td>
<td>
Name and e-mail address of sender of message:<br/>
<i>Your Friend <[email protected]></i>
</td>
</tr>
<tr>
<td>${message.from.name}</td>
<td>
Name of sender of message:<br/>
<i>Your Friend</i>
</td>
</tr>
<tr>
<td>${message.from.email}</td>
<td>
E-mail address of sender of message:<br/>
<i>[email protected]</i>
</td>
</tr>
<tr>
<td>${message.to}</td>
<td>
Your e-mail address (this is the address that was used for
the message to reach you). This is more like the
<code>Delivered-To</code> header than the <code>To</code>
header (for that, see <code>${message.recipients}</code>)
</td>
</tr>
<tr>
<td>${message.recipients}</td>
<td>
A list of all the recipients of the message, as mentioned in
both the <code>To</code> and <code>Cc</code> headers.
</td>
</tr>
<tr>
<td>${message.recipients.to}</td>
<td>
A list of the recipients of the message mentioned in
the <code>To</code> header.
</td>
</tr>
<tr>
<td>${message.recipients.cc}</td>
<td>
A list of the recipients of the message mentioned in
the <code>Cc</code> header.
</td>
</tr>
<tr>
<td>${message.subject}</td>
<td>The subject of the message.</td>
</tr>
<tr>
<td>
${message.sent}<br/>
${message.received}
</td>
<td>
Sent/received timestamps. If you want more finegrained
control over formatting timestamps, these variables split
into separate fields: <code>year</code>, <code>month</code>,
<code>day</code>, <code>hour</code>, <code>hour12</code>,
<code>ampm</code>, <code>minute</code>, <code>second</code>,
<code>weeknumber</code>, <code>monthshort</code>,
<code>monthlong</code>, <code>dayshort</code>,
<code>daylong</code>, <code>date</code>, <code>time</code>.<br/>
Use these like so: <code>${message.sent.year}</code>.
<p><a href="#datetimeformatting">See below for more advanced date/time formatting
options.</a></p>
</td>
</tr>
</table>
</p>
<p>
If you want even more freedom in formatting attribution lines,
there's an experimental feature (which can be enabled in the
<i>Advanced</i> preferences) which enables conditional statements,
string/date formatting, and much more. This is based on a modified
version of the <a target="_blank"
href="http://www.simple-is-better.org/template/pyratemp.html">pyratemp</a>
templating library for Python written by Roland Koebler.
</p>
<p>
A small example of what's possible:<br/>
<code class="block">
From: ${message.from}<br/>
{% if message.recipients.to %}<br/>
To: ${message.recipients.to.join("; ", "name")}<br/>
{% end %}<br/>
{% if message.recipients.cc %}<br/>
Cc: ${message.recipients.cc.join("; ", "name")}<br/>
{% end %}<br/>
Subject: ${message.subject.lower()}<br/>
Sent-Date: ${message.sent.strftime("%d-%m-%Y")}<br/>
</code>
</p>
<p>
You can also enable HTML-formatting for your custom attributions.
For this to work, the (outgoing) message format should be <i>Rich
Text</i>. You can have QuoteFix automatically convert a message
to Rich Text if your attribution should be interpreted in HTML.
Otherwise, QuoteFix will issue a warning.
</p>
<p>
If you want to mimic the attribution generated by Outlook, try this
(with HTML-formatting enabled):
<code class="block">
<b>From:</b> ${message.from}<br>
<b>Date:</b> ${message.received}<br>
<b>To:</b> ${message.to}<br>
<b>Subject:</b> ${message.subject}<br>
</code>
</p>
<p>
When you're editing your customized attribution, QuoteFix will
generate an approximate preview as tooltip of the text field you're
entering the attribution in.
</p>
<h2><a name="datetimeformatting">Advanced date/time formatting</a></h2>
<p>
If you want even more finegrained control over the formatting of
dates and times, you can enable "advanced templating" in the
<i>Advanced</i> preferences, after which date/time variables like
<code>message.sent</code> and <code>message.received</code> will
have <code>.format</code> and <code>.strftime</code> methods with
which you can format the output of the objects.
</p>
<p>
Functionally, these two methods perform the same operation —
namely formatting date/time objects — the difference is in
the formatting strings used:
<ul>
<li>
<code>.strftime</code> uses the common <i>Unix</i> function with
the same name for formatting. <a
href="http://docs.python.org/library/time.html#time.strftime">Look
here for more information</a>.
</li>
<li>
<code>.format</code> uses the <i>Unicode</i> date format patterns.
<a
href="http://unicode.org/reports/tr35/tr35-10.html#Date_Format_Patterns">
Look here for more information</a>.
</li>
</ul>
</p>
<p>
An example:
</p>
<p>
<code>${message.sent.format("EEE MMM dd yyyy HH:mm:ss")}</code>
</p>
<p>
This will output: <code>Sun Nov 06 2011 10:19:34</code>
</p>
<p>
<b>However: the output will be generated in the current locale,
which means that it will be formatted according to your local
language settings. See below on how to use a different locale.
</b>
</p>
<p>
Similarly, with <code>.strftime</code>:
<br/>
<code>${message.sent.strftime("%a %b %d %Y %H:%M:%S")}</code>
</p>
<p>
Both methods accept a second argument: a locale identifier. You can
use it to convert the output to a certain locale, instead of the
default locale (which can be changed in the <i>System
Preferences</i> of Mac OS X: <i>Language & Text</i> >
<i>Formats</i>).
</p>
<p>
The same example as above, but with a different locale:
</p>
<p>
<code>${message.sent.format("EEE MMM dd yyyy HH:mm:ss", 'fr_FR')}</code>
</p>
<p>
The output: <code>dim. nov. 06 2011 10:19:34</code>
</p>
<p>
If you want the default format, just in a different locale,
use the <code>.locale</code> method:
</p>
<p>
<code>${message.sent.locale('fr_FR')}</code>
</p>
<h2><a name="enabledisable">Enabling/disabling the plug-in</a></h2>
<p>
QuoteFix has various ways of turning off its behaviour, short of
uninstalling it:
</p>
<p>
<ul>
<li>You can turn QuoteFix off from its preferences; this will
disable the plug-in until you enable it again;
</li>
<li>
You can quickly turn the plug-in on/off from the <i>Mail</i>
menu. If you want, you can even assign a keyboard shortcut to
this menu item from System Preferences;
</li>
<li>
You can toggle the enable (or disable) status of QuoteFix for
a single message by pressing down <code>Option</code> whilst
initiating a Reply/Forward action. That is:
<ul style="margin-left: 0">
<li>When QuoteFix is <b>disabled</b>, pressing <code>Option</code>
will <i>enable</i> QuoteFix for that particular message only;
</li>
<li>Likewise: when QuoteFix is <b>enabled</b>, pressing <code>Option</code>
will <i>disable</i> QuoteFix for that particular message only;
</li>
</ul>
</li>
</ul>
</p>
<h2><a name="faq">Frequently Asked Questions</a></h2>
<p>
See the <a
href="https://github.com/robertklep/quotefixformac/wiki/FAQ---Frequently-Asked-Questions">Wiki</a>
for a list of frequently asked questions, and their answers.
</p>
<h2><a name="licence">Licence & copyright</a></h2>
<p>
This plugin is written by <a href="mailto:[email protected]">Robert Klep</a>
and is provided "as-is", without <em>any</em> warranties whatsoever.
</p>
<p>
QuoteFix' downloads and support is hosted by GitHub at
<a href="https://github.com/robertklep/quotefixformac">https://github.com/robertklep/quotefixformac</a>
</p>
<p>
QuoteFix uses the Sparkle framework from Andy Matuschak to provide
software updates, which comes with the following permission notice:
<div class="pre">
Copyright (c) 2006 Andy Matuschak
Permission is hereby granted, free of charge, to any person
obtaining a copy of this software and associated documentation
files (the "Software"), to deal in the Software without
restriction, including without limitation the rights to use,
copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the
Software is furnished to do so, subject to the following
conditions:
The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
</div>
</p>
<p>
See also <a href="http://sparkle.andymatuschak.org/">http://sparkle.andymatuschak.org/</a>
</p>
<h2>Like Quotefix?</h2>
<p>
Consider making a donation:
<a href="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=4UF2KB2BTW6AC"><img style="vertical-align:middle" src="https://www.paypalobjects.com/en_GB/i/btn/btn_donate_SM.gif"></a>
</p>
</div>
</body>
</html>