Skip to content
This repository has been archived by the owner on Jan 8, 2025. It is now read-only.

Remove unused ManuScript code that does not work any more #124

Open
wants to merge 3 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 38 additions & 54 deletions tools/langs/manuscript.py
Original file line number Diff line number Diff line change
Expand Up @@ -226,28 +226,6 @@
}
}
return res;
}"
getPositionInDocument "(obj) {
if (not Self.MEIFlattened) {
return false;
}
for i = 0 to Length(Self.MEIFlattened) {
if (Self.MEIFlattened[i] = obj) {
return i;
}
}
return false;
}"
lookBack "(from, name) {
if (not Self.MEIFlattened) {
return false;
}
pos = getPositionInDocument(from);
for i = pos to 0 step -1 {
if (getName(Self.MEIFlattened[i]) = name) {
return Self.MEIFlattened[i];
}
}
}"
createXmlTag "(name, id, attributesList, isTerminal) {
if (name = '<!--')
Expand Down Expand Up @@ -407,19 +385,6 @@
meiDocumentToString "(meidoc) {
return _exportMeiDocument(meidoc);
}"
documentFromFile "(filename) {
res = _xmlImport(filename);

return res;
}"
popMode "(arr) {
if (arr.Length > 0) {
return arr.Pop();
} else {
// return PRE
return 15;
}
}"
_encodeEntities "(string)
{
/*
Expand Down Expand Up @@ -447,6 +412,44 @@

return string;
}"

generateRandomID "() {
//$module(ExportGenerators.mss)
id = Self._property:MEIID + 1;
Self._property:MEIID = id;
id = 'm-' & id;
return id;
}"
}
"""

AUTHORS = "Andrew Hankinson, Alastair Porter, and Others"

FILE_TEMPLATE = """
{{
{license}
{classes}
{extras}
}}
"""

# The XML parser code does not work at the moment because of how the code above
# has changed over time. It's kept anyway to facilitate future work on MEI
# import.
XMLPARSER ="""
documentFromFile "(filename) {
res = _xmlImport(filename);

return res;
}"
popMode "(arr) {
if (arr.Length > 0) {
return arr.Pop();
} else {
// return PRE
return 15;
}
}"
_xmlImport "(filename) {
/*
Based on the Quick-n-Dirty XML parser at
Expand Down Expand Up @@ -831,25 +834,6 @@
}
return meidoc;
}"

generateRandomID "() {
//$module(ExportGenerators.mss)
id = Self._property:MEIID + 1;
Self._property:MEIID = id;
id = 'm-' & id;
return id;
}"
}
"""

AUTHORS = "Andrew Hankinson, Alastair Porter, and Others"

FILE_TEMPLATE = """
{{
{license}
{classes}
{extras}
}}
"""


Expand Down