更改

阳光百科迁移计划

添加3,736字节2013年7月20日 (六) 11:31
以下行是添加(+)和删除(-)的内容:
== 数据 导入的关键点==== 互动百科 导入 维基百科数据 的关键点== 互动百科的数据格式保存的形式是html 互动百科的数据格式保存的形式是html ,在数据库中位于表wiki_doc中 [[File:Hdwiki数据库.png|1000px]] 其中,我们需要title, tags, summary和content。 而content里面的内容是html格式,mediawiki对其并非完全支持,我们需要对它进行处理。维基源代码的格式点击本页右上角编辑源代码可以看到。====维基百科的数据格式和html部分相容====比如如下一段话,源代码其实是比较负责的html,但是维基仍然可以比较好的解析:<div class="hdwiki_tmml">英文歌词</div><p>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>Heigh&nbsp;ho,&nbsp;the&nbsp;dairy-o,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go!<br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>We'll&nbsp;catch&nbsp;a&nbsp;fox&nbsp;and&nbsp;put&nbsp;him&nbsp;in&nbsp;a&nbsp;box,<br>And&nbsp;then&nbsp;we'll&nbsp;let&nbsp;him&nbsp;go!<br><br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>Heigh&nbsp;ho,&nbsp;the&nbsp;dairy-o,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go!<br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>We'll&nbsp;catch&nbsp;a&nbsp;fish&nbsp;and&nbsp;put&nbsp;him&nbsp;on&nbsp;a&nbsp;dish,<br>And&nbsp;then&nbsp;we'll&nbsp;let&nbsp;him&nbsp;go!<br><br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>Heigh&nbsp;ho,&nbsp;the&nbsp;dairy-o,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go!<br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>We'll&nbsp;catch&nbsp;a&nbsp;bear&nbsp;and&nbsp;cut&nbsp;his&nbsp;hair,<br>And&nbsp;then&nbsp;we'll&nbsp;let&nbsp;him&nbsp;go!<br><br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>Heigh&nbsp;ho,&nbsp;the&nbsp;dairy-o,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go!<br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>We'll&nbsp;catch&nbsp;a&nbsp;pig&nbsp;and&nbsp;dance&nbsp;a&nbsp;little&nbsp;jig,<br>And&nbsp;then&nbsp;we'll&nbsp;let&nbsp;him&nbsp;go!<br><br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>Heigh&nbsp;ho,&nbsp;the&nbsp;dairy-o,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go!<br>A&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,&nbsp;a&nbsp;hunting&nbsp;we&nbsp;will&nbsp;go,<br>We'll&nbsp;catch&nbsp;a&nbsp;giraffe&nbsp;and&nbsp;make&nbsp;him&nbsp;laugh,<br>And&nbsp;then&nbsp;we'll&nbsp;let&nbsp;him&nbsp;go!</p><div class="hdwiki_tmml">中文歌词</div>空缺(9月28号完成--宜轩)<div class="hdwiki_tmml">多媒体</div>空缺(10月左右完成--宜轩)====维基百科的图片和链接与html不相容====当出现链接和图片的时候,需要进行转换才能正常显示。也就是<img>标签以及<a>标签,维基百科是不支持的。*<img>标签的处理,维基百科支持的是直接输入图片的链接地址,比如 http://www.ygclub.org/bbs/templates/colors/images/logo.gif* <a> 标签的处理,维基百科支持的如下的语法 [http://www.ygclub.org/bbs/templates/colors/images/logo.gif 链接]====hdwiki和mediawiki表格严重不兼容====表格需要另外想办法处理,两边非常不兼容,所以阳光百科的课程总结、上课准备提纲都有专门的程序转换,这里只考虑非标准页面(不是课程提纲、总结、学生课堂表现)的页面。====还有一些其他问题待补充=======理想的效果===针对每一个hdwiki的页面(现在大概800个),都生成一个对应的wiki markup的文本文件。
行政员管理员
1,451
个编辑