# 请大侠帮忙，把它转成MDX格式

**URL:** <https://forum.freemdict.com/t/topic/35156>\
**Category:** 词典及语言学习交流\
**Tags:** ﻿英语\
**Created:** [2024 年12 月 24 日 01:22 UTC](https://forum.freemdict.com/t/topic/35156 "2024-12-24T01:22:11Z")\
**Posts on this page:** 16\
**Page:** 1

<div class="post-metadata">

作者： ![bush0101](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@bush0101](https://forum.freemdict.com/u/bush0101)\
发布日期： [2024 年12 月 24 日 01:22 UTC](https://forum.freemdict.com/t/topic/35156/1 "2024-12-24T01:22:12Z")

</div>

在下愚钝，自己尝试了一个多星期，除了头大了一些圈后，没有任何收获，无奈只得请大侠帮助，把它转换成mdx词典，如蒙惠赐，不胜感激。先谢为敬。  
[The American Heritage Essential English Dictionary 2011.epub](https://forum.freemdict.com/uploads/short-url/87LCwSS3RMNABYKCLL5QcFjPHbV.epub) (9.1 MB)

---

<div class="post-metadata">

作者： ![dictsun](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/d/90db22/32.png) [@dictsun](https://forum.freemdict.com/u/dictsun)\
发布日期： [2024 年12 月 24 日 01:46 UTC](https://forum.freemdict.com/t/topic/35156/2 "2024-12-24T01:46:22Z")

</div>

这个早就有人求过，好像没有结果。你自己动手吧。参见：

> [@\[教程\]从epub/mobi制作MDX方法(零基础可学会)](https://forum.freemdict.com/t/topic/12392):
>
> epub制作MDX方法，以“ [中国文学鉴赏辞典大系](https://forum.freemdict.com/t/topic/12381)”为例 如果是mobi格式，则先把mobi词典或书籍转换成epub格式。用此软件： Epubor Ultimate（自己上网找一下，有免费版） 1、把电子书后缀epub改成zip，然后解压缩。 [image] 2、找到存放 html 的文件夹，然后合并所有的 html 文件。 [html合并转txt.rar](https://forum.freemdict.com/uploads/short-url/a8HKM0MFfyt5DiEL8tPeMvpCmrs.rar) (103 字节) 用这个批…

---

<div class="post-metadata">

作者： ![jcz777](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/jcz777/32/60576_2.png) [@jcz777](https://forum.freemdict.com/u/jcz777)\
发布日期： [2024 年12 月 24 日 04:01 UTC](https://forum.freemdict.com/t/topic/35156/3 "2024-12-24T04:01:07Z")

</div>

> **[TAHEED](https://cloud.freemdict.com/index.php/s/BAwJixpzFBWrACf)**
>
> FreeMdict Cloud - A FreeMdict Storage

密码：本坛

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 04:32 UTC](https://forum.freemdict.com/t/topic/35156/5 "2024-12-24T04:32:50Z")

</div>

Thanks. I put this request several months ago. Thanks again

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 04:34 UTC](https://forum.freemdict.com/t/topic/35156/6 "2024-12-24T04:34:05Z")

</div>

If @kadioguy modify its css.

---

<div class="post-metadata">

作者： ![bush0101](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/b/97f17d/32.png) [@bush0101](https://forum.freemdict.com/u/bush0101)\
发布日期： [2024 年12 月 24 日 07:07 UTC](https://forum.freemdict.com/t/topic/35156/7 "2024-12-24T07:07:05Z")

</div>

收到，看后非常满意，无论内容和版式，对大侠的慷慨相助万分感谢，给大侠拜个早年，祝大侠新的一年里如意快乐。  
另有一不情之请，大侠能否于百忙之际，抽出时间，以此为例新开一贴，给新手小白科普下到底应该怎样正确地转换epub到mdx，因为我曾试转换过，只进行到解压、合并、打开emeditor看着头脑中一片茫然、惶然，不知到该删除什么、保留什么，应该进行怎样的正确操作，急需大侠于关键重要处指点迷津。教程如能越详细步骤越具体越好。再次真心感谢并衷心祝好。

---

<div class="post-metadata">

作者： ![aimdict](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@aimdict](https://forum.freemdict.com/u/aimdict)\
发布日期： [2024 年12 月 24 日 09:01 UTC](https://forum.freemdict.com/t/topic/35156/8 "2024-12-24T09:01:27Z")

</div>

密码是本站的域名？试了几种都不对，算了，不用了。

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 09:16 UTC](https://forum.freemdict.com/t/topic/35156/9 "2024-12-24T09:16:51Z")

</div>

Password: [forum.freemdict.com](http://forum.freemdict.com)

---

<div class="post-metadata">

作者： ![jcz777](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/jcz777/32/60576_2.png) [@jcz777](https://forum.freemdict.com/u/jcz777)\
发布日期： [2024 年12 月 24 日 09:21 UTC](https://forum.freemdict.com/t/topic/35156/10 "2024-12-24T09:21:48Z")

</div>

EPUB to mdx  
1,解压。  
2,合并文件。不用转txt，也不用改后缀，直接合并成txt。

 ![001](https://forumcdn.freemdict.com/uploads/default/original/3X/a/5/a54c8176381e6324bbba09b0783e18bf31f2c5a0.jpeg)  
也可以用emeditor合并。方法众多。

3、 **分隔词条** ：  
1），词条间的分隔。找到词条与词条分隔的地方。这次分隔点非常明显。

 ![002](https://forumcdn.freemdict.com/uploads/default/original/3X/7/5/753a839f9c250da9d0b3588dac952840efd366f9.png)  
2），文件间的分隔，这个简单，直接在`</html>`后加入一个标志，如####。每个文件第一条，要特别处理，为和后面进行统一处理，这个标签应该改在`<body class="calibre">`  
 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/f/1/f165e24a80f51c4d2a6ecd7af1633608d1fd8308.png)

`<body class="calibre">\n(<div (id="filepos\d+" )?class="calibre1"><div class="calibre1"><span class="bold"><span class="calibre5">.*)`  
`<body class="calibre">\n####\1\n\1`  
4、 **找到词头** ，非常明显`<hr class="calibre_4"/>`后面就是词头。  
`<span class="bold"><span class="calibre5">`就是词头的关键标志。

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/0/2/021d4e77f2933c150cece15dc0c551904d815b1d.png)

`<hr class="calibre_4"/>(<div (id="filepos\d+" )?class="calibre1"><div class="calibre1"><span class="bold"><span class="calibre5">.*) \n####\1\n\1`  
5，去除词头这一行标签。查找`####.+`，全选。替换`<.*?>`，清除标签。再整理一下，就符合mdx源格式。注意勾选 仅限于选区。

 ![003](https://forumcdn.freemdict.com/uploads/default/original/3X/4/0/40a348fa65edc733155cf5ddcced981b7761c2e1.png)  
 ![004](https://forumcdn.freemdict.com/uploads/default/original/3X/b/c/bc307d2eeb65dcfa32cd4d21f21994b371a7f7a8.png)

不要忘记加入样式。  
整理完，就可以用MdxBuilder制作mdx。  
6、其它：  
1），无用内容清理：主要是html文件首尾内容清理。  
2），文中链接，用ID作中间跳转。直接提取 词头+ID。整理一下就行。  
3），文中存在一些图片，复制到相应位置， **注意文件路径** ，特别是打包成MDD。  
4），样式上，基本直接套用用来的样式就可以。

关键就是分隔词条和处理词头。  
需要懂一点正则，难度不大。

---

<div class="post-metadata">

作者： ![aimdict](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@aimdict](https://forum.freemdict.com/u/aimdict)\
发布日期： [2024 年12 月 24 日 11:04 UTC](https://forum.freemdict.com/t/topic/35156/11 "2024-12-24T11:04:13Z")

</div>

感谢！我再试一试。

---

<div class="post-metadata">

作者： ![kadioguy](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/k/9de0a6/32.png) [@kadioguy](https://forum.freemdict.com/u/kadioguy)\
发布日期： [2024 年12 月 24 日 11:54 UTC](https://forum.freemdict.com/t/topic/35156/12 "2024-12-24T11:54:35Z")

</div>

I roughly modified the css file.

大致修改了一下，因為有加入新標籤，因此mdx要一併更新 😄。

[mdx v.1.1a]  
[The American Heritage Essential English Dictionary 2011.rar](https://forum.freemdict.com/uploads/short-url/dNGUC6dn9jtZIuMBhYygJBBWAcM.rar) (10.0 MB)

[CSS 例句分行]  
[TAHEED.css](https://forum.freemdict.com/uploads/short-url/feYuhep1w2dbZmLVrU3xwjwZJE4.css) (4.5 KB)

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/c/1/c12e61cfcb5e4abec6f06e9df97ad15fc83cfb0e.png)

若不喜欢分行，把这里删去即可：

> .calibre\_3\>.italic  
> {  
> display: block;  
> margin-left: 14px;  
> font-style: normal;  
> }

[已知問题]  
有些词头，如live，有分1、2，查询时只能用live 1、live 2等方式查到（原来的版本即是如此）。

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 12:34 UTC](https://forum.freemdict.com/t/topic/35156/13 "2024-12-24T12:34:25Z")

</div>

You are such a great person. 👍  
If possible, example sentences should be in a new line. Thanks for your immediate response.

---

<div class="post-metadata">

作者： ![aimdict](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/a/dbc845/32.png) [@aimdict](https://forum.freemdict.com/u/aimdict)\
发布日期： [2024 年12 月 24 日 12:37 UTC](https://forum.freemdict.com/t/topic/35156/14 "2024-12-24T12:37:06Z")

</div>

很棒的教程！

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 12:44 UTC](https://forum.freemdict.com/t/topic/35156/15 "2024-12-24T12:44:06Z")

</div>

Look at these numbers, I think these should be in a new line, and example sentences too.

 ![Screenshot_2024-12-24-17-39-51-552_cn.ssdl.bluedict-edit](https://forumcdn.freemdict.com/uploads/default/original/3X/7/3/73646d3c8a2b36e9dc1d5c8fc7a65ff8655f383f.jpeg)

---

<div class="post-metadata">

作者： ![kadioguy](https://forumcdn.freemdict.com/letter_avatar_proxy/v4/letter/k/9de0a6/32.png) [@kadioguy](https://forum.freemdict.com/u/kadioguy)\
发布日期： [2024 年12 月 24 日 12:59 UTC](https://forum.freemdict.com/t/topic/35156/16 "2024-12-24T12:59:51Z")

</div>

I’ve updated my post #12.

If you like these _a_, _b_, and _c_ in new lines, this is what I can do for now:

[TAHEED.css](https://forum.freemdict.com/uploads/short-url/9a5bZL7IxFOCycYRhE2kB76GFRZ.css) (4.5 KB)

 ![image](https://forumcdn.freemdict.com/uploads/default/original/3X/1/0/103892c66e2b87b28f3cec40128764a1704d9ba3.png)

---

<div class="post-metadata">

作者： ![Sirabbas](https://forumcdn.freemdict.com/user_avatar/forum.freemdict.com/sirabbas/32/71180_2.png) [@Sirabbas](https://forum.freemdict.com/u/Sirabbas)\
发布日期： [2024 年12 月 24 日 13:09 UTC](https://forum.freemdict.com/t/topic/35156/17 "2024-12-24T13:09:23Z")

</div>

You know better. On android it’s look like this.

 ![Screenshot_2024-12-24-18-06-28-269_cn.ssdl.bluedict-edit](https://forumcdn.freemdict.com/uploads/default/original/3X/8/0/80873f95364ed9d7909e5f94ff4dc98b25ede806.jpeg)

It is better to deal it with your own choice.
