[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [O] RFQ - new contribution - org-screenshot.el
From: |
Feng Shu |
Subject: |
Re: [O] RFQ - new contribution - org-screenshot.el |
Date: |
Tue, 21 May 2013 23:36:11 +0800 |
User-agent: |
Gnus/5.130008 (Ma Gnus v0.8) Emacs/24.2 (gnu/linux) |
Haider Rizvi <address@hidden> writes:
> Max Mikhanosha <address@hidden> writes:
>
>> Hi All,
>>
>> I've been writing some documentation in OrgMode with screenshots, and
>> as with any screenshot taking, it takes a while to get one just right.
>>
>> A few tiny helper utilities, quickly snowballed into this :-) It may
>> need some cleanup, but IMHO its too awesome not to share it with the
>> list.
>>
>> To try it out, you'll need /usr/bin/scrot which is available as
>> "scrot" package on most distributions.
>
> Cool. Can you make this a bit portable. On Mac OSX, the utility is
> called screencapture, and can be run with the same flags. Here is a
> piece of code that was published earlier with a sample use.
It's a good idea, "import" has nearly same feature as "scrot" and should
work with org-screenshot ,it is included imagemagick
https://wiki.archlinux.org/index.php/Taking_a_Screenshot
>
> http://thread.gmane.org/gmane.emacs.orgmode/69221/focus=69272
>
> ,----
> | #+BEGIN_SRC emacs-lisp
> | (defun paste-clipboard-to-file (&optional filename temp-dir)
> | "Take a screenshot using the crosshairs and saveit to FILENAME,
> | if it is given or to a temp file in the TEMP-DIR
> | directory. Then add an orgmode style link at point."
> | (interactive)
> | (let* ((temporary-file-directory (or temp-dir "images"))
> | (fname (or filename (make-temp-file "img" nil ".jpg"))))
> | (call-process-shell-command (concat
> | "/usr/sbin/screencapture -s " fname))
> | (insert "\n[[file:" fname "]]")
> | (org-display-inline-images)))
> | ;;
> | (global-set-key (kbd "C-c p") 'paste-clipboard-to-file)
> |
> | #+END_SRC
> `----
>
> Regards,
--
- Re: [O] RFQ - new contribution - org-screenshot.el, (continued)