修改了传图脚本

This commit is contained in:
Gitea 2021-11-10 17:32:04 +08:00
parent a1e41b828f
commit 5140efc7a8
4 changed files with 289 additions and 89 deletions

180
README-en.md Normal file
View File

@ -0,0 +1,180 @@
<h1 align="center">MrDoc - Writing documents, Gathering ideas</h1>
<p align="center">Personal and small team notes, documents, knowledge management privatization deployment scheme</p>
<p align="center">
<a href="./README-zh.md">中文介绍</a> |
<a href="./README.md">English Description</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/MrDoc-v0.7.2-brightgreen.svg" title="Mrdoc" />
<img src="https://img.shields.io/badge/Python-3.5+-blue.svg" title="Python" />
<img src="https://img.shields.io/badge/Django-v2.2-important.svg" title="Django" />
</p>
<p align="center">
<a href="https://mrdoc.pro/en.html">Home</a> |
<a href="http://mrdoc.zmister.com/">Example Site</a> |
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=LsgDSw8a6IlrzORBGGyRC6LrlIU_vYON&jump_from=webapi">QQ Group</a>
</p>
<p align="center">
<a href="https://doc.mrdoc.pro/project-7/">Installation Manual</a> |
<a href="https://doc.mrdoc.pro/project-54/">User Manual</a> |
<a href="https://doc.mrdoc.pro/project-20/">Document Example</a>
</p>
<p align="center">Source code<a href="https://gitee.com/zmister/MrDoc">Gitee</a> |
<a href="https://github.com/zmister2016/MrDoc">GitHub</a>
</p>
### Introduce
`Mrdoc` is an online document system developed based on python. It is suitable for individuals and small teams to manage documents, knowledge and notes. It is committed to become a private online document deployment solution for the whole platform (web, desktop, mobile).
Current Platform
- Web[instructions](http://mrdoc.zmister.com/project-7/)
- Chrome Extends:
- [instructions](http://mrdoc.zmister.com/project-7/doc-243/)
- [simpread](https://github.com/Kenshin/simpread)[instructions](https://github.com/Kenshin/simpread/issues/893)
- Mobile App(developing)
## Example Site
Open Source Edition - [http://mrdoc.zmister.com](http://mrdoc.zmister.com)
Professional Edition - [https://doc.mrdoc.pro](https://doc.mrdoc.pro)
username:test1 password:123456
## Donate
<p align="center">Donate a can of Coffee to the author to speed up the development.</p>
<p>
<a href="https://ko-fi.com/zmister">Ko-Fi</a> |
<a href="https://paypal.me/zmister">PayPal</a>
</p>
<p align="center">
<img src="http://mrdoc.zmister.com/media/202106/dashang_wxwebp_1622762424.jpg" height=200>
<img src="http://mrdoc.zmister.com/media/202106/dashang_alipaywebp_1622762435.jpg" height=200>
<img src="http://mrdoc.zmister.com/media/202106/dashang_qqwebp_1622762444.jpg" height=200>
</p>
## Feature
- **Site Manage & User Manage**
- Support user registration, login, management, administrator and other basic user functions;
- Support site configuration registration invitation code, advertising code, statistics code, email retrieval password, site wide close registration, site wide forced login and other management functions;
- It supports the configuration of the permission of the Project, and provides four permission modes: public, private, visible to the specified user and visible to the access code;
- **Document System**
- Document writing and reading are based on the Project, with five modules, namely **project**, **document**, **document template**, **image** and **attachment**;
- The `markdown` editor based on `editormd` and `vditor` is used to optimize and extend, and the `markdown` syntax is used for document writing, and image management and uploading, table pasting, mind mapping, flow chart drawing and sequence diagram drawing are supported;
- Two column **document reading** page, three-level directory level display, document reading font scaling, font type switching, page social sharing, mobile reading optimization, text collection export PDF, ePub file;
- Support the account based `API` interface, which can use the account `token` to get the corpus, upload pictures and create documents through the 'API';
- Supports the project collaboration function. A project can have one Creator and multiple collaborators, and can flexibly select collaboration permissions;
- It supports the function of document historical version to view and compare the differences between the historical version and the existing version, and restore a historical version to the current version;
Update Record : [CHANGES.md](./CHANGES.md)
## Simple Installation Tutorial
### 1. install dependent modules
```
pip install -r requirements.txt
```
### 2. Initialize database
After installing the required third-party library and configuring the database information, we need to initialize the database.
Open the command line interface under the project path and run the following command to generate the database migration:
```
python manage.py makemigrations
```
Run the following command to perform database migration:
```
python manage.py migrate
```
After execution, the database is initialized.
### 3. Create Super User
After initializing the database, you need to create an administrator account to manage the whole mrdoc. Open the command line terminal in the project path and run the following command:
```
python manage.py createsuperuser
```
Follow the prompts to enter the user name, email address and password.
### 4、Test Running
After completing the above steps, you can run and use mrdoc.
In the test environment, you can use the server provided by Django to run mrdoc. The command is:
```
python manage.py runserver
```
## Third party deployment tools
- [Docker Image](https://registry.hub.docker.com/r/jonnyan404/mrdoc-nginx)
- [Linux Deployment Script](https://gitee.com/jonnyan404/oh-my-mrdoc)
- [Windows Deployment Pannel](https://gitee.com/debj031634/win-django)
## Feedback
### 1. Commit Issue
Submit questions on the following pages:
- [https://gitee.com/zmister/MrDoc/issues](https://gitee.com/zmister/MrDoc/issues)
- [https://github.com/zmister2016/MrDoc/issues](https://github.com/zmister2016/MrDoc/issues)
### 2. Join the mrdoc communication group
Join the mrdoc communication Tencent QQ group Group number:
- **735507293**
- **849206042**
### 3. Contact author
WeChat Subscription : **zmister2016**
## Dependent
Thanks for the development based on the following projects
- Python
- Django
- Jquery
- LayUI
- PearAdminLayui
- Editor.md
- Marked
- CodeMirror
- Echarts
- Viewer.js
- Sortable.js
- Vditor
- TinyMCE
## License
<a href="./LICENSE">GPL-3.0</a>
Business License Contact:zmister@qq.com

192
README.md
View File

@ -1,12 +1,13 @@
<h1 align="center">MrDoc - Writing documents, Gathering ideas</h1>
<h1 align="center">觅思文档开源版</h1>
<p align="center">Personal and small team notes, documents, knowledge management privatization deployment scheme</p>
<p align="center">个人和小型团队的云笔记、云文档、知识管理私有化部署方案</p>
<p align="center">
<a href="./README-zh.md">中文介绍</a> |
<a href="./README.md">English Description</a>
</p>
<p align="center">
<img src="https://img.shields.io/badge/MrDoc-v0.7.2-brightgreen.svg" title="Mrdoc" />
<img src="https://img.shields.io/badge/Python-3.5+-blue.svg" title="Python" />
@ -14,50 +15,63 @@
</p>
<p align="center">
<a href="https://mrdoc.pro/en.html">Home</a> |
<a href="http://mrdoc.zmister.com/">Example Site</a> |
<a href="https://qm.qq.com/cgi-bin/qm/qr?k=LsgDSw8a6IlrzORBGGyRC6LrlIU_vYON&jump_from=webapi">QQ Group</a>
<a href="https://mrdoc.pro">官网</a> |
<a href="http://mrdoc.zmister.com/">演示站点</a> |
<a href="http://shang.qq.com/wpa/qunwpa?idkey=143c23a4ffbd0ba9137d2bce3ee86c83532c05259a0542a69527e36615e64dba">QQ群</a>
</p>
<p align="center">
<a href="https://doc.mrdoc.pro/project-7/">Installation Manual</a> |
<a href="https://doc.mrdoc.pro/project-54/">User Manual</a> |
<a href="https://doc.mrdoc.pro/project-20/">Document Example</a>
<a href="https://doc.mrdoc.pro/project-7/">安装手册</a> |
<a href="https://doc.mrdoc.pro/project-54/">使用手册</a> |
<a href="https://doc.mrdoc.pro/project-20/">文档效果</a>
</p>
<p align="center">Source code<a href="https://gitee.com/zmister/MrDoc">Gitee</a> |
<p align="center">源码:<a href="https://gitee.com/zmister/MrDoc">码云</a> |
<a href="https://github.com/zmister2016/MrDoc">GitHub</a>
</p>
## 简介
### Introduce
`MrDoc` 是基于`Python`开发的在线文档系统,适合作为个人和小型团队的私有云文档、云笔记和知识管理工具。致力于成为优秀的私有化在线文档部署方案。
`Mrdoc` is an online document system developed based on python. It is suitable for individuals and small teams to manage documents, knowledge and notes. It is committed to become a private online document deployment solution for the whole platform (web, desktop, mobile).
目前涵盖终端:
Current Platform
- Web端
- Chrome扩展
- [MrDoc官方插件](https://gitee.com/zmister/mrdoc-webclipper)[使用说明](http://mrdoc.zmister.com/project-7/doc-243/)
- [简悦扩展](https://github.com/Kenshin/simpread)[使用说明](https://github.com/Kenshin/simpread/issues/893)
- Web[instructions](http://mrdoc.zmister.com/project-7/)
- Chrome Extends:
- [instructions](http://mrdoc.zmister.com/project-7/doc-243/)
- [simpread](https://github.com/Kenshin/simpread)[instructions](https://github.com/Kenshin/simpread/issues/893)
- Mobile App(developing)
开发中的终端:
## Example Site
- 手机APP
Open Source Edition - [http://mrdoc.zmister.com](http://mrdoc.zmister.com)
计划中的终端:
Professional Edition - [https://doc.mrdoc.pro](https://doc.mrdoc.pro)
- 桌面客户端
username:test1 password:123456
## Donate
## 演示站点
<p align="center">Donate a can of Coffee to the author to speed up the development.</p>
<p>
<a href="https://ko-fi.com/zmister">Ko-Fi</a> |
<a href="https://paypal.me/zmister">PayPal</a>
开源版 - [http://mrdoc.zmister.com](http://mrdoc.zmister.com)
专业版 - [https://doc.mrdoc.pro](https://doc.mrdoc.pro)
开源版与专业版差异 - [https://doc.mrdoc.pro/project-7/doc-3441/](https://doc.mrdoc.pro/project-7/doc-3441/)
用户名test1 密码123456
## 打赏支持
<p align="center">「付费部署服务」请添加作者QQ3280350050</p>
<p align="center">请作者喝一罐红牛,助他天天能迭代,日日可更新。<a href="http://mrdoc.zmister.com/project-7/doc-1366/">打赏赞助鸣谢榜</a></p>
<p align="center">
<a href="http://mrdoc.zmister.com/project-7/doc-434/">微信</a>|
<a href="http://mrdoc.zmister.com/project-7/doc-434/">支付宝</a>|
<a href="http://mrdoc.zmister.com/project-7/doc-434/">QQ</a>|
<a href="https://paypal.me/zmister">PayPal</a> |
<a href="https://ko-fi.com/zmister">Ko-Fi</a>
</p>
<p align="center">
@ -66,98 +80,100 @@ username:test1 password:123456
<img src="http://mrdoc.zmister.com/media/202106/dashang_qqwebp_1622762444.jpg" height=200>
</p>
## Feature
- **Site Manage & User Manage**
- Support user registration, login, management, administrator and other basic user functions;
- Support site configuration registration invitation code, advertising code, statistics code, email retrieval password, site wide close registration, site wide forced login and other management functions;
- It supports the configuration of the permission of the Project, and provides four permission modes: public, private, visible to the specified user and visible to the access code;
- **Document System**
- Document writing and reading are based on the Project, with five modules, namely **project**, **document**, **document template**, **image** and **attachment**;
- The `markdown` editor based on `editormd` and `vditor` is used to optimize and extend, and the `markdown` syntax is used for document writing, and image management and uploading, table pasting, mind mapping, flow chart drawing and sequence diagram drawing are supported;
- Two column **document reading** page, three-level directory level display, document reading font scaling, font type switching, page social sharing, mobile reading optimization, text collection export PDF, ePub file;
- Support the account based `API` interface, which can use the account `token` to get the corpus, upload pictures and create documents through the 'API';
- Supports the project collaboration function. A project can have one Creator and multiple collaborators, and can flexibly select collaboration permissions;
- It supports the function of document historical version to view and compare the differences between the historical version and the existing version, and restore a historical version to the current version;
## 适用场景
Update Record : [CHANGES.md](./CHANGES.md)
个人云笔记、在线产品手册、团队内部知识库、在线电子教程等私有化部署场景。
## Simple Installation Tutorial
## 功能特性
### 1. install dependent modules
- **站点管理**
- 用户注册、用户登录、用户管理、图片管理、附件管理、文档管理、文集管理、注册邀请码配置、全站关闭注册开关、全站强制登录开关;
- 广告代码配置、统计代码配置、站点信息配置、备案号配置;
- 附件格式配置、附件大小配置、图片大小配置;
- **个人管理**
- 文集管理:新建、删除、权限控制、转让、协作、导出、生成电子书格式文件
- 文档管理:新建、删除、回收站、历史版本
- 文档模板管理:新建、删除
- 图片管理:上传、分组、删除
- 附件管理:上传、删除
- Token管理借助Token高效新建和获取文档
- 个人信息管理:修改昵称、修改电子邮箱、切换文档编辑器;
- **文档书写**
- 文本文档、表格文档两种文档类型,`Markdown` 、富文本两种编辑模式,`Editor.md``Vditor``iceEditor`三种编辑器加持,自由选择、自由切换;
- 图片、附件、科学公式、音视频、思维导图、流程图、Echart图表
- 文档排序、文档上级设置、文档模板插入;
- 文档标签设置;
- **文档阅读**
- 两栏式布局,三级目录层级显示,左侧文集大纲,右侧文档正文;
- 文档阅读字体缩放、字体类型切换、页面社交分享、移动端阅读优化;
- 文集EPUB、PDF文件下载文档Markdown文件下载
- 标签关系网络图;
- 文档全文搜索;
- 私密文档分享码分享
完整更新记录详见:[CHANGES.md](./CHANGES.md)
## 简明运行教程
### 1、安装依赖库
```
pip install -r requirements.txt
```
### 2. Initialize database
### 2、初始化数据库
After installing the required third-party library and configuring the database information, we need to initialize the database.
在安装完所需的第三方库并配置好数据库信息之后,我们需要对数据库进行初始化。
Open the command line interface under the project path and run the following command to generate the database migration:
在项目路径下打开命令行界面,运行如下命令生成数据库迁移:
```
python manage.py makemigrations
```
Run the following command to perform database migration:
运行如下命令执行数据库迁移:
```
python manage.py migrate
```
执行完毕之后,数据库就初始化完成了。
After execution, the database is initialized.
### 3. Create Super User
After initializing the database, you need to create an administrator account to manage the whole mrdoc. Open the command line terminal in the project path and run the following command:
### 3、创建管理员账户
在初始化完数据库之后需要创建一个管理员账户来管理整个MrDoc在项目路径下打开命令行终端运行如下命令
```
python manage.py createsuperuser
```
按照提示输入用户名、电子邮箱地址和密码即可。
Follow the prompts to enter the user name, email address and password.
### 4、测试运行
在完成上述步骤之后即可运行使用MrDoc。
### 4、Test Running
After completing the above steps, you can run and use mrdoc.
In the test environment, you can use the server provided by Django to run mrdoc. The command is:
在测试环境中可以使用Django自带的服务器运行MrDoc其命令为
```
python manage.py runserver
```
## 第三方部署工具
## Third party deployment tools
- [Docker镜像](https://registry.hub.docker.com/r/jonnyan404/mrdoc-nginx)
- [Linux一键部署脚本](https://gitee.com/jonnyan404/oh-my-mrdoc)
- [Windows部署面板](https://gitee.com/debj031634/win-django)
- [Docker Image](https://registry.hub.docker.com/r/jonnyan404/mrdoc-nginx)
- [Linux Deployment Script](https://gitee.com/jonnyan404/oh-my-mrdoc)
- [Windows Deployment Pannel](https://gitee.com/debj031634/win-django)
## 交流
## Feedback
<p>微信公众号州的先生IDzmister2016</p>
<img src="http://mrdoc.zmister.com/media//202010/2020-10-29_213550.png" height=150 />
### 1. Commit Issue
<p>QQ群735507293 <a href="http://shang.qq.com/wpa/qunwpa?idkey=143c23a4ffbd0ba9137d2bce3ee86c83532c05259a0542a69527e36615e64dba"><img src="http://pub.idqqimg.com/wpa/images/group.png" /></a></p>
<p>QQ群2849206042 <a href="https://qm.qq.com/cgi-bin/qm/qr?k=LsgDSw8a6IlrzORBGGyRC6LrlIU_vYON&jump_from=webapi"><img src="//pub.idqqimg.com/wpa/images/group.png" /></a></p>
Submit questions on the following pages:
## 依赖
- [https://gitee.com/zmister/MrDoc/issues](https://gitee.com/zmister/MrDoc/issues)
- [https://github.com/zmister2016/MrDoc/issues](https://github.com/zmister2016/MrDoc/issues)
### 2. Join the mrdoc communication group
Join the mrdoc communication Tencent QQ group Group number:
- **735507293**
- **849206042**
### 3. Contact author
WeChat Subscription : **zmister2016**
## Dependent
Thanks for the development based on the following projects
觅思文档基于以下项目进行开发,在此表示感谢:
- Python
- Django
@ -173,8 +189,12 @@ Thanks for the development based on the following projects
- Vditor
- TinyMCE
## License
## 协议
<a href="./LICENSE">GPL-3.0</a>
Business License Contact:zmister@qq.com
开源版的使用者必须保留 MrDoc 和觅思文档相关版权标识,禁止对 MrDoc 和 觅思文档相关版权标识进行修改和删除。
如果违反,开发者保留对侵权者追究责任的权利。
商业授权专业版请联系QQ咨询3280350050

View File

@ -1,6 +1,6 @@
#!/bin/bash
PASSWD="Qax318130843#$."
PASSWD=""
echo ${PASSWD}
MKDIR (){
for DIR in txt

View File

@ -1,4 +1,4 @@
#!bin/nash
qshell qupload upload.conf
mysql -uroot -pQax318130843#$. -e "use note;update app_doc_doc set pre_content=REPLACE(pre_content,'(/media/','(http://cdn.imbed.liuyan.wang/note/media/') where pre_content like '%(/media/%';"
mysql -uroot -pQaz318130843#$. -e "use note;update app_doc_doc set content=REPLACE(content,'src=\"/media/','src=\"http://cdn.imbed.liuyan.wang/note/media/') where content like '%src=\"/media/%';"
mysql -uroot -p -e "use note;update app_doc_doc set pre_content=REPLACE(pre_content,'(/media/','(http://cdn.imbed.liuyan.wang/note/media/') where pre_content like '%(/media/%';"
mysql -uroot -p -e "use note;update app_doc_doc set content=REPLACE(content,'src=\"/media/','src=\"http://cdn.imbed.liuyan.wang/note/media/') where content like '%src=\"/media/%';"