-
-
Notifications
You must be signed in to change notification settings - Fork 266
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make .txt version and .gif instructions discoverable via Download dro…
…pdown
- Loading branch information
Showing
5 changed files
with
113 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
lib/asciinema_web/templates/recording/_gif_modal.html.heex
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
<div class="modal fade" id="gif-modal" tabindex="-1" role="dialog" aria-hidden="true"> | ||
<div class="modal-dialog modal-lg" role="document"> | ||
<div class="modal-content"> | ||
<div class="modal-header"> | ||
<h5 class="modal-title">Generate GIF from this recording</h5> | ||
<button type="button" class="close" data-dismiss="modal" aria-label="Close"> | ||
<span aria-hidden="true">×</span> | ||
</button> | ||
</div> | ||
|
||
<div class="modal-body"> | ||
<p> | ||
While this site doesn't offer GIF conversion at the moment, you can | ||
still do it yourself with the help of asciinema GIF generator utility - <a href="https://github.com/asciinema/agg">agg</a>. | ||
</p> | ||
|
||
<p>Once you have it installed run the following command to create GIF file:</p> | ||
|
||
<pre><code>agg <%= url(~p"/a/#{@asciicast}") %> <%= @asciicast.id %>.gif</code></pre> | ||
|
||
<p>Or, if you already downloaded the recording file:</p> | ||
|
||
<pre><code>agg <%= download_filename(@asciicast) %> <%= @asciicast.id %>.gif</code></pre> | ||
|
||
<p>Check <code>agg --help</code> for all available options. You can change font | ||
family and size, select color theme, adjust speed and more.</p> | ||
|
||
<p>See <a href="https://github.com/asciinema/agg">agg README</a> for | ||
full usage instructions.</p> | ||
</div> | ||
</div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters