Coder Social home page Coder Social logo

zechris / asciinema-rec_script Goto Github PK

View Code? Open in Web Editor NEW
26.0 26.0 4.0 2.59 MB

Record ๐Ÿ’ญ comments and โฏ commands from from shell scripts in addition to their output.

Home Page: https://github.com/asciinema/asciinema#rec-filename

License: GNU General Public License v3.0

Shell 63.44% AGS Script 28.62% Roff 3.44% Makefile 2.66% Dockerfile 1.84%
asciicast asciinema recorder recording shell-script terminal terminal-recording

asciinema-rec_script's People

Contributors

github-actions[bot] avatar vorburger avatar zechris avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

asciinema-rec_script's Issues

Generate Markdown (or just text which can be included in MD?)

@zechris thanks for this cool great tool! I'm using it e.g. here._

It occured to me that what would be cool is that in addition to generating a .cast, it could also render an *.md ...

In my project's documentation I am putting the screencast of a demo on top of a page, and then also show the script and output as MD doc after it (to make it more easily readable, and copy/paste-able from, and search engine indexed).

My current approach is to asciinema cat *.cast and then manually to remove the ANSI control codes; see here.

It occured to me that this is "sub-optimal"... as this asciinema-rec_script already processes the source script file, it could make more sense for it to directly produce MD? That way comments could be put inline into the MD (with MD formatting, outside of the code block), output could be a bash code-block - and perhaps cat / bat files could be "inlined" with a code block depending on their extension.

I fully understand that while this works for a "simple" command, we could not transform a terminal session in the general case to markdown text, so this would not work for a more advanced "TUI"-like script and recording, like it does for simpler "call this command and show the output that produces".

[SUGGESTION] shebang and agg support

Hello,

what a cute little script, thank you for this.

Just to let you know that I have made a couple of changes in my copy.

  1. I am adding the script as shebang on my scripts :) so that it looks like
#!/usr/local/bin/asciinema-rec_script

## Date maths

# The `date` command can be used to retrieve the:
#  * *day of the week* using the `%l` option
day_of_the_week=$(date +%l)

#  * *hour of the day* using the `%u` option
hour=$(date +%u)
  1. I have also added support for generating gifs using agg
asciinema_rec "$script" --title "${title:-${script##*/}}" "${args[@]}"
agg ${screencast} ${screencast%.cast}.gif 

Powershell

Hi,
how can I use with powershell?

best reagrds

Specify `cols` and `rows` ?

Hi!

I can't find a way to specify the cols and rows arguments that I usually pass to asciinema.

Can you tell me if it is possible to do it?

Thanks!

Using `rm -rf <directory>` doesn't do anything?

Hello,

I made a simple script:

mkdir abc
: rm -rf abc

But the last command is supposed to remove the directory abc and for some reason that I don't explain, it doesn't do it.

Can you help me?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.