A REPL transcript is a conversation, and the prompts are what make it one. Pasting it as text usually loses them or breaks the alignment.
Codeshotは貼り付けたコードからPython REPLを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
Python REPL
Python REPLのスニペットを、Macから離れることなく共有したくなる画像に。
A REPL transcript is a conversation, and the prompts are what make it one. Pasting it as text usually loses them or breaks the alignment.
Codeshotは貼り付けたコードからPython REPLを判別するので、言語の選び間違いは起きません。付属する30種類のうち3つのテーマで同じスニペットを、アプリ自身のスタイルシートで表示しています。
>>> from snapshot import render
>>> img = render("print('hi')", theme="xcode")
>>> img.size
(1600, 900)
>>> img.save("out.png", scale=2)
'out.png'
>>> from snapshot import render
>>> img = render("print('hi')", theme="xcode")
>>> img.size
(1600, 900)
>>> img.save("out.png", scale=2)
'out.png'
>>> from snapshot import render
>>> img = render("print('hi')", theme="xcode")
>>> img.size
(1600, 900)
>>> img.save("out.png", scale=2)
'out.png'
Keep the triple-chevron prompts and the output together. A transcript without its results is just code, and worse code than you would have written deliberately.
画像サイズを内容に合わせるか、比率で固定します(1:1、4:3、3:2、16:9、9:16、2:3、3:4)。そのうえで1×・2×・3×から選んで書き出せば、Retinaディスプレイでも鮮明なままです。⌘⇧Cでクリップボードに直接コピー、または⌘Sで保存できます。
30種類のテーマを見比べるか、全体の流れをご覧ください。
すべてMac上で動作します。コードが外に出ることはありません。