Skip to content

Commit

Permalink
Update preview (jjochen#73)
Browse files Browse the repository at this point in the history
* put badges in one line (fix cocoadocs layout)

* update preview gif

* add record video action to run script
  • Loading branch information
jjochen authored Jan 1, 2018
1 parent 0b1ee3d commit c964c00
Show file tree
Hide file tree
Showing 3 changed files with 27 additions and 9 deletions.
Binary file modified Images/JJFloatingActionButton.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 1 addition & 9 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,7 @@
# JJFloatingActionButton
Floating Action Button for iOS

![Swift 4.0](https://img.shields.io/badge/Swift-4.0-orange.svg)
[![Version](https://img.shields.io/cocoapods/v/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton)
[![License](https://img.shields.io/cocoapods/l/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton)
[![Platform](https://img.shields.io/cocoapods/p/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton)
[![Build Status](https://circleci.com/gh/jjochen/JJFloatingActionButton.svg?style=shield)](https://circleci.com/gh/jjochen/JJFloatingActionButton)
[![codecov](https://codecov.io/gh/jjochen/JJFloatingActionButton/branch/master/graph/badge.svg)](https://codecov.io/gh/jjochen/JJFloatingActionButton)
[![Documentation](https://jjochen.github.io/JJFloatingActionButton/badge.svg)](https://jjochen.github.io/JJFloatingActionButton)
[![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jjochen/JJFloatingActionButton/issues)

![Swift 4.0](https://img.shields.io/badge/Swift-4.0-orange.svg) [![Version](https://img.shields.io/cocoapods/v/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton) [![License](https://img.shields.io/cocoapods/l/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton) [![Platform](https://img.shields.io/cocoapods/p/JJFloatingActionButton.svg?style=flat)](https://cocoapods.org/pods/JJFloatingActionButton) [![Build Status](https://circleci.com/gh/jjochen/JJFloatingActionButton.svg?style=shield)](https://circleci.com/gh/jjochen/JJFloatingActionButton) [![codecov](https://codecov.io/gh/jjochen/JJFloatingActionButton/branch/master/graph/badge.svg)](https://codecov.io/gh/jjochen/JJFloatingActionButton) [![Documentation](https://jjochen.github.io/JJFloatingActionButton/badge.svg)](https://jjochen.github.io/JJFloatingActionButton) [![Contributions Welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/jjochen/JJFloatingActionButton/issues)

<p align="center">
<a href="#preview">Preview</a> • <a href="#features">Features</a> • <a href="#requirements">Requirements</a> • <a href="#installation">Installation</a> • <a href="#usage">Usage</a> • <a href="#author">Author</a> • <a href="#license">License</a>
Expand Down
26 changes: 26 additions & 0 deletions scripts/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ usage:
$0 tests [destination] Run tests for given destination
$0 release [version] Release new version
$0 documentation Build documentation
$0 video Record video
$0 help Print this help
EOF
}
Expand All @@ -55,6 +56,9 @@ function run_action
documentation)
build_documentation
;;
video)
record_video
;;
*)
usage
exit
Expand Down Expand Up @@ -170,4 +174,26 @@ function update_example_version
/usr/libexec/PlistBuddy -c "Set :CFBundleShortVersionString ${version}" Example/JJFloatingActionButton/Info.plist
}

function record_video
{
fancy_echo "Record video"

mov_path="./Images/JJFloatingActionButton.mov"
gif_path="./Images/JJFloatingActionButton.gif"

xcrun simctl io booted recordVideo $mov_path

fancy_echo "Create gif"

palette="./Images/palette.png"
filters="fps=30,setpts=1*PTS,scale=250:-1:flags=lanczos"

ffmpeg -v warning -i $mov_path -vf "$filters,palettegen" -y $palette
if [[ -f $palette ]]; then
ffmpeg -v warning -i $mov_path -i $palette -lavfi "$filters [x]; [x][1:v] paletteuse" -y $gif_path
rm $palette
fi
}


run_action $*

0 comments on commit c964c00

Please sign in to comment.