xtyxtyx / sorry Goto Github PK
View Code? Open in Web Editor NEW在线制作`sorry 为所欲为`的gif
Home Page: https://sorry.xuty.cc/
License: MIT License
在线制作`sorry 为所欲为`的gif
Home Page: https://sorry.xuty.cc/
License: MIT License
Errno::ENOENT at /sorry/make
No such file or directory @ rb_sysopen - temp/b244dda3e47566312e22505de0b409b8.gif
$ gem install bundler
Fetching: bundler-1.16.1.gem (100%)
Successfully installed bundler-1.16.1
Parsing documentation for bundler-1.16.1
Installing ri documentation for bundler-1.16.1
Done installing documentation for bundler after 6 seconds
1 gem installed
$ gem install ffmpeg
Fetching: ffmpeg-0.2.5.gem (100%)
Successfully installed ffmpeg-0.2.5
Parsing documentation for ffmpeg-0.2.5
Installing ri documentation for ffmpeg-0.2.5
Done installing documentation for ffmpeg after 0 seconds
1 gem installed
[fudax@fudax sorry]$ bundle install
Fetching gem metadata from https://rubygems.org/.........
Using bundler 1.16.1
Fetching daemons 1.2.6
Installing daemons 1.2.6
Fetching eventmachine 1.2.5
Installing eventmachine 1.2.5 with native extensions
Fetching mustermann 1.0.2
Installing mustermann 1.0.2
Fetching rack 2.0.4
Installing rack 2.0.4
Fetching rack-protection 2.0.1
Installing rack-protection 2.0.1
Fetching tilt 2.0.8
Installing tilt 2.0.8
Fetching sinatra 2.0.1
Installing sinatra 2.0.1
Fetching thin 1.7.2
Installing thin 1.7.2 with native extensions
Bundle complete! 2 Gemfile dependencies, 9 gems now installed.
Use bundle info [gemname]
to see where a bundled gem is installed.
$ ruby src/sorry.rb
== Sinatra (v2.0.1) has taken the stage on 3389 for development with backup from Thin
Thin web server (v1.7.2 codename Bachmanity)
Maximum connections set to 1024
Listening on 0.0.0.0:3389, CTRL+C to stop
666就是我想说的
真是个悲伤的故事,有没有QQ群啊
生成的.gif 能正常显示中文,但是英文乱码.
搭建环境: centos 7 , ruby 2.5.0 , 已安装中文包
能不能更新个PHP的。比如直接装个插件上传就可以了。!!非常需求。
不输入任何句子, 就用默认的句子, 直接点击 "生成" 按钮, 生成的.gif 能正常显示中文,
而输入中文句子, 则.gif 只能显示英文, 不能显示中文.
搭建环境: centos 7 , ruby 2.5.0 , 已安装中文包
如何添加模板?Issues提交一个视频就可以了?
有大小要求么?
一直显示这个,清理缓存后也没有用
我刚参照sorry写了个Python版的能合并进来么?sorrypy
哥们API怎么不能用了
在site_config.yml
貌似就这里有端口,却无法生效
我尝试了下面的方法,对输出的 gif 进行了压缩。
对输入视频:
对生成 gif:
经过上面的尝试,我还是只能把 sorry 系列压缩成 1.5MB 还是略大。请问还有哪些点可以优化呢?
example.png,index.html,template.erb,template.mp4
其中ass文件直接改后缀为erb可行吗?
勇士闯魔城第一季第六集
想要偷电瓶车的那个动图
按照教程安装所需软件,ruby,ffmpeg等,点击生成,出现如下错误
Errno::ENOENT at /sorry/make
No such file or directory @ rb_sysopen - temp/474217342e83ceb6b25573205a175529.gif
file: fileutils.rb location: initialize line: 1289
....
...
感觉这个也是可以尝试一下的
apng 如今正在广泛的应用起来。
以前在windows平台下写过个类似的脚本,使用了以上提到的优化方案
https://github.com/celeron533/GIFConverter/blob/master/GIFConverter.cmd
Sample
https://github.com/celeron533/GIFConverter/blob/master/README.md
按照步骤部署在自己的服务器上之后,网页显示正常,ruby src/sorry.rb运行之后在网页上操作,点生成无反应。求大佬指导,是有哪里还需要改动吗?
什么时候能添加上那个打工的gif啊
在前面的场景还未结束时,已经出现了最后一句话,建议将该句时间稍向后调整
如题
make请求返回请刷新或清除浏览器缓存,localStorage处理有问题
项目连接:
https://github.com/CoXier/iemoji-wechat
ios 和 Android 均可使用。
能否用Php实现
2018-02-25 01:31:36 - Errno::ENOENT - No such file or directory @ rb_sysopen - temp/197cb3a57353158ba1ca7f3f198a4ffd.gif:
/usr/lib/ruby/2.3.0/fileutils.rb:1392:in `initialize'
/usr/lib/ruby/2.3.0/fileutils.rb:1392:in `open'
/usr/lib/ruby/2.3.0/fileutils.rb:1392:in `initialize'
/usr/lib/ruby/2.3.0/fileutils.rb:1392:in `open'
/usr/lib/ruby/2.3.0/fileutils.rb:1392:in `copy_file'
/usr/lib/ruby/2.3.0/fileutils.rb:486:in `copy_file'
/usr/lib/ruby/2.3.0/fileutils.rb:403:in `block in cp'
/usr/lib/ruby/2.3.0/fileutils.rb:1571:in `block in fu_each_src_dest'
/usr/lib/ruby/2.3.0/fileutils.rb:1585:in `fu_each_src_dest0'
/usr/lib/ruby/2.3.0/fileutils.rb:1569:in `fu_each_src_dest'
/usr/lib/ruby/2.3.0/fileutils.rb:402:in `cp'
/root/sorry_own/src/sorry/cache.rb:31:in `add_file'
/root/sorry_own/src/sorry/make_gif.rb:71:in `render_gif'
src/sorry.rb:23:in `block in <main>'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1634:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1634:in `block in compile!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:992:in `block (3 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1011:in `route_eval'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:992:in `block (2 levels) in route!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1039:in `block in process_route'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1037:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1037:in `process_route'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:990:in `block in route!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:989:in `each'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:989:in `route!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1096:in `block in dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1093:in `dispatch!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:924:in `block in call!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `block in invoke'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `catch'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1075:in `invoke'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:924:in `call!'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:913:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/xss_header.rb:18:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/path_traversal.rb:16:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/json_csrf.rb:26:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/base.rb:50:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/base.rb:50:in `call'
/var/lib/gems/2.3.0/gems/rack-protection-2.0.1/lib/rack/protection/frame_options.rb:31:in `call'
/var/lib/gems/2.3.0/gems/rack-2.0.4/lib/rack/logger.rb:15:in `call'
/var/lib/gems/2.3.0/gems/rack-2.0.4/lib/rack/common_logger.rb:33:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:231:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:224:in `call'
/var/lib/gems/2.3.0/gems/rack-2.0.4/lib/rack/head.rb:12:in `call'
/var/lib/gems/2.3.0/gems/rack-2.0.4/lib/rack/method_override.rb:22:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:194:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1957:in `call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1501:in `block in call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1728:in `synchronize'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1501:in `block in call'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1728:in `synchronize'
/var/lib/gems/2.3.0/gems/sinatra-2.0.1/lib/sinatra/base.rb:1501:in `call'
/var/lib/gems/2.3.0/gems/thin-1.7.2/lib/thin/connection.rb:86:in `block in pre_process'
/var/lib/gems/2.3.0/gems/thin-1.7.2/lib/thin/connection.rb:84:in `catch'
/var/lib/gems/2.3.0/gems/thin-1.7.2/lib/thin/connection.rb:84:in `pre_process'
/var/lib/gems/2.3.0/gems/thin-1.7.2/lib/thin/connection.rb:50:in `block in process'
/var/lib/gems/2.3.0/gems/eventmachine-1.2.5/lib/eventmachine.rb:1076:in `block in spawn_threadpool'
/app/src/sorry/make_gif.rb:55:in `render_ass'
/app/src/sorry/make_gif.rb:29:in `make_gif_with_ffmpeg'
/app/src/sorry/make_gif.rb:67:in `render_gif'
src/sorry.rb:57:in `block in <main>'
用docker容器建的,反馈中摘取这些,可能有用的信息。
def Sorry.make_gif_with_ffmpeg(template_name, sentences, filename)
$mutex.lock
$jobs += 1
$mutex.unlock
# 处理代码
$mutex.lock
$jobs -= 1
$mutex.unlock
end
如果在“处理代码”处抛出异常,$jobs数量就不会减1,多次抛出异常最终导致Sorry.ffmpeg_avaliable
为false
。
template_name
是从url里获取的,只要传入一个错误的值,让Sorry.ass_text(template_name)
读不到文件,即可抛出异常。
打工是不可能打工的
玩梗哪家强,《pop子与pipi美的日常》不接受反驳,谢谢!
素材在这里:
https://github.com/ForlornLily/node-sorry/tree/dev/public/templates/popteamepic
预览:
欢迎大家提供各种梗~
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.