sh 这个bash脚本创建了一个gource视频。需要gource和libav(可以用brew安装)。

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了sh 这个bash脚本创建了一个gource视频。需要gource和libav(可以用brew安装)。相关的知识,希望对你有一定的参考价值。

#!/bin/bash

ARRAY=(
    "webpack:webpack"
    "webpack:example-app"
    "webpack:enhanced-require"
    "webpack:webpack-dev-middleware"
    "webpack:enhanced-resolve"
    "webpack:template"
    "webpack:webpack-dev-server"
    "webpack:jquery-wpt-module"
    "webpack:bootstrap-wpt-module"
    "webpack:graph"
    "webpack:webpack.github.com"
    "webpack:loader-utils"
    "webpack:webpack-tests-example"
    "webpack:the-big-test"
    "webpack:enhanced-resolve-completion-demo"
    "webpack:core"
    "webpack:tapable"
    "webpack:docs"
    "webpack:analyse"
    "webpack:node-libs-browser"
    "webpack:playground"
    "webpack:webpack-with-common-libs"
    "webpack:react-webpack-server-side-example"
    "webpack:memory-fs"
    "webpack:react-starter"
    "webpack:fastparse"
    "webpack:watchpack"
    "webpack:github-wiki"
    "webpack:concord"
    "webpack:source-list-map"
    "webpack:hot-node-example"
    "webpack:github-org-overview"
    "webpack:analyse-tool"
    "webpack:loader-runner"
    "webpack:webpack-sources"
    "webpack:webpack.js.org"
    "webpack:meeting-notes"
    "webpack:media"
    "webpack:webpack-cli"
    "webpack:webpack-pwa"
    "webpack:escope"
    "webpack-contrib:json-loader"
    "webpack-contrib:raw-loader"
    "webpack-contrib:coffee-loader"
    "webpack-contrib:css-loader"
    "webpack-contrib:style-loader"
    "webpack-contrib:script-loader"
    "webpack-contrib:less-loader"
    "webpack-contrib:grunt-webpack"
    "webpack-contrib:bundle-loader"
    "webpack-contrib:val-loader"
    "webpack-contrib:file-loader"
    "webpack-contrib:url-loader"
    "webpack-contrib:i18n-loader"
    "webpack-contrib:json5-loader"
    "webpack-contrib:worker-loader"
    "webpack-contrib:jshint-loader"
    "webpack-contrib:imports-loader"
    "webpack-contrib:exports-loader"
    "webpack-contrib:mocha-loader"
    "webpack-contrib:coverjs-loader"
    "webpack-contrib:expose-loader"
    "webpack-contrib:node-loader"
    "webpack-contrib:i18n-webpack-plugin"
    "webpack-contrib:component-webpack-plugin"
    "webpack-contrib:coffee-redux-loader"
    "webpack-contrib:compression-webpack-plugin"
    "webpack-contrib:transform-loader"
    "webpack-contrib:karma-webpack"
    "webpack-contrib:html-loader"
    "webpack-contrib:extract-text-webpack-plugin"
    "webpack-contrib:sass-loader"
    "webpack-contrib:source-map-loader"
    "webpack-contrib:react-proxy-loader"
    "webpack-contrib:null-loader"
    "webpack-contrib:multi-loader"
    "webpack-contrib:istanbul-instrumenter-loader"
    "webpack-contrib:yaml-frontmatter-loader"
    "webpack-contrib:svg-inline-loader"
    "webpack-contrib:purifycss-webpack"
    "webpack-contrib:s3-plugin-webpack"
    "webpack-contrib:npm-install-webpack-plugin"
    "webpack-contrib:awesome-webpack"
    "webpack-contrib:babel-minify-webpack-plugin"
    "webpack-contrib:webpack-canary"
    "webpack-contrib:uglifyjs-webpack-plugin"
    "webpack-contrib:organization"
    "webpack-contrib:eslint-config-webpack"
    "webpack-contrib:babel-preset-webpack"
    "webpack-contrib:webpack-defaults"
    "webpack-contrib:schema-utils"
    "webpack-contrib:restyle-loader"
    "webpack-contrib:webpack-addons"
    "webpack-contrib:voting-app"
    "webpack-contrib:gzip-loader"
    "webpack-contrib:cache-loader"
    "webpack-contrib:thread-loader"
    "webpack-contrib:zopfli-webpack-plugin"
    "webpack-contrib:polymer-webpack-loader"
)

touch combined.txt

for item in "${ARRAY[@]}" ; do
  ORG=${item%%:*}
  REPO=${item#*:}
  URL="https://github.com/$ORG/$REPO"
#   git clone $URL
#   cd $REPO && git fetch --all && git rebase && cd ..
  gource --output-custom-log ./output.txt ./$REPO
  sed -i -r "s#\(.*\)\|#\1|/$ORG/$REPO#" ./output.txt
  cat combined.txt output.txt > temp.txt && cat temp.txt > combined.txt 
  rm -f temp.txt output.txt
done

cat combined.txt | sort -n > output.txt
rm -f combined.txt

gource -1920x1080 -s .1 --stop-at-end --multi-sampling --highlight-users --highlight-dirs --auto-skip-seconds 1 --file-filter \.png --dir-colour 8b91a2 --highlight-colour ffffff --key --bloom-multiplier 2.0 --bloom-intensity 1.5 --hide bloom,mouse,filenames,root --seconds-per-day 1 --dir-name-depth 1 -r 25 -o - output.txt | avconv -y -r 25 -f image2pipe -vcodec ppm -i - -b 65536K output-with-dirs.mp4

以上是关于sh 这个bash脚本创建了一个gource视频。需要gource和libav(可以用brew安装)。的主要内容,如果未能解决你的问题,请参考以下文章

sh Gource dos projetos做Soma

推荐一个以动画效果显示github提交记录的黑科技工具:Gource

shell命令中用source 和sh(或者bash)执行脚本的区别,以及export的作用

shell命令中用source 和sh(或者bash)执行脚本的区别,以及export的作用

sh bash脚本用法,$ sh database_init.sh $ dbname $ dbuser $ dbuserpwd。脚本创建一个新数据库,为用户分配所有previleges和cre

sh 通过bash脚本创建MySQL