Name: ppt-commitment-parser
Owner: g0v
Description: ????????????? CSV ????
Created: 2015-07-11 12:40:15.0
Updated: 2015-07-13 14:27:48.0
Pushed: 2015-07-17 06:37:52.0
Homepage: null
Size: 288
Language: JavaScript
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
?????????? PDF ??? CSV ???? PDF ?????????????????????????????(?)??1???(1)???? ? ?.?????????????????????
mmitment-parser <options> PDF??
???????? ppt-parser --help
?
rt pdftojson from 'pdftojson';
rt parser from 'ppt-commitment-parser';
ojson(PDF??).then(pdfData => {
r parsedData = parser(pdfData, parserOption);
parsedData ???????????
??????? 1 ?? 1 ???????????? 14 ?????????
6 ???????? 7 ?????? 8?9 ???? x?y ???pt??? 10 ????
?????????????????????
????","????","????????","??????","","",14,80,454,"???//??"
????","????","????????","??????","??????(??)","",14,109,556,"??????(??)???//??"
.
number: 2,
numberCH: '?',
text: '???????',
page: 14,
coord: [55, 373], // ????????????pt
items: [
{
number: 1,
numberCH: '?',
text: "????",
page: 14,
coord: [55, 402],
items: [
{
number: 1,
numberCH: '(?)',
text: '????????',
page: 14,
coord: [62, 427],
items: [
{
number: 1,
numberCH: '1',
text: '??????',
page: 14,
coord: [80, 454],
items: [
// text-only
{
text: '????????/* ?? */?????????????',
page: 14,
coord: [132, 480]
},
{ // text with number
number: 1,
numberCH: '(1)',
text: '??????(??)',
page: 14,
coord: [109, 556]
items: [ /* ... */ ]
}, // ...
]
}
]
}, //...
]
}, //...
]
// ...
ojson(PDF??, {onError: (errType, errPayload) => {}}) // returns a promise
onError
callback ? this
???? LineMachine
instance??????? LineMachine
? method ??? LineMachine
?????
errType === 'PARSE_NUM'
ayload === {
put // ????
errPayload.input
????????
errType === 'NUMBER_MISMATCH'
ayload === {
xt, // ???????
ge, // ????????
mber, // ?????????????
stSiblingSection, // ???? Section instance?????????????? undefined?
???????? 1 ??????????????????????? error?
errType === 'LEVEL_MISMATCH'
ayload === {
xt, // ???????
ge, // ????????
ord, // ??????????????????? pt?
vel, // ?????-1 ????0 ??????6 ??????
stLevel, // ??????
mberCH // ???????
errPayload.text
??????????????
?????????????????????????1?????1?????????? ??????????????????????????????1??????????? error?