“阳光百科迁移计划”的版本间的差异
Chaosconst(讨论 | 贡献) |
Chaosconst(讨论 | 贡献) |
||
第30行: | 第30行: | ||
====维基百科的数据格式和html部分相容==== | ====维基百科的数据格式和html部分相容==== | ||
− | 比如如下一段话,源代码其实是比较 | + | 比如如下一段话,源代码其实是比较 复杂 的html,但是维基仍然可以比较好的解析: |
<div class="hdwiki_tmml">英文歌词</div><p>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a fox and put him in a box,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a fish and put him on a dish,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a bear and cut his hair,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a pig and dance a little jig,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a giraffe and make him laugh,<br>And then we'll let him go!</p><div class="hdwiki_tmml">中文歌词</div>空缺(9月28号完成--宜轩)<div class="hdwiki_tmml">多媒体</div>空缺(10月左右完成--宜轩) | <div class="hdwiki_tmml">英文歌词</div><p>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a fox and put him in a box,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a fish and put him on a dish,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a bear and cut his hair,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a pig and dance a little jig,<br>And then we'll let him go!<br><br>A hunting we will go, a hunting we will go,<br>Heigh ho, the dairy-o, a hunting we will go!<br>A hunting we will go, a hunting we will go,<br>We'll catch a giraffe and make him laugh,<br>And then we'll let him go!</p><div class="hdwiki_tmml">中文歌词</div>空缺(9月28号完成--宜轩)<div class="hdwiki_tmml">多媒体</div>空缺(10月左右完成--宜轩) |
2013年7月20日 (六) 11:34的版本
目录
时间线
- 7月25日导入标准页面(课程总结、课程提纲、学生课堂表现)
- 7月28日导入非标准页面
- 7月30日界面调试完毕
- 7月31日旧百科进入只读模式,www.ygclub.org/wiki指向新百科
待完成任务列表
- 导入总结帖、助教总结、学生课堂表现
- 总结帖、助教反馈、学生表现关联
- 非标准页面导入
- 图像的导入
- 不同课程用不同的logo
- 一个定制的皮肤( http://www.mediawiki.org/wiki/Manual:Gallery_of_user_styles)
- 导入层级类目体系
- 采用类目体系来组织多次上过的课程和正在开发的课程
互动百科导入维基百科数据的关键点
互动百科的数据格式:html
互动百科的数据格式保存的形式是html,在数据库中位于表wiki_doc中
其中,我们需要title, tags, summary和content。
而content里面的内容是html格式,mediawiki对其并非完全支持,我们需要对它进行处理。
维基百科的数据格式:wiki markup
维基源代码的格式点击本页右上角编辑源代码可以看到。
维基百科的数据格式和html部分相容
比如如下一段话,源代码其实是比较复杂的html,但是维基仍然可以比较好的解析:
A hunting we will go, a hunting we will go,
Heigh ho, the dairy-o, a hunting we will go!
A hunting we will go, a hunting we will go,
We'll catch a fox and put him in a box,
And then we'll let him go!
A hunting we will go, a hunting we will go,
Heigh ho, the dairy-o, a hunting we will go!
A hunting we will go, a hunting we will go,
We'll catch a fish and put him on a dish,
And then we'll let him go!
A hunting we will go, a hunting we will go,
Heigh ho, the dairy-o, a hunting we will go!
A hunting we will go, a hunting we will go,
We'll catch a bear and cut his hair,
And then we'll let him go!
A hunting we will go, a hunting we will go,
Heigh ho, the dairy-o, a hunting we will go!
A hunting we will go, a hunting we will go,
We'll catch a pig and dance a little jig,
And then we'll let him go!
A hunting we will go, a hunting we will go,
Heigh ho, the dairy-o, a hunting we will go!
A hunting we will go, a hunting we will go,
We'll catch a giraffe and make him laugh,
And then we'll let him go!
维基百科的图片和链接与html不相容
当出现链接和图片的时候,需要进行转换才能正常显示。 也就是<img>标签以及<a>标签,维基百科是不支持的。
- <img>标签的处理,维基百科支持的是直接输入图片的链接地址,比如
- <a> 标签的处理,维基百科支持的如下的语法 链接
hdwiki和mediawiki表格严重不兼容
表格需要另外想办法处理,两边非常不兼容,所以阳光百科的课程总结、上课准备提纲都有专门的程序转换,这里只考虑非标准页面(不是课程提纲、总结、学生课堂表现)的页面。
还有一些其他问题待补充
理想的效果
针对每一个hdwiki的页面(现在大概800个),都生成一个对应的wiki markup的文本文件。