Skip to content

Commit

Permalink
new Bible
Browse files Browse the repository at this point in the history
Mara
MCL
Matu
Kachin

...koh, wbc
  • Loading branch information
Khen Solomon Lethil committed Jul 2, 2019
1 parent d42ff46 commit a49e56f
Show file tree
Hide file tree
Showing 51 changed files with 502,868 additions and 271 deletions.
4 changes: 2 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
assets/
node_modules/
package-lock.json

sqlite/backup/
wbc/*.json
koh/*.json
18 changes: 18 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,2 +1,20 @@
{
"files.trimFinalNewlines": true,
"files.trimTrailingWhitespace": true,
"editor.renderLineHighlight": "none",
"editor.detectIndentation": false,
"editor.fontSize": 13,
"files.exclude": {
"src/**/*.js": true,
"src/**/*.css": true
},
"editor.tabSize": 2,
"workbench.colorCustomizations": {
"activityBar.background": "#dfdddd",
"activityBar.foreground":"#585858",
"textLink.foreground":"#ff0000",
"activityBar.inactiveForeground":"#aaaaac",
"statusBar.background" : "#b6b7b8"
},
"workbench.colorTheme": "Default Light+"
}
51 changes: 11 additions & 40 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -54,49 +54,20 @@ node bible ph4 list:no-dnb.1930,no-n11.2011,no-n11nn.2011,no-n78.1978,no-n78nn.1
node bible ph4 list:sv-dnf.2014,sv-kxii.1873,sv-nub15.2015,sv-s17.1917,sv-sb00.2000,sv-sbd00.2000,sv-sfb.1998,sv-sfb15.2015,sv-sfb98.1998,sv-sv17.1917 true
```

# taskName: `todo`
# taskIdentify: `wbc`

```shell
node bible ph4 todo:
node bible ph4 todo:fi-fi42.1642,fi-fi42d.1642,fi-fi76.1776,fi-fi76a.1776,fi-fi76d.1776
# request All
node bible wbc bible/348/GEN.1.JCLB true
# request only this
node bible wbc /bible/348/GEN.1.JCLB true
# import
node bible wbc 348
```

# taskName: `todo`


## Verse merge
```shell
<verse id="([0-9]+-[0-9]+)"
<verse id="([0-9]+)-([0-9]+)"
<verse id="\1" merge="\2"


<book id="(.+?)">(.*?)</info>


<book id="(.+?)" name="" shortname="">
<info id="name">(.+?)</info>
<info id="shortname">(.+?)</info>
<book id="(.*)" name="" shortname="">\n\t\t<info id="name">(.*)</info>\n\t\t<<info id="shortname">(.*)</info>
<book id="$1" name="$2" shortname="$3">
<book id="(.*)" name="" shortname="">
<book id="(.*)" name="" shortname="">
<info id="name">(.*)</info>
<info id="shortname">(.*)</info>
<book id="\1" name="\2" shortname="\3">
<book id="([0-9]+)" name="" shortname="">
<info id="name">(.*)</info>
<info id="shortname">(.*)</info>
```
Error:
finish1938
swedish1917
https://www.ph4.org/b4_index.php
danish1933 missing alots
npm link
node bible ph4 todo:
node bible ph4 todo:fi-fi42.1642,fi-fi42d.1642,fi-fi76.1776,fi-fi76a.1776,fi-fi76d.1776
```
59 changes: 59 additions & 0 deletions REFERENCE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
# Reference


```shell
<verse id="([0-9]+-[0-9]+)"
<verse id="([0-9]+)-([0-9]+)"
<verse id="\1" merge="\2"


<book id="(.+?)">(.*?)</info>


<book id="(.+?)" name="" shortname="">
<info id="name">(.+?)</info>
<info id="shortname">(.+?)</info>
<book id="(.*)" name="" shortname="">\n\t\t<info id="name">(.*)</info>\n\t\t<<info id="shortname">(.*)</info>
<book id="$1" name="$2" shortname="$3">
<book id="(.*)" name="" shortname="">
<book id="(.*)" name="" shortname="">
<info id="name">(.*)</info>
<info id="shortname">(.*)</info>
<book id="\1" name="\2" shortname="\3">
<book id="([0-9]+)" name="" shortname="">
<info id="name">(.*)</info>
<info id="shortname">(.*)</info>
```
# Error
[ ] finish1938
[ ] swedish1917
https://www.ph4.org/b4_index.php
danish1933 missing alots
npm link
# koh
- `\\n([a-zA-Z])` -> `--$1`
case (\d+):
title = "(.*)";
content = "(.*)";
break;
{"title":"$2","content":"$3"},\n
(\d+)‘ -> $1
(\d+)“ -> $1
Kachin need new source
25 changes: 19 additions & 6 deletions bible.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,16 @@ settings={
target:'json',
extension:'*.SQLite3'
},
koh:{
dirname:'koh',
target:'json',
extension:'*.json'
},
wbc:{
dirname:'wbc',
target:'json',
extension:'*.json'
},
sqlite:{
dirname:'sqlite',
final:true,
Expand All @@ -35,8 +45,8 @@ settings={
},
message:{
book: function(bId,cId){
var bTc = (bId < 10)?' ':'';
process.stdout.write(`\n....\x1b[2mBook\x1b[8m:\x1b[35m${bTc}${bId}\x1b[0m > \x1b[2mchapter\x1b[8m:`);
var spaces = (bId < 10)?' ':'';
process.stdout.write(`\n....\x1b[2mBook\x1b[8m:\x1b[35m${spaces}${bId}\x1b[0m > \x1b[2mchapter\x1b[8m:`);
if (cId){
if (cId instanceof Array){
this.chapter(cId.join(' '));
Expand All @@ -50,6 +60,9 @@ settings={
},
unknown: function(item){
console.log(`\n...\x1b[31m${item}\x1b[0m?`);
},
standard: function(item){
console.log(`\n...\x1b[31m${item}\x1b[0m`);
}
}
},
Expand Down Expand Up @@ -95,7 +108,7 @@ bibleCollectionWrite = function(result,callback){
}
});
} else {
callback(`...skip writing\x1b[35m ${tmp}\x1b[0m`);
callback(`...skip updating\x1b[35m ${tmp}\x1b[0m`);
}
},
task=null,
Expand Down Expand Up @@ -134,11 +147,11 @@ taskFilter={

console.log(` ${taskIdentify.toUpperCase()}:\x1b[35m ${tar.length}\x1b[0m`);
console.log(` Items/Todo:\x1b[35m ${src.length}/${todo.length}\x1b[0m`);

if (todo.length) {
// console.log(` todo:\x1b[35m ${todo.join(',')}\x1b[0m`);
console.log(`\n..Next?\n \x1b[31mnode \x1b[32mbible \x1b[36m${taskIdentify} \x1b[33mlist:\x1b[35m${todo.join(',')} \x1b[31mtrue\x1b[0m`);
}
}

var todoTarget = settings.task[taskIdentify].target;
var dest = bibleCollection.collection[todoTarget]
Expand Down Expand Up @@ -198,7 +211,7 @@ taskProcess=function(taskCurrent){
} else {
console.log(`\n..bookIdentify: `)
}

return task.main(settings).then(function(response){
bibleCollectionWrite(response,(e)=>{
console.log(e);
Expand Down
Loading

0 comments on commit a49e56f

Please sign in to comment.