mnt-ltd / moredoc Goto Github PK
View Code? Open in Web Editor NEWmoredoc,魔豆文库,基于golang开发的类似百度文库的开源文库系统,dochub文库的重构版本。
Home Page: https://moredoc.mnt.ltd
License: Apache License 2.0
moredoc,魔豆文库,基于golang开发的类似百度文库的开源文库系统,dochub文库的重构版本。
Home Page: https://moredoc.mnt.ltd
License: Apache License 2.0
后台提示的转换失败原因如下:
exit status 1 Unable to init server: Could not connect: Connection refused Unknown option --pdf-page
exit status 1
推测是libreoffice的问题
还有一个是
couldn't open dest file: open cache/convert/2023/08/01/a11d1ad9-7950-4993-b371-4bdd5f63bc18/a4d3e4723e38be5e086cbc58c663e889.epub: no such file or directory
代码是不是不全,没有看到/api/v1/upload/document
上传文档后,在“个人中心”“我的文档”里面搜关键词,然后编辑这个文档,此时文件名和描述里会出现多余的mark文字,修改过一次文件名后,再次提交时,会报错,看起来是文档评分被多余地除以了100,形成了小数,导致提交失败。
之前尝试dochub不支持
尊敬的用户,为了更好地帮助您解决问题并提供高效的答疑与技术支持,请您在遇到问题时,先按照以下步骤进行操作。
首先,请仔细阅读错误提示信息,尝试理解其中的含义。
错误提示通常会提供关键的线索,帮助您定位问题所在。
请注意,了解错误提示对问题解决至关重要。
如果报错中有英文,您看不懂是什么意思,可用翻译软件翻译一下。
在您找到报错提示后,请使用百度、谷歌等搜索引擎,将报错提示作为关键词进行搜索。
大部分技术问题都有可能被其他人遇到过并解决了,通过搜索引擎可以找到相关的解决方案或讨论。
如果您通过搜索引擎无法找到解决方案或者遇到了特定的问题,建议您在代码托管平台GitHub或Gitee上在该仓库的Issues页面查找或提交您的问题。请确保您在提问时提供准确、详细的问题描述和相关环境信息,以便开发者更好地理解和解决您的问题。
提交issues后,问题比较紧急,可添加微信,发送issues链接地址,我们来帮您快速排查和解决问题。微信:
需要注意的是,我们并不提供微信实时答疑支持,一是这不利于我们对反馈的问题和建议的收集与处理,二是没有人愿意对十个人甚至更多人遇到的同一个问题回答十遍甚至更多遍。
我们希望通过以上步骤,您可以在最短的时间内得到满意的答案和解决方案。
同时,我们也鼓励您积极参与技术社区的讨论,与其他开发者分享您的经验和见解。
由于考虑到大文件的上传,所以超时时间较长,不会报超时错误。
这个问题有时候出现,有时候不出现,不会记录相关的日志和错误。
v2.2.0(2023-12-26 08:40:15)
483cf32b297ccde0410841b147524a12afc48809
搜索关键词“ABC”(这是一个专业词语),选择“最新排序”,得到的结果却是单个字命中的结果。猜测是分词问题,想了解一下如何解决。
违规的文档,网站不可以保留,必须删除,回收站中也要删除,可是这样的话,如果多个用户先后上传这个文档,那么网站管理员就需要多次进行审查,比较浪费时间。
1.进入某个目录,此时的url:
https://books.fo/category/5
2.点击文件类型txt,此时的url:
https://books.fo/category/5?ext=txt
3.点击第2页,此时的url:
https://books.fo/category/5?sort=default&page=2
这里有问题,在这里文件类型又变回了不限,应该仍然是txt
一个中文的CHM文件报错,我已经把中文包都装上了
in _create_html_root UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 1023
下面是全部的报错内容
exit status 1 Sandboxing disabled by user. qt.webenginecontext: GL Type: disabled Surface Type: DefaultRenderableType Surface Profile: NoProfile Surface Version: 2.0 QSG RHI Backend: OpenGL Using Supported QSG Backend: yes Using Software Dynamic GL: no Using Multithreaded OpenGL: no Init Parameters: * application-name ebook-convert * browser-subprocess-path /opt/calibre/libexec/QtWebEngineProcess * disable-features ConsolidatedMovementXY,InstalledApp,BackgroundFetch,WebOTP,WebPayments,WebUSB,PictureInPicture * disable-gpu * disable-speech-api * enable-features NetworkServiceInProcess,TracingServiceInProcess * enable-threaded-compositing * in-process-gpu * no-sandbox * use-gl disabled Traceback (most recent call last): File "runpy.py", line 196, in _run_module_as_main File "runpy.py", line 86, in _run_code File "site.py", line 47, in <module> File "site.py", line 43, in main File "calibre/ebooks/conversion/cli.py", line 419, in main File "calibre/ebooks/conversion/plumber.py", line 1108, in run File "calibre/customize/conversion.py", line 242, in __call__ File "calibre/ebooks/conversion/plugins/chm_input.py", line 76, in convert File "calibre/ebooks/conversion/plugins/chm_input.py", line 117, in _create_html_root UnicodeDecodeError: 'gbk' codec can't decode byte 0xa6 in position 1023: illegal multibyte sequence Conversion options changed from defaults: pdf_page_margin_left: 36.0 pdf_page_margin_bottom: 36.0 pdf_page_margin_right: 36.0 paper_size: 'a4' pdf_page_margin_top: 36.0 1% Converting input to HTML... InputFormatPlugin: CHM Input running on /www/wwwroot/moredoc/cache/convert/2023/08/02/5c76bbee-457d-47a8-b179-f30b3bf3a829/3c0d42a33be97f5f99e02a261928a9f2.chm
请考虑是否追加标题的功能,我们会放一些内部文档,不希望公司外的人在公网上看到,所以希望追加只有注册用户才能看文档的设置项。目前只能在公司内网使用。
建议增加百度、头条、bing等网站的收录api或自动推送功能
比如源站域名A.com,在另一台服务器上部署B.com,反代到A.com。
访问B.com时,svg预览图的链接域名是B.com,符合预期。
但是访问B.com,下载文档时,实际的下载链接的域名是A.com,失去了反代的意义。
请问该怎么解决这个问题?
按照后端初始化命令:make api
找不到文件 - *.proto
protoc --proto_path=.
--proto_path=./third_party
--proto_path=./api
--gogofaster_out="plugins=grpc,paths=source_relative:."
--grpc-gateway_out="paths=source_relative:." \
Missing input file.
make: *** [Makefile:22: api] Error 1
请问如何解决?
中文文档上传后发生乱码问题,请看图。
我的操作系统是ubuntu, MoreDoc版本是:v1.0.0。请问是不是缺少什么包?
错误日志:
023/02/23 11:17:55 /home/truthhun/git.mnt.ltd/moredoc/model/document.go:573 Error 1055: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'moredoc_test.a.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by
[1.325ms] [rows:0] select a.hash,a.type_id from mnt_attachment a left join mnt_document d on a.type_id = d.id where a.hash in ('ea673f9254b52333f4f096dfa74893fc') and d.status = 2 group by a.hash
2023-02-23T11:17:55.092Z error model model/document.go:575 GetDocumentStatusConvertedByHash {"error": "Error 1055: Expression #2 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'moredoc_test.a.type_id' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by"}
moredoc/model.(*DBModel).GetDocumentStatusConvertedByHash
/home/truthhun/git.mnt.ltd/moredoc/model/document.go:575
moredoc/model.(*DBModel).ConvertDocument
/home/truthhun/git.mnt.ltd/moredoc/model/document.go:627
moredoc/model.(*DBModel).loopCovertDocument
/home/truthhun/git.mnt.ltd/moredoc/model/util.go:264
2023-02-23T11:17:55.092Z info model.converter converter/converter.go:224 convert to pdf by soffice {"cmd": "soffice", "args": ["--headless", "--convert-to", "pdf", "--outdir", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc", "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc.pptx"]}
2023-02-23T11:18:00.143Z info model.converter converter/converter.go:260 count pdf pages {"cmd": "mutool", "args": ["show", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/ea673f9254b52333f4f096dfa74893fc.pdf", "pages"]}
2023-02-23T11:18:00.147Z debug model.converter converter/converter.go:272 count pdf pages {"line": ""}
2023-02-23T11:18:00.147Z debug model.converter converter/converter.go:272 count pdf pages {"line": "page 9 = 57 0 r"}
2023-02-23T11:18:00.147Z info model.converter converter/converter.go:192 convert pdf to page {"cmd": "mutool", "args": ["convert", "-o", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/%d.png", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/ea673f9254b52333f4f096dfa74893fc.pdf", "1-1"]}
2023-02-23T11:18:00.196Z info model.converter converter/converter.go:192 convert pdf to page {"cmd": "mutool", "args": ["convert", "-o", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/%d.svg", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/ea673f9254b52333f4f096dfa74893fc.pdf", "1-9"]}
2023-02-23T11:18:00.266Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/1.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/1.gzip.svg"}
2023-02-23T11:18:00.266Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/2.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/2.gzip.svg"}
2023-02-23T11:18:00.266Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/3.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/3.gzip.svg"}
2023-02-23T11:18:00.267Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/4.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/4.gzip.svg"}
2023-02-23T11:18:00.267Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/5.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/5.gzip.svg"}
2023-02-23T11:18:00.267Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/6.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/6.gzip.svg"}
2023-02-23T11:18:00.267Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/7.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/7.gzip.svg"}
2023-02-23T11:18:00.268Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/8.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/8.gzip.svg"}
2023-02-23T11:18:00.268Z debug model model/document.go:703 ConvertDocument CopyFile {"src": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/9.gzip.svg", "dst": "documents/e/a/6/7/3/ea673f9254b52333f4f096dfa74893fc/9.gzip.svg"}
2023-02-23T11:18:00.268Z info model.converter converter/converter.go:123 convert pdf to txt {"cmd": "mutool", "args": ["convert", "-o", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/dst.txt", "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc/ea673f9254b52333f4f096dfa74893fc.pdf"]}
2023/02/23 11:18:00 /home/truthhun/git.mnt.ltd/moredoc/model/document.go:723
[99.492ms] [rows:1] UPDATE `mnt_document` SET `description`='初初 AI • 初初 • 初初 初初初 一 • 初初初初初初 初初 • 初初初初 -- 初初初 1943 初初初 初初初 Input 初 初初初 Output 初 初初初初初初初 初初初初初初初初初初初初初初初初初初初初 初初初初初初初初初初初 初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初 一。。 初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初初 初初初初初初初初初初 一。 1943 初初初初初初初初初初初初初初初初初初初初初初 初初初初初 。 A',`width`=1280,`height`=720,`preview`=0,`pages`=9,`status`=2,`updated_at`='2023-02-23 11:18:00.278',`enable_gzip`=true WHERE id = 5 AND `mnt_document`.`deleted_at` IS NULL AND `id` = 5
2023-02-23T11:18:00.375Z info model.converter converter/converter.go:362 clean workspace {"workspace": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc"}
2023-02-23T11:18:00.376Z info model.converter converter/converter.go:367 clean workspace success {"workspace": "cache/convert/2023/02/23/ea673f9254b52333f4f096dfa74893fc"}
2023-02-23T11:18:00.376Z info model model/util.go:263 loopCovertDocument,start...
1.更改预览页数后系统可以对不足转码页数的书籍进行再次转码预览页,多余的页面可以自动删除节省存储空间。
2.整个文库书集可以按大小排序,可以对上传的书籍进行重命名,可以对索引内容进行关键词替换,便于去掉广告或者违禁词。
3.支持多级存储,热度高的书籍存储服务器硬盘,热度底的或者无人访问的书籍储存到云对象存储或者微软谷歌等网盘。
4.用户认证增加LDAP,CAS等,方便用户与其他网站统一登录认证
第1种复现步骤:
(1)第一次进入页面,输入正确的账号密码,但是不要输入正确的验证码
(2)点击登录,此时提示“验证码错误”
(3)此时输入正确的验证码,点击登录,仍然会提示“验证码错误”
第2种复现步骤:
(1)第一次进入页面,输入错误的账号密码,输入正确的验证码
(2)点击登录,此时提示“用户名或者密码错误”
(3)此时输入正确的账号密码,点击登录,仍然会提示“验证码错误”
有的用户在这里不知道点击验证码图片获取新的验证码,所以就卡在这里了
目前的搜索功能是基于摘要内容创建的索引,其实我理解这个系统具备全文文字创建索引的能力,所以搜索用索引能否基于全文创建?
可以根据搜索引擎的通用规则,将文档页面的数据结构好,好快速成为专业站及比其它站权重高,可参照360站点的结构化数据说明,其它搜索站点也一样,规则是通用的
https://www.bookstack.cn/read/moredoc/install.md
按照该网址中 Linux(ubuntu)下安装部署,calibre\libreoffice\mupdf\inkscape\supervisor\MYSQL均安装部署
源码下载的是moredoc_ce_v1.6.0_linux_arm64.tar.gz
./moredoc serve启动程序之后,为什么网页访问不到,还需要其他操作吗
现在网站启动后的路径形式为
http://IP:8880
没有网站根目录,这样的话,如果部署在一个有多个子网站的nginx上的话设置子路径会非常麻烦,能否追加一段网站根目录的设置?
比如
http://IP:8880/moredoc
用户的本意是重新上传一下,但是这种情况下将无法重新上传,只能由管理员从回收站删掉该文档后,用户才可以再次上传。
版本号:2.4.0
问题描述:
在不登录的情况下访问/api/v1/user/list接口,能够获取用户列表数据。
在不登录的情况下访问/api/v1/stats接口,能够获取服务器及应用版本等敏感数据。
在不登录的情况下访问/api/v1/device接口,能够获取服务器信息等敏感数据。
因为转换失败的文档较多,每次根据原因自己尝试排错后,希望能够马上进行验证,如果必须重转所有文档,需要花费的时间很长。
�[31m2023/11/15 11:13:31 [Recovery] 2023/11/15 - 11:13:30 panic recovered:
runtime error: slice bounds out of range [:5] with capacity 0
C:/Program Files/Go/src/runtime/panic.go:139 (0x434a1e)
D:/workspace/golang/src/git.mnt.ltd/moredoc/biz/attachment.go:276 (0x1488a54)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0xc1e021)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:101 (0xc1e00c)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0x14cf561)
D:/workspace/golang/pkg/mod/github.com/gin-contrib/[email protected]/handler.go:60 (0x14cf539)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0xc1ce90)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:616 (0xc1caf8)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:572 (0xc1c63c)
C:/Program Files/Go/src/net/http/server.go:2947 (0x6f274b)
C:/Program Files/Go/src/net/http/server.go:1991 (0x6ed966)
C:/Program Files/Go/src/runtime/asm_amd64.s:1594 (0x467d80)
�[0m
2023-11-15T11:19:10.639+0800 error model model/config.go:866 GetConfigOfSystem {"error": "commands out of sync. You can't run this command now"}
moredoc/model.(*DBModel).GetConfigOfSystem
D:/workspace/golang/src/git.mnt.ltd/moredoc/model/config.go:866
moredoc/biz.(*ConfigAPIService).GetSettings
D:/workspace/golang/src/git.mnt.ltd/moredoc/biz/config.go:204
moredoc/api/v1._ConfigAPI_GetSettings_Handler.func1
D:/workspace/golang/src/git.mnt.ltd/moredoc/api/v1/config.pb.go:2456
github.com/grpc-ecosystem/go-grpc-middleware/recovery.UnaryServerInterceptor.func1
D:/workspace/golang/pkg/mod/github.com/grpc-ecosystem/[email protected]/recovery/interceptors.go:33
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
D:/workspace/golang/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25
moredoc/middleware/auth.(*Auth).AuthUnaryServerInterceptor.func1
D:/workspace/golang/src/git.mnt.ltd/moredoc/middleware/auth/auth.go:49
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1.1.1
D:/workspace/golang/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:25
github.com/grpc-ecosystem/go-grpc-middleware.ChainUnaryServer.func1
D:/workspace/golang/pkg/mod/github.com/grpc-ecosystem/[email protected]/chain.go:34
moredoc/api/v1._ConfigAPI_GetSettings_Handler
D:/workspace/golang/src/git.mnt.ltd/moredoc/api/v1/config.pb.go:2458
google.golang.org/grpc.(*Server).processUnaryRPC
D:/workspace/golang/pkg/mod/google.golang.org/[email protected]/server.go:1282
google.golang.org/grpc.(*Server).handleStream
D:/workspace/golang/pkg/mod/google.golang.org/[email protected]/server.go:1616
google.golang.org/grpc.(*Server).serveStreams.func1.2
D:/workspace/golang/pkg/mod/google.golang.org/[email protected]/server.go:921
[mysql] 2023/11/15 11:24:54 packets.go:326: busy buffer
Using config file: /www/wwwroot/moredoc/app.toml
Mac Address:
【enp4s0】: d4:5d:64:a8:ba:00
get signal: terminated
close child process...
close child process done.
exit.
Using config file: /www/wwwroot/moredoc/app.toml
Mac Address:
【enp4s0】: d4:5d:64:a8:ba:00
//在这里我重启了服务器
�[31m2023/11/15 12:20:20 [Recovery] 2023/11/15 - 12:20:20 panic recovered:
runtime error: slice bounds out of range [:5] with capacity 0
C:/Program Files/Go/src/runtime/panic.go:139 (0x434a1e)
D:/workspace/golang/src/git.mnt.ltd/moredoc/biz/attachment.go:276 (0x1488a54)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0xc1e021)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/recovery.go:101 (0xc1e00c)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0x14cf561)
D:/workspace/golang/pkg/mod/github.com/gin-contrib/[email protected]/handler.go:60 (0x14cf539)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/context.go:173 (0xc1ce90)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:616 (0xc1caf8)
D:/workspace/golang/pkg/mod/github.com/gin-gonic/[email protected]/gin.go:572 (0xc1c63c)
C:/Program Files/Go/src/net/http/server.go:2947 (0x6f274b)
C:/Program Files/Go/src/net/http/server.go:1991 (0x6ed966)
C:/Program Files/Go/src/runtime/asm_amd64.s:1594 (0x467d80)
�[0m
由于看不到pro版的代码变化,我们只能通过作者的描述来了解功能变化。
除了大的功能变化,我们对于小的功能变化,比如新增了积分和人民币的换算也比较敏感,希望作者可以给出详细的清单。
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.