mondrian-entries
Advanced tools
Comparing version 1.2.0 to 1.2.1
@@ -6,1 +6,7 @@ export declare const xmlDir: string; | ||
export declare const xmlFiles: string[]; | ||
export declare const idByFilename: { | ||
'1917_NieuweBeeldingInSchilderkunst_STIJL.xml': string; | ||
'1918_BepaaldeEnOnbepaalde_STIJL.xml': string; | ||
'Schetsboek-1.xml': string; | ||
'Schetsboek-2.xml': string; | ||
}; |
@@ -13,1 +13,7 @@ "use strict"; | ||
]; | ||
exports.idByFilename = { | ||
'1917_NieuweBeeldingInSchilderkunst_STIJL.xml': 'nieuwe-beelding-in-schilderkunst', | ||
'1918_BepaaldeEnOnbepaalde_STIJL.xml': 'bepaalde-en-onbepaalde', | ||
'Schetsboek-1.xml': 'schetsboek-1', | ||
'Schetsboek-2.xml': 'schetsboek-2', | ||
}; |
@@ -25,11 +25,9 @@ "use strict"; | ||
const usedTagsInText = yield handle_xml_1.default(xmlData, constants_1.entriesDir, { | ||
ignore: [{ | ||
ignore: [ | ||
{ | ||
attribute: 'type', | ||
name: 'div', | ||
value: 'edsNotes', | ||
}, { | ||
attribute: 'type', | ||
name: 'div', | ||
value: 'origNotes', | ||
}], | ||
} | ||
], | ||
state: { | ||
@@ -36,0 +34,0 @@ facsimiles, |
@@ -6,3 +6,3 @@ "use strict"; | ||
open() { | ||
return `<${this.name()} activeNote={props.activeNote}>`; | ||
return `<${this.name()} activeNote={props.activeNote} noteTop={props.noteTop}>`; | ||
} | ||
@@ -9,0 +9,0 @@ name() { |
@@ -16,3 +16,3 @@ "use strict"; | ||
return facsimiles != null && facsimiles.hasOwnProperty(facs) ? | ||
`<FacsThumb activateFacsimile={props.activateFacsimile} url="${facsimiles[facs]}" />` : | ||
`<FacsThumb activateFacsimile={props.activateFacsimile} activeNote={props.activeNote} url="${facsimiles[facs]}" />` : | ||
''; | ||
@@ -19,0 +19,0 @@ } |
@@ -21,3 +21,3 @@ "use strict"; | ||
.map((l, i) => ({ | ||
id: path.basename(xmlPath, '.xml').toLowerCase().replace(/_/g, '-') + '___' + i, | ||
id: constants_1.idByFilename[path.basename(xmlPath)] + '___' + i, | ||
line_t: l, | ||
@@ -24,0 +24,0 @@ })) |
@@ -0,1 +1,7 @@ | ||
### v1.2.1 (2017/5/4 15:44) | ||
* Fix entry IDs | ||
* Changes for moving annotations in FE | ||
* Add facs thumb | ||
* Bump mondrian-components | ||
### v1.2.0 (2017/4/28 16:51) | ||
@@ -2,0 +8,0 @@ * Refactor and add notes |
{ | ||
"name": "mondrian-entries", | ||
"version": "1.2.0", | ||
"version": "1.2.1", | ||
"description": "Generate .tsx and Solr input from TEI-XML", | ||
@@ -21,4 +21,4 @@ "repository": "https://github.com/HuygensING/mondrian-entries", | ||
"glob": "^7.1.1", | ||
"hi-xml2html": "^2.0.0", | ||
"mondrian-components": "^1.3.0", | ||
"hi-xml2html": "^2.0.2", | ||
"mondrian-components": "^1.4.0", | ||
"sax": "^1.2.2" | ||
@@ -25,0 +25,0 @@ }, |
@@ -11,1 +11,8 @@ export const xmlDir = `${process.cwd()}/__xml__`; | ||
]; | ||
export const idByFilename = { | ||
'1917_NieuweBeeldingInSchilderkunst_STIJL.xml': 'nieuwe-beelding-in-schilderkunst', | ||
'1918_BepaaldeEnOnbepaalde_STIJL.xml': 'bepaalde-en-onbepaalde', | ||
'Schetsboek-1.xml': 'schetsboek-1', | ||
'Schetsboek-2.xml': 'schetsboek-2', | ||
}; |
@@ -25,11 +25,14 @@ import * as fs from "fs-extra"; | ||
const usedTagsInText = await handleXml(xmlData, entriesDir, { | ||
ignore: [{ | ||
attribute: 'type', | ||
name: 'div', | ||
value: 'edsNotes', | ||
}, { | ||
attribute: 'type', | ||
name: 'div', | ||
value: 'origNotes', | ||
}], | ||
ignore: [ | ||
// { | ||
// attribute: 'type', | ||
// name: 'div', | ||
// value: 'edsNotes', | ||
// }, | ||
{ | ||
attribute: 'type', | ||
name: 'div', | ||
value: 'origNotes', | ||
} | ||
], | ||
state: { | ||
@@ -36,0 +39,0 @@ facsimiles, |
@@ -5,3 +5,3 @@ import { JsxTag } from 'hi-xml2html'; | ||
public open() { | ||
return `<${this.name()} activeNote={props.activeNote}>`; | ||
return `<${this.name()} activeNote={props.activeNote} noteTop={props.noteTop}>`; | ||
} | ||
@@ -8,0 +8,0 @@ |
@@ -16,5 +16,5 @@ import {JsxTag} from 'hi-xml2html'; | ||
return facsimiles != null && facsimiles.hasOwnProperty(facs) ? | ||
`<FacsThumb activateFacsimile={props.activateFacsimile} url="${facsimiles[facs]}" />` : | ||
`<FacsThumb activateFacsimile={props.activateFacsimile} activeNote={props.activeNote} url="${facsimiles[facs]}" />` : | ||
''; | ||
} | ||
}; |
import * as fs from 'fs-extra'; | ||
import * as path from 'path'; | ||
import xml2html from 'hi-xml2html'; | ||
import {xmlFiles, xmlDir} from "../constants"; | ||
import {xmlFiles, xmlDir, idByFilename} from "../constants"; | ||
import Lb from "./tags/lb"; | ||
@@ -14,3 +14,3 @@ | ||
.map((l, i) => ({ | ||
id: path.basename(xmlPath, '.xml').toLowerCase().replace(/_/g, '-') + '___' + i, | ||
id: idByFilename[path.basename(xmlPath)] + '___' + i, | ||
line_t: l, | ||
@@ -17,0 +17,0 @@ })) |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
151162
958
Updatedhi-xml2html@^2.0.2
Updatedmondrian-components@^1.4.0