iPadã§ä½å³ãMacã§ããæãã«ã¡ã¢ã
Table of Contents
ã³ã¼ãæ¸ãããèªãã ãããã®ã¯Macã§ãã£ãã»ãã楽ã ããå³ãæ¸ãããããã®ã¯iPadã楽ãã¨ãããã¨ã§ãã®éãããæãã«ç¹ãã 話ã
ä»ã¾ã§ã®é£æºæ¹æ³
ä»ã¾ã§ã¯ä»¥ä¸ã®æé ã§é£æºãã¦ããããããªãã«é¢åãªã®ã§ãæ°è»½ã«å³ãæ¸ãã¦å·®ãè¾¼ãã¨ããæ°ã«ãªããªãã£ãã
- iPadã®Paperã¨ããã¢ããªã§å³ãæ¸ã
- ShareããAirDropã使ã£ã¦ãã¡ã¤ã«ã転é
- (ã»ã¨ãã©ã®å ´åãã£ã³ãã¹ãµã¤ãºãã£ã±ãã«å³ãæ¸ããªãã®ã§)Previewã§ç»åã®åãåºã
- ã¡ã¢å (Emacs)ã«ãã©ãã°&ãããã
Catalinaã®æ©è½ãå©ç¨ããé£æº
macOS CatalinaããMacã¨iPadãé£æºãããSidecarã¨å ±ã«ãMacã¨iOS1ãé£æºããããã¤ãã®ä¾¿å©æ©è½ãå ¥ã£ãã ããããMacå´ããå®è¡ããã¨iPadã®ã¢ããªãèªåã§èµ·åãããããã¦iPadå´ã§ç·¨éãå®äºããã¨ãMacå´ã«ãã®çµæãåæ ãããã¨ããåãã
- Notesã¸iPadããåç/ããã¥ã¡ã³ã/å³/ãæ¿å ¥
- å ¬å¼ã¡ã¢ã¢ããªã®Notes2㧠å³ã¯ãªã㯠> insert from iPhone or iPad > Take Photo/Scan Document/Add sketch
- ç»å/PDFã«iPadã§æ¸ãè¾¼ã¿
- Finderããç»å/PDFã å³ã¯ãªã㯠> Quick Action > Markup
Notes以å¤ã§ãé£æºããã
å ¬å¼ã®æ©è½ã便å©ãªãã ãã©ãNotesã ãã ã¨ã³ã¼ãã®ã·ã³ã¿ãã¯ã¹ãã¤ã©ã¤ãã¨ãæ©è½ãç¡ããããã®ã§å¸¸ç¨ã§ããªãã(ã¤ã¾ãEmacs org-mode3ã¤ãããã) ã¾ããiPadã§ã®ä½å³ãPaper4ã¨ããã¢ããªã使ããããã®ã§ããã使ããããä½ãè¯ãæ¹æ³ããªããã¨èãã¦ããã¨ãAppleããã¤ã¹éã®ã¯ãªãããã¼ãåææ©è½ ãæãåºããã
ã¯ãªãããã¼ããå©ç¨ããã°ãã¢ããªã±ã¼ã·ã§ã³ã«ç¸ããããã¨ãªãiPad<->Macéã§é£æºã§ãããé常ã«ä¾¿å©5ã
- iPadã®Paperã§å³ãæ¸ã
- ShareããCopyãé¸æ
- Macã®Emacsã§ãã¼ã¹ã(ãã¼ã¹ãæã«hookãã¦ç»åã®ã¿æ¸ãè¾¼ã¿é¨åãCrop)
å®éã®è¨å®
Clipboardããç»åãçæããã¨ããã¯pngpaste6ãããã¦ç»åã®ä½ç½èªååãæãã¯ImageMagicã®mogrifyãå©ç¨ãã¦ããã ã¡ã¤ã³å¦çèªä½ã¯ShellScriptãªã®ã§ã©ã®ã¨ãã£ã¿ãããåãããã«å©ç¨ã§ããã¯ãã ã
(defun org-insert-clipboard-image ()
"Generate png file from a clipboard image and insert a link with caption and org-download tag to current buffer."
(interactive)
(let* ((filename
(concat (file-name-nondirectory (buffer-file-name))
"_imgs/"
(format-time-string "%Y%m%d_%H%M%S")
".png")))
(unless (file-exists-p (file-name-directory filename))
(make-directory (file-name-directory filename)))
(let* ((output-buffer (generate-new-buffer "*Async Image Generator*"))
(proc (progn
(async-shell-command (concat "pngpastet " filename) output-buffer)
(get-buffer-process output-buffer))))
(if (process-live-p proc)
(set-process-sentinel proc #'org-display-inline-images)))
(insert (concat
;; DOWNLOADED tag allows you to delete an image by org-download-delete command.
"#+DOWNLOADED: clipboard @ "
(format-time-string "%Y-%m-%d %H:%M:%S\n#+CAPTION: \n")
"[[file:" filename "]]"))))
;; Do not pop-up async-image-generator buffer because it's annoying.
(add-to-list 'display-buffer-alist '("^*Async Image Generator*" . (display-buffer-no-window)))
(define-key org-mode-map (kbd "C-M-y") 'org-insert-clipboard-image)
#!/bin/bash -eu
img=${1%.*}
ext=${1##*.}
function cleanup () {
[ -f $img.tif ] && rm $img.tif
}
trap cleanup EXIT
pngpaste $img.tif && \
convert $img.tif $img.$ext && \
mogrify -fuzz 5% -trim +repage $img.$ext
echo "Success to generate $(basename $img.$ext)"
Paperããã³ãã¼ããç»åã¯ãclipboardinfoãèªãã§ãç»åæ å ±ãã®ã£ã¦ããªãã ãã®ããããpngpasteã§ç´æ¥pngãçæããã¨å¤è²ãã¦ãã¾ãããã£ã¦ãgifã®ããã«å£åãããjpegã®ããã«ééç¡å¹åãããªãtifãçµç±ããã¨ããworkaroundãã¨ã£ã¦ããã (tifãã®ã¾ã¾ã ã¨ç»åãµã¤ãºãã§ããã®ã§NG)
æ¢åã®å³ã«ãã§ã¤è¶³ããã
ããã¥ã¡ã³ãã¨ãã¹ã©ã¤ããèªãã§ããã¨ãåºã¦ããå³ã«å¯¾ãã¦ç解ããå 容ãæ¸ãè¾¼ã¿ãããã¨ãããããããªå ´åã¯ãæ¨æºã®QuickAction > Markup ã使ã£ã¦æ¸ãè¾¼ãã§ããããã®æãç»åã®ãã¹ãæåã§æ¢ãã¦Finderéãã®ã¯é¢åãªã®ã§ãããé¢æ°ãå®ç¾©ãã¦ããã
(defun org-image-open-in-finder()
(interactive)
(let* ((linkp (bounds-of-thing-at-point 'sentence))
(link (buffer-substring-no-properties (car linkp) (cdr linkp)))
(filename (replace-regexp-in-string "\\[\\[\\([^:]*:\\)?\\([^]]+\\)\\].*" "\\2" link)))
(shell-command (concat "open " (file-name-directory filename)))))
(define-key org-mode-map (kbd "C-M-l") 'org-image-open-in-finder)
ç´æ¥QuickActionãEmacsããå¼ã³ããã£ãããAutomaterãããã®Libraryã«ãã®æã®é¢æ°ããªãã£ãã®ã§è«¦ããããªã«ãæ¹æ³ãããã°æãã¦ã»ããã
ã¤ã¾ããiPadã ãã§ã¯ãªãiPhoneã§ã使ãã ↩︎
Keynoteã§ãåæ§ã®æ©è½ãå³ã¯ãªãã¯ã§å¼ã³åºãã(ããããä»ã®å ¬å¼ã¢ããªã§ãåæ§ã®æ©è½ã使ãã) ↩︎
ãã®ããã°ãorg-modeã§æ¸ããã¦ãã(Hugoã¯Orgè¨æ³ããµãã¼ã) ↩︎
ã·ã³ãã«ã§æ軽ã«ä½¿ãã¦ãç´ç·/ç¢å°/å³å½¢è£æ£ãæããã®ã§å³ãSketchãæ¸ãããããèæ¯ãééã§ãã¦ãã³ãããªã©ã®ã¸ã§ã¹ãã£ã¼ãè³¢ãã¢ã㪠↩︎
ä½ç½ã«ãããç¹ã«… :thinking_face: ↩︎
ã¯ãªãããã¼ãã®ç»åãåºåããpngpasteã³ãã³ãã¨Emacsã®é£æº (macOS) - Qiita ↩︎
.