2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

メール返信時の引用記号を自動付与する

Last updated at Posted at 2019-05-20

メール以外のコミュニケーションツールが徐々に普及しつつありますが、やはりまだ主流はメールではないかと思います。

そんなメールの返信時によく目にする「>」のマーク。
例えばこんなケース。

いつもお世話になっております。
○○商事の△△です。

ご質問頂きました件について回答差し上げます。

>・・・・・
これにつきましては、・・・・・・

一文程度なら苦ではないのですが、複数行に渡って引用する場合、この引用記号を付けるのは結構面倒です。
(メーラーやメールの形式によっては自動で引用記号をつけてくれる場合もあるようですが、そうでない場合もあります。)

そこで、簡単に引用記号をつけることができるスクリプトを作成しました。

import tkinter as Tk
import subprocess

text = Tk.Text().clipboard_get()
p = subprocess.Popen(['clip'], stdin=subprocess.PIPE, shell=True)
p.stdin.write("".encode('shift-jis') + text.replace("\n", "\n"+"").encode("shift-jis"))
p.stdin.close()

使い方は簡単!
引用記号を付けたい文章をコピーしてスクリプトを実行するだけ。
クリップボードを内容を加工しているので必要な操作はコピー操作だけです。

是非、お試しあれ~

※留意点※

HTML形式のアウトライン文章など、コピー内容によっては期待通りに動作しないケースもあります。

2
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?