Coder Social home page Coder Social logo

sorryjava's Introduction

思路是参考sorry,原作是ruby写的,我就撸了个java 轮子,加了一点新功能,可以生成小一点的图片

优化点:

  • 重构首页,方便移动端和PC端访问
  • 首页素材全部CDN,加快加载速度
  • 增加精简模式,可以生成几百k的用来做表情
  • 将文件剥离出程序,可以动态切换

Demo点击查看

sorryJava

sorry的java版本

安装步骤

如果没有自己的服务器,可以去腾讯云 里面个人可以申请7天的服务器,如果你是学生,会有更大的惊喜。 选用云服务器后,安装的时候选择7,然后按照下面步骤配好centos环境。

基础环境需要安装java

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

centOS7安装字体,生成中文字幕需要,否则生成时候会报错

yum groupinstall "fonts"

在服务器上建立文件夹/opt/site/cache/sorry 下载template.mp4template.ftl放进去

以上都是必须的

可以直接下载sorry-java-1.2.0.jar 然后服务器上运行 nohup java -jar sorry-java-1.2.0.jar &

访问 http://ip:8888

windows环境下

windows下执行压制的时候,如果ass的路径是带有盘符的,会报错,可以改成读取相对路径 自己研究代码的时候,windos下面需要安装jdk&maven&git&ffmpeg

记得将ffmpeg 配置到Path下 添加E:\ffmpeg\bin; 这里要换成你的路径

修改application.properties,换成自己电脑的文件夹,例如D:/

cache.template.tempPath=/opt/site/cache/

在自己的文件夹下建立sorry文件夹 下载template.mp4template.ftl放进去

拉取源码

git clone https://github.com/li24361/sorryJava.git

导入ide

打包并运行

mvn package -DskipTests
java -jar sorry-java-1.2.0.jar

访问 http://ip:8888

有问题欢迎提issue

sorryjava's People

Contributors

li24361 avatar

Stargazers

 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.