[DTK] 使用 Dtk 开发了一个 MarkDown 编辑器,欢迎大家试用
Tofloor
poster avatar
winee
deepin
2021-12-06 10:01
Author

项目地址:DMarked(github) & gitee地址

以前就有写 MarkDown 编辑器的想法,之前用的 typroa 收费了,那就搞一波。

目前设计使用传统双栏编辑,一边编辑,一边预览。支持数学公式,代码高亮,流程图(Mermaid)等扩展。

可以导出 pdf,html。而且通过命令行可以批量转换。

软件还在完善中,功能规划,欢迎来提建议。

主体界面

image.png

底部的信息栏可以切换 markdown 主题

模式分为:

阅读模式:只有右侧的预览窗口
编辑模式:只有左侧的编辑窗口
预览模式:一边编辑,一边预览
预览模式S,表示编辑窗口和预览窗口滑动时会自动同步(算法待改进
预览模式N,表示编辑窗口和预览窗口各自独立滑动

下图为阅读模式

image.png

菜单栏

image.png

image.png

设置

image.png

快捷键

image.png

暗色模式

image.png

命令行操作

rewine@rewine-PC:~$ dmarked -h
用法:dmarked [选项] source [destination]

选项:
  -h, --help                显示这个此帮助。
  -v, --version             显示版本信息。
  -w, --write         在 DMarked 中打开 markdown 文件
  -f, --format         把 markdown 文件转换为 pdf/html
  -L, --use-landscape       设置为横向,默认纵向
  -s, --page-size       设置页面大小为 A4,Letter 等
  -l, --margin-left <10>    设置左边距(pt)
  -t, --margin-top <10>     设置上边距(pt)
  -r, --margin-right <10>   设置右边距(pt)
  -b, --margin-bottom <10>  设置下边距(pt)
  -d, --max-depth <1>       批量转换时文件的最大深度

参数:
  source                    需要转换的文件或其所在目录
  [destination]             转换后文件的位置

设计命令行模式的初衷是为了完成批量的文件转换,目前基本达成目的

下面命令把 a.md 转换成 my.html

dmarked -f html a.md my.html

把当前目录以及2层子目录的所有 markdown 文件转换成 pdf 文件, -s 的具体选项可以在前面图形界面的下拉框里查看。主题是上次打开软件时使用的主题。

destination 不填的话,导出的 pdf 放在 md 文件同一路径下。

dmarked -f pdf -s A5 -t 20 -b 20 -d 3 .

把 content 目录下的所有 md 文件(不包括子目录里的)转换成 pdf 放进 content_pdf 文件夹里。

dmarked -f pdf content content_pdf

Reply Favorite View the author
All Replies
3 / 3
To page
niu0518
deepin
2021-12-07 18:03
#41

大佬牛皮!!!like

Reply View the author
海天鹰
deepin
2021-12-07 18:20
#42

求非DTK版本

Reply View the author
guaguale
deepin
2021-12-07 18:44
#43
winee

官网上显示Linux :Coming soon,是不是官方已经在做了

没有,弃坑了貌似。。

Reply View the author
mardou
deepin
2021-12-07 19:28
#44

厉害呀

Reply View the author
sgb76
deepin
2021-12-08 00:04
#45

收藏了,收藏了,赞一个!!

Reply View the author
winee
deepin
2021-12-08 04:38
#46
海天鹰

求非DTK版本

目前还有许多功能在完善,没有精力另搞去dtk的版本,理论上,工作有:把菜单之类换成qt样式,DSetings换成QGSetings再自己写个设置面板,搞个暗亮色。

Reply View the author
winee
deepin
2021-12-08 04:57
#47
guaguale

没有,弃坑了貌似。。

我曾经想过用 Haskell 写 Markdown 解析器应该不错,可惜一直没时间,或者说没下决心深学 Haskell。刚才看了下作者的推特,他基本上把 Haskell 玩明白了

Reply View the author
butu
deepin
2021-12-08 07:13
#48

支持一下

Reply View the author
pzm9012
Moderator
2021-12-08 07:29
#49

感谢分享

Reply View the author
海天鹰
deepin
2021-12-09 05:54
#50
winee

目前还有许多功能在完善,没有精力另搞去dtk的版本,理论上,工作有:把菜单之类换成qt样式,DSetings换成QGSetings再自己写个设置面板,搞个暗亮色。

要在其他系统运行必须去DTK。

Reply View the author
fe******ng@163.com
deepin
2021-12-09 07:25
#51

支持!希望国产系统越来越棒。生态越来越好

Reply View the author
winee
deepin
2021-12-09 10:50
#52
海天鹰

要在其他系统运行必须去DTK。

我自己不用windows或者MacOS,其他发行版的话,希望dtk多努力适配吧

Reply View the author
xuqi
deepin testing team
2022-10-09 22:42
#53

like

Reply View the author
berners
deepin
2022-12-15 20:38
#54
guaguale

当年厨子开发了一款,可惜没有linux版本 希望可以fork一些功能或继续看看能不能维护

https://github.com/hemashushu/yu-writer.site

厨子是谁?

Reply View the author
berners
deepin
2023-06-29 10:10
#55

你的GitHub怎么404了

Reply View the author
winee
deepin
2023-07-13 05:16
#56
berners

你的GitHub怎么404了

没有 404 啊

现在在 https://github.com/DMarked/DMarked,只是很久没有更新 tag 了

Reply View the author
3 / 3
To page