2012-04-11 2 views
3

이 주제에 대해 많은 질문이 있지만 6 시간 동안 시도해 본 결과, 하나의 도구를 찾을 수 없었습니다. 형식의 위키 텍스트를 취해웹 사이트에 표시하기 위해 파이썬에서 wiki 텍스트를 html로 변환하십시오.

'<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}}' 

html을 반환합니다. 제발 도와주세요

+3

어떤 도구를 사용 했습니까? [This] (https://github.com/pediapress/mwlib)와 [that] (https://github.com/peter17/mediawiki-parser)는 저에게 유망 해 보입니다. [this] (http://www.mediawiki.org/wiki/Alternative_parsers) 페이지의 링크가 있습니다. – aganders3

+0

위키 구문이 너무 많습니다. 어떤 위키 구문을 변환하려고합니까? 위키 미디어 구문? – KurzedMetal

+0

@KurzedMetal 위키 책과 위키피디아 덤프가 있습니다. 나는 그들이 어떤 문법인지 모르겠다. ( – prongs

답변

2

파이썬에서? 나는 그 언어로 된 위키 텍스트에 대한 좋은 파서를 전혀 모르고있다. node.js를 기꺼이 사용하려는 경우 Parsoid을 사용할 수 있습니다. 그렇지 않으면 the API을 사용해야합니다. 위키 텍스트가있는 도메인에서 이미지를 실행하여 이미지와 절제가 올바르게 해결되는지 확인하십시오.

+0

주의 사항 : 위키 백과는 때때로 템플릿에 호환되지 않는 변경을 가하는 불쾌한 습관을 가지고 있습니다. 템플릿의 * 현재 * 사용자가 * 현재 * 템플릿으로 작업하면 모든 것이 괜찮다고 가정합니다. 즉, 이전 버전의 페이지는 반드시 올바른 구문을 사용하는 것은 아니며 사실 일부 템플릿이 삭제되었을 수도 있습니다. – SamB

+0

네, 그렇습니다. IIRC는 심지어 위키 피 디아 자체의 오래된 버전의 페이지 탐색에도 영향을 미칩니다. – Krenair

+0

아니요, 요청한대로 제공된 양식의 wikitext를 HTML로 변환하는 방법에 대한 지침을 제공했습니다. 나는 아무것도 명확하게 요구하지 않는다. – Krenair

관련 문제