Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/oracle/9.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
将wiki文本转换为python中的html,以便在网站中显示_Python_Html_Markup_Wikipedia_Wikitext - Fatal编程技术网

将wiki文本转换为python中的html,以便在网站中显示

将wiki文本转换为python中的html,以便在网站中显示,python,html,markup,wikipedia,wikitext,Python,Html,Markup,Wikipedia,Wikitext,我知道在这个话题上有很多问题,但在6个小时的尝试之后,我仍然找不到一个采用wikitext形式的工具 '<center>Welcome to the world's foremost open content<br><big><big><big>'''Organic Chemistry Textbook'''</big></big></big><br>on the web!</cen

我知道在这个话题上有很多问题,但在6个小时的尝试之后,我仍然找不到一个采用wikitext形式的工具

'<center>Welcome to the world's foremost open content<br><big><big><big>'''Organic Chemistry Textbook'''</big></big></big><br>on the web!</center> {| cellpadding="5" |- | <noinclude><big>'''[[Organic Chemistry|Go&nbsp;to&nbsp;contents&nbsp;>>]]'''</big> </noinclude> | [[Image:Ethane3D.png]] | This '''free''' online text is intended to become a ''complete replacement'' for your printed book. |} == The Study of Organic Chemistry == Organic chemistry is primarily devoted to the unique properties of the carbon atom and its compounds. These compounds play a critical role in biology and ecology, Earth sciences and geology, physics, industry, medicine and &mdash; of course &mdash; chemistry. At first glance, the new material that organic chemistry brings to the table may seem complicated and daunting, but all it takes is concentration and perseverance. Millions of students before you have successfully passed this course and you can too! This field of chemistry is based less on formulas and more on reactions between various molecules under different conditions. Whereas a typical general chemistry question may ask a student to compute an answer with an equation from the chapter that they memorized, a more typical organic chemistry question is along the lines of "what product will form when substance X is treated with solution Y and bombarded by light". The key to learning organic chemistry is to ''understand'' it rather than cram it in the night before a test. It is all well and good to memorize the mechanism of Michael addition, but a superior accomplishment would be the ability to explain ''why'' such a reaction would take place. As in all things, it is easier to build up a body of new knowledge on a foundation of solid prior knowledge. Students will be well served by much of the knowledge brought to this subject from the subject of [[General Chemistry]]. Concepts with particular importance to organic chemists are covalent bonding, Molecular Orbit theory, VSEPR Modeling, understanding acid/base chemistry vis-a-vis pKa values, and even trends of the periodic table. This is by no means a comprehensive list of the knowledge you should have gained already in order to fully understand the subject of organic chemistry, but it should give you some idea of the things you need to know to succeed in an organic chemistry test or course. Organic Chemistry is one of the subjects which are varying useful and close to our daily life. We always try to figure out some of the unknown mysteries of our daily life through our factious thinking habit, which generates superstitions. Through the help of chemistry we can help ourselves to get out of this kind of superstition.     We always try to find the ultimate truth through our own convenience. In the ancient past we had struggled to make things to go as per our need. In that context we have found fire, house, food, transportation, etc… Now the burning question is: "how can chemistry help our daily life?" To find the answer of this questions, we have to know the subject thoroughly. Let us start it from now. {{BookCat}}'
“欢迎来到世界上最重要的开放内容
“有机化学教科书”
网站!{| cellpading=“5”|-|“[[有机化学]进入目录>]'.[[图像:Ethane3D.png].]这篇“免费”的在线文本旨在成为你印刷书籍的“完全替代品”。|}==有机化学的研究==有机化学主要致力于碳原子及其化合物的独特性质。这些化合物在生物学和生态学、地球科学和地质学、物理学、工业、医学和化学方面发挥着关键作用;当然&mdash;化学。乍一看,有机化学带来的新材料可能看起来复杂而令人畏惧,但它所需要的只是专注和毅力。在你成功通过本课程之前,有数百万学生,你也可以!这一化学领域的基础不是公式,而是不同条件下不同分子之间的反应。一个典型的普通化学问题可能会要求学生用他们记忆的章节中的方程式计算答案,而一个更典型的有机化学问题是“当物质X用溶液Y处理并受到光轰击时,会形成什么产物”。学习有机化学的关键是“理解”它,而不是在考试前的晚上死记硬背。记住迈克尔加法的机理是很好的,但是一个更高的成就是能够解释“为什么”会发生这样的反应。在所有的事物中,在坚实的先验知识的基础上建立一个新的知识体是更容易的。学生们将受益于[[普通化学]]课程带来的许多知识。对有机化学家特别重要的概念是共价键、分子轨道理论、VSEPR建模、了解酸碱化学与pKa值,甚至周期表的趋势。这绝对不是一份全面的清单,上面列出了你为了完全理解有机化学这门学科应该已经获得的知识,但它应该让你了解在有机化学考试或课程中取得成功所需要知道的一些事情。有机化学是一门既实用又贴近日常生活的学科。我们总是试图通过争论的思维习惯来找出日常生活中一些未知的奥秘,这会产生迷信。通过化学的帮助,我们可以帮助自己摆脱这种迷信。我们总是试图通过自己的便利找到最终的真理。在古代,我们努力使事情按照我们的需要进行。在这种情况下,我们发现了火、房子、食物、交通等等。现在最紧迫的问题是:“化学如何帮助我们的日常生活?”要找到这个问题的答案,我们必须彻底了解这个主题。让我们从现在开始。{{BookCat}}'

并返回相应的
html
。请在Python中提供帮助?我不知道有哪种语言的维基文本有好的解析器。 如果您愿意运行node.js,可以使用。 否则,您将不得不使用。
确保在获取wikitext的域上运行它,以便正确解析图像和转义等问题。

您到底使用了哪些工具(这个和那个)?在我看来很有前途。我从页面上得到了链接。有太多的维基语法,你想转换哪一个?维基媒体语法?@KurzedMetal我有维基书籍和维基百科转储。我不知道他们用的是什么语法(@aganders3:在安装过程中给了我一些问题。它失败了四次,因为它没有找到某些
.h
文件,并且需要一个名为
pijnu
的东西,而我在synaptic中找不到它。)(@prongs:抱歉,我帮不了你更多,但是有一个github回购协议。看起来已经过时了,但这可能是你最好的选择。警告:维基百科有一个讨厌的习惯,就是不时对模板进行不兼容的更改,并假设一旦这些模板的当前用户使用当前模板,一切都会正常。另外换句话说,旧版本的页面不一定使用正确的语法,事实上,一些模板甚至可能已经被删除。是的,这是真的。IIRC甚至会影响在Wikipedia上浏览旧版本的页面。不,我提供了关于如何根据请求将所提供表单的wikitext转换为HTML的指针。我不是在请求c任何事物的极化。