Commit 68de373f authored by Ronny's avatar Ronny

写注释,去掉不必要的分号

parent eea7f55d
/* /*
http://www.xmind.net/developer/ http://freemind.sourceforge.net/
Parsing XMind file freemind文件后缀为.mm,实际格式为xml
XMind files are generated in XMind Workbook (.xmind) format, an open format that is based on the principles of OpenDocument. It consists of a ZIP compressed archive containing separate XML documents for content and styles, a .jpg image file for thumbnails, and directories for related attachments. */
*/
KityMinder.registerProtocal( 'freemind', function () { KityMinder.registerProtocal( 'freemind', function () {
// 标签 map
var markerMap = { var markerMap = {
'full-1' : ['PriorityIcon', 1] 'full-1' : ['PriorityIcon', 1]
,'full-2' : ['PriorityIcon', 2] ,'full-2' : ['PriorityIcon', 2]
...@@ -58,14 +58,14 @@ KityMinder.registerProtocal( 'freemind', function () { ...@@ -58,14 +58,14 @@ KityMinder.registerProtocal( 'freemind', function () {
processTopic(tmp, obj.children[0]); processTopic(tmp, obj.children[0]);
} }
} }
}; }
function xml2km(xml){ function xml2km(xml){
var json = $.xml2json(xml); var json = $.xml2json(xml);
var result = {}; var result = {};
processTopic(json.node, result); processTopic(json.node, result);
return result; return result;
}; }
return { return {
fileDescription: 'xmind格式文件', fileDescription: 'xmind格式文件',
......
/* /*
http://www.xmind.net/developer/ http://www.mindjet.com/mindmanager/
Parsing XMind file mindmanager的后缀为.mmap,实际文件格式是zip,解压之后核心文件是Document.xml
XMind files are generated in XMind Workbook (.xmind) format, an open format that is based on the principles of OpenDocument. It consists of a ZIP compressed archive containing separate XML documents for content and styles, a .jpg image file for thumbnails, and directories for related attachments. */
*/
KityMinder.registerProtocal( 'mindmanager', function () { KityMinder.registerProtocal( 'mindmanager', function () {
// 标签 map
var markerMap = { var markerMap = {
'urn:mindjet:Prio1' : ['PriorityIcon', 1] 'urn:mindjet:Prio1' : ['PriorityIcon', 1]
,'urn:mindjet:Prio2' : ['PriorityIcon', 2] ,'urn:mindjet:Prio2' : ['PriorityIcon', 2]
...@@ -59,20 +59,20 @@ KityMinder.registerProtocal( 'mindmanager', function () { ...@@ -59,20 +59,20 @@ KityMinder.registerProtocal( 'mindmanager', function () {
processTopic(tmp, obj.children[0]); processTopic(tmp, obj.children[0]);
} }
} }
}; }
function xml2km(xml){ function xml2km(xml){
var json = $.xml2json(xml); var json = $.xml2json(xml);
var result = {}; var result = {};
processTopic(json.OneTopic.Topic, result); processTopic(json.OneTopic.Topic, result);
return result; return result;
}; }
function getEntries(file, onend) { function getEntries(file, onend) {
zip.createReader(new zip.BlobReader(file), function(zipReader) { zip.createReader(new zip.BlobReader(file), function(zipReader) {
zipReader.getEntries(onend); zipReader.getEntries(onend);
}, onerror); }, onerror);
}; }
return { return {
fileDescription: 'mindmanager格式文件', fileDescription: 'mindmanager格式文件',
......
...@@ -9,6 +9,7 @@ ...@@ -9,6 +9,7 @@
KityMinder.registerProtocal( 'xmind', function () { KityMinder.registerProtocal( 'xmind', function () {
// 标签 map
var markerMap = { var markerMap = {
'priority-1' : ['PriorityIcon', 1] 'priority-1' : ['PriorityIcon', 1]
,'priority-2' : ['PriorityIcon', 2] ,'priority-2' : ['PriorityIcon', 2]
...@@ -63,20 +64,20 @@ KityMinder.registerProtocal( 'xmind', function () { ...@@ -63,20 +64,20 @@ KityMinder.registerProtocal( 'xmind', function () {
processTopic(tmp, obj.children[0]); processTopic(tmp, obj.children[0]);
} }
} }
}; }
function xml2km(xml){ function xml2km(xml){
var json = $.xml2json(xml); var json = $.xml2json(xml);
var result = {}; var result = {};
processTopic(json.sheet.topic, result); processTopic(json.sheet.topic, result);
return result; return result;
}; }
function getEntries(file, onend) { function getEntries(file, onend) {
zip.createReader(new zip.BlobReader(file), function(zipReader) { zip.createReader(new zip.BlobReader(file), function(zipReader) {
zipReader.getEntries(onend); zipReader.getEntries(onend);
}, onerror); }, onerror);
}; }
return { return {
fileDescription: 'xmind格式文件', fileDescription: 'xmind格式文件',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment