Giter VIP home page Giter VIP logo

sorrypy's Introduction

sorrypy

sorry有钱真的可以为所欲为

说明

sorry是一款很有意思的应用,源自于sorry有钱真的可以为所欲为这个梗。 亮点是可以换自己的梗生成gif。 可惜部署环境是ubuntu+ruby,我就重制了个全平台的python重置版博大家一笑。 荣誉首先属于xtyxtyx

sorry客户真的可以为所欲为样例:

部署

  1. 下载安装python3
  2. cmd命令行安装fabric3,flask,imageio pip install fabric3 flask imageio
  3. 在sorrypy项目根目录下,运行cmd命令 初始化,下载安装ffmepg(也可以用别的方法安装,但必须安装)
fab init

运行

fab run
  1. 浏览器打开 http://localhost:5000/ 然后你就可以为所欲为了~~~

CentOS7下ffmpeg安装

yum install epel-release -y
rpm --import http://li.nux.ro/download/nux/RPM-GPG-KEY-nux.ro
rpm -Uvh http://li.nux.ro/download/nux/dextop/el7/x86_64/nux-dextop-release-0-5.el7.nux.noarch.rpm
yum install ffmpeg ffmpeg-devel -y

适配新Gif

目前,想要适配新的gif,需要改动3个文件(修改前建议备份)

templates/sorry/index.html
static/sorry/template.mp4
static/sorry/template.tpl

其中

index.html  按照句子的多少删掉或者增加<input>即可
template.mp4   替换成新视频
template.tpl   替换成新的字幕模板

字幕模板template.tpl

首先使用aegisub为模板视频创建字幕,保存为sorry.template.ass

aegisub教程

图片

然后把文本替换成模板字符串 {{ sentences[n] }} 懒得换图了哈,以这个字符串为准

图片

最后保存为template.tpl

现在这个网站就可以制作新的gif了

Note

欢迎 star ~ fork ~~

Github & 码云

TODO

  • 加入锁机制限制并发
  • 自动生成页面

sorrypy's People

Contributors

east196 avatar

Watchers

Cyerpunk avatar

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.