This package provides a command for taking screenshots of an individual frame. It also support setting up the frame according to simple predetermined rules.
This package uses the import
and convert
binaries from the imagemagick package.
This is a slightly modified copy of the file I used to take a screenshot for moody.
(require 'frameshot) (load-file "github-readme.el") (frameshot-setup '((name . "moody") (height . 200) (width . 888) (shadow . ((color . "black") (opacity . 60) (sigma . 7) (x . 3) (y . 4))))) (load-file "moody-init.el") ; contains (use-package moody ...) (find-file "moody-init.el") ; show that example in the screenshot (message "")
Given the above configuration I would have done this like so:
cd ~/git/web/emacsair.me/assets/readme emacs --load moody.el
Note that I didn’t use -Q
. Not doing that has the advantage that you don’t have to do anything special to load the features that you would like to take a screenshot of, like adjusting the load-path
. On the other hand you might have to turn off some features that you do not want to appear in the screenshot. You will have to decide what is best for your use-case.
[f8]
. If you did some manual setup, then you might have to clear the minibuffer first. Press [f7]
to do so. You can also press [f6]
to run frame-setup
on the selected frame again.
The resulting screenshot looks like this:
frameshot-take
adds a timestamp to the file-names (so that you can take multiple screenshots without having to worry about overwriting an older one).
mv 19700101:00:00:00-minions.png minions.png
The README.org of minions
contains.
[[http://readme.emacsair.me/moody.png]]
I can update that screenshot following the above steps and then running:
git add . cd ../.. make publish-readme
Github caches images for a very long time unless it is told not to by using no-cache
as the value of the HTTP Cache-Control
header.
If you are interested in such a setup, then have a look at the emacsair.me build tools, in particular the Makefile
and the files in asserts/readme
.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4