From 8dc6db023e76bd5d9b68201a5952ceeb1615334f Mon Sep 17 00:00:00 2001 From: Marcin Kulik Date: Tue, 16 Dec 2014 20:20:47 +0000 Subject: [PATCH] Update installation instructions --- app/assets/javascripts/application.js | 2 + app/assets/stylesheets/home.sass | 5 ++ app/presenters/home_page_presenter.rb | 4 ++ app/views/docs/_script_install.html.erb | 1 + .../docs/_script_install_and_other.html.erb | 2 + app/views/docs/getting-started.html.slim | 21 ++---- app/views/docs/installation.html.slim | 70 +++++++++++-------- app/views/home/show.html.slim | 2 +- 8 files changed, 61 insertions(+), 46 deletions(-) create mode 100644 app/views/docs/_script_install.html.erb create mode 100644 app/views/docs/_script_install_and_other.html.erb diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index bd15089..d8f5eaf 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -22,4 +22,6 @@ $(function() { e.preventDefault(); $('.embed-box').slideDown('fast'); }); + + $('[data-toggle="popover"]').popover({ html: true }); }); diff --git a/app/assets/stylesheets/home.sass b/app/assets/stylesheets/home.sass index 5c2f9fb..d201cff 100644 --- a/app/assets/stylesheets/home.sass +++ b/app/assets/stylesheets/home.sass @@ -25,6 +25,11 @@ h1, h2 text-shadow: black 3px 3px 5px + .popover + color: #333 + max-width: 1000px + width: 480px + .features h1 margin: 0 0 20px 0 diff --git a/app/presenters/home_page_presenter.rb b/app/presenters/home_page_presenter.rb index c8feb75..d37e69d 100644 --- a/app/presenters/home_page_presenter.rb +++ b/app/presenters/home_page_presenter.rb @@ -18,6 +18,10 @@ class HomePagePresenter Asciicast.random_featured_limited(6).decorate end + def install_script_url + "https://asciinema.org/install" + end + private def get_asciicast diff --git a/app/views/docs/_script_install.html.erb b/app/views/docs/_script_install.html.erb new file mode 100644 index 0000000..f58ae40 --- /dev/null +++ b/app/views/docs/_script_install.html.erb @@ -0,0 +1 @@ +

On Linux and Mac OS X, the easiest way to install asciinema recorder is to run the following shell command:

curl https://asciinema.org/install | sh

This script will download the latest asciinema recorder binary for your platform, and install it in your $PATH.

diff --git a/app/views/docs/_script_install_and_other.html.erb b/app/views/docs/_script_install_and_other.html.erb new file mode 100644 index 0000000..7db3fcf --- /dev/null +++ b/app/views/docs/_script_install_and_other.html.erb @@ -0,0 +1,2 @@ +<%= render partial: 'docs/script_install' %> +

Other installation options, including distro specific packages (Ubuntu, Fedora, Arch Linux, Gentoo), are also available.

diff --git a/app/views/docs/getting-started.html.slim b/app/views/docs/getting-started.html.slim index 982e4bd..6fd281d 100644 --- a/app/views/docs/getting-started.html.slim +++ b/app/views/docs/getting-started.html.slim @@ -1,19 +1,12 @@ - content_for(:title, 'Getting started') +h1 Getting started +h2 1. Install the recorder + += render partial: 'docs/script_install_and_other' + markdown: - # Getting started - - ## 1. Install the recorder - - The latest stable version of asciinema can always be installed or updated - to via [pip](http://www.pip-installer.org/en/latest/index.html): - - sudo pip install --upgrade asciinema - - See [installation docs](#{docs_path(:installation)}) for more installation - methods (Ubuntu, Fedora, Arch Linux, Gentoo). - ## 2. Record Go to your terminal and run the following command: @@ -31,8 +24,8 @@ markdown: $ asciinema auth - If you skip this step now, you can always run the above command later and all - previously recorded asciicasts will automatically get assigned to your new + If you skip this step now, you can run the above command later and all + previously recorded asciicasts will automatically get assigned to your profile. NOTE: To be able to edit/delete your recordings you have to assign them to diff --git a/app/views/docs/installation.html.slim b/app/views/docs/installation.html.slim index 6ca59bc..23ac5cb 100644 --- a/app/views/docs/installation.html.slim +++ b/app/views/docs/installation.html.slim @@ -1,52 +1,60 @@ - content_for(:title, 'Installation') +h1 Installation + +h2 The easy way += render partial: 'docs/script_install' + markdown: - # Installation + ## Manual download - The latest stable version of asciinema recorder can always be found at - [pypi.python.org/pypi/asciinema](https://pypi.python.org/pypi/asciinema). - You can install or update it via - [pip](http://www.pip-installer.org/en/latest/index.html): + You can + [download the latest binary](https://github.com/asciinema/asciinema-cli/releases) + for your platform and place it in your `$PATH`. - sudo pip install asciinema + ## Using package manager - If you don't have `pip`, first install it with `easy_install`: + You can also use your favorite package manager to install asciinema recorder. + Note that it takes time for native packages to be updated so you may not get + the latest released version. - sudo easy_install pip - sudo pip install asciinema - - ## Ubuntu - - To install native Ubuntu package of asciinema recorder add [zanchey - ppa](https://launchpad.net/~zanchey/+archive/asciinema) to your software - sources list: - - sudo apt-add-repository ppa:zanchey/asciinema - sudo apt-get update - sudo apt-get install asciinema - - ## Fedora - - asciinema rpm package is included in the main Fedora 19 and 20 repository: - - sudo yum install asciinema - - ## Arch Linux + ### Arch Linux Arch Linux users can install the [AUR package](https://aur.archlinux.org/packages/asciinema/): sudo yaourt -S asciinema - ## Gentoo Linux + ### Fedora + + asciinema rpm package is included in the main Fedora 19 and 20 repository: + + sudo yum install asciinema + + ### Gentoo Linux Gentoo Linux users can install the [portage package](http://packages.gentoo.org/package/app-misc/asciinema): sudo emerge asciinema - ## No native package for your operating system? + ### Ubuntu - If you use some other operating system and you know how to build a native - package for it then don't hesitate, build one and let us know. + To install Ubuntu package add + [zanchey ppa](https://launchpad.net/~zanchey/+archive/asciinema) to your + software sources list: + + sudo apt-add-repository ppa:zanchey/asciinema + sudo apt-get update + sudo apt-get install asciinema + + ### No package for your operating system? + + If you use other operating system and you know how to build a native package + for it then don't hesitate, build one and let us know. + + ## From source + + For instructions on building asciinema from source please refer to the + [README file](https://github.com/asciinema/asciinema-cli/blob/master/README.md). diff --git a/app/views/home/show.html.slim b/app/views/home/show.html.slim index 5e16d43..ca6a9c4 100644 --- a/app/views/home/show.html.slim +++ b/app/views/home/show.html.slim @@ -11,7 +11,7 @@ p '   p - = link_to 'Start Recording', docs_path('getting-started'), class: 'btn btn-success' + button type="button" class="btn btn-success" data-toggle="popover" data-content="#{render partial: 'docs/script_install_and_other'}

Once installed start recording with:

asciinema rec
" Start Recording p ' Supports Linux and Mac OS X