Skip to content

Commit

Permalink
v.0.8.4362
Browse files Browse the repository at this point in the history
  • Loading branch information
mbykov committed Jun 30, 2018
1 parent 539b3e2 commit 1ecb565
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 16 deletions.
2 changes: 1 addition & 1 deletion package.json
Expand Up @@ -2,7 +2,7 @@
"name": "morpheus-greek",
"productName": "MorpheusGreek",
"description": "Morpheus for Ancient Greek based on electron.js",
"version": "0.8.4361",
"version": "0.8.4362",
"author": "Michael Bykov <m.bykov@gmail.com>",
"copyright": "© 2018, Michael Bykov",
"license": "GPL-3.0",
Expand Down
Binary file modified pouch/terms/000003.log
Binary file not shown.
2 changes: 1 addition & 1 deletion pouch/terms/LOG
@@ -1 +1 @@
2018/06/29-20:02:58.270187 7f5f0a296700 Delete type=3 #1
2018/06/30-14:51:48.544868 7fe8e5006700 Delete type=3 #1
10 changes: 7 additions & 3 deletions src/app.js
Expand Up @@ -23,6 +23,7 @@ import { q, qs, empty, create, span, p, div } from './helpers/utils'


const axios = require('axios');
// const orthos = require('../../orthos')
const orthos = require('orthos')
const path = require('path')

Expand Down Expand Up @@ -121,6 +122,7 @@ function showText (pars) {
spans.forEach(spn => {
let ospan = span(spn.text)
if (spn.gr) ospan.classList.add('greek'), wfs.push(spn.text)
if (spn.text == ' ') ospan.classList.add('space')
opar.appendChild(ospan)
})
otext.appendChild(opar)
Expand All @@ -136,7 +138,8 @@ function queryTerms(wfs) {
hterms = terms
let grs = qs('span.greek')
grs.forEach(spn => {
if (!terms[spn.textContent]) return
let dcase = orthos.downcase(spn.textContent)
if (!terms[dcase]) return
spn.classList.remove('greek')
spn.classList.add('term')
})
Expand Down Expand Up @@ -221,8 +224,9 @@ function showTerm(str) {
let ores = q('#results')
empty(ores)

let terms = hterms[str]
if (!terms.length) return
let dcase = orthos.downcase(str)
let terms = hterms[dcase]
if (!terms || !terms.length) return
terms.forEach(dict => {
// dict.pref - only as a first part of a wordform:
if (dict.pref) return
Expand Down
10 changes: 0 additions & 10 deletions src/helpers/databases.js
Expand Up @@ -17,16 +17,6 @@ const decompressTargz = require('decompress-targz')
let log = console.log
const jetData = jetpack.cwd(userDataPath)

// export function antraxVersion(aver) {
// let oldver = jetData.read('version.json', 'json')
// if (!oldver) {
// oldver = {antrax: aver}
// jetData.write('version.json', oldver)
// recreateDBs()
// }
// if (aver != oldver.antrax) recreateDBs()
// }

export function readCfg() {
let cfg = jetData.read('pouch/cfg.json', 'json')
return cfg
Expand Down
1 change: 1 addition & 0 deletions src/helpers/results.js
Expand Up @@ -72,6 +72,7 @@ function getPos (dict) {
else if (dict.indecl) pos = 'indecl:'
else if (dict.pref) pos = 'prefix:'
else if (dict.particle) pos = 'particle:'
else if (dict.spec) pos = 'special:'
else if (dict.xxx) pos = ''
return pos
}
14 changes: 13 additions & 1 deletion src/stylesheets/main.css
Expand Up @@ -69,8 +69,20 @@
}


span {
padding-right: 5px;
}

span.space {
padding-right: 0;
}

span.greek {
/* padding-left: 5px; */
padding-right: 0;
}

span.term {
padding-right: 0;
}

span.greek:hover {
Expand Down

0 comments on commit 1ecb565

Please sign in to comment.