Giter Site home page Giter Site logo

handwriting-web's Introduction

English | 中文

手写文字生成网站

欢迎来到我的手写文字生成网站!这个平台允许你使用现有的字体来创建模拟手写文字的图片。

网址:https://handwrite.paperai.life Alt text

功能

自定义字体

你可以上传自己的字体来生成符合你需求的独特手写风格。

背景图片

上传你想要的背景图片,为你的手写文字添加个人风格。如果你没有背景图片,别担心!只需指定图片的宽度和高度,我的网站将自动为你生成带有横线的背景图片。

可调参数

你可以完全控制各种参数,如边距(上、下、左、右),字符间的随机扰动,笔画的旋转偏移,墨水的深度变化,涂改痕迹。这使你可以微调你的手写文字的外观。

从各种文件类型中提取文本

我的网站可以从各种文件类型中提取文本内容(如 pdf,docs),使你能够方便地上传文本。

预览功能

我在网站的右侧添加了预览功能。这使你可以在最终确定之前方便地查看你的手写文字图片的效果。

完整图片生成

一旦你对预览满意,你可以生成一整套图片。这些图片将被方便地打包成一个 zip 文件,以便于下载。

pdf 导出功能

一键生成 pdf,不用再手动粘贴图片

自己搭建的方法

克隆项目,在项目目录中使用docker-compose up -d,默认端口为 2345

若要添加字体,字体文件放在项目根目录下的 ttf_files 中

本地运行

  1. 克隆项目到本地
  2. 进入backend文件夹,运行后端程序
cd backend
pip install -r requirements.txt
python app.py
  1. 进入frontend文件夹,运行前端程序
cd frontend
npm install
npm run serve
  1. 打开浏览器,输入http://localhost:8080,即可访问网站

结语

我希望你喜欢使用我的手写文字生成网站来创建你的个性化手写文字图片!

随笔

2024.6.13 由于昨天需要完成政治论文的手写,于是亲自体验了我的程序,发现效果确实不错,但是几个月来一直没有解决处理大量文字的时候程序没响应的问题,经过我添加日志发现,其实后端一直在生成图片,但是由于nginx的超时限制导致请求失败(这个在docker的日志中可以看到),于是我修改了外部和镜像内部的nginx的超时配置,但是问题仍然存在,这时我发现前端控制台中不再是504错误而是524错误,经过查询发现这是因为cf的超时限制是100秒,超过cf的限制而报错,解决方法是关闭小黄云不享受cf的保护,还有一种解决方法就是让后端不断给前端传输数据保持连接活跃。

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.