Overview
| Comment: | [graphspell] fix date generation |
|---|---|
| Downloads: | Tarball | ZIP archive | SQL archive |
| Timelines: | family | ancestors | descendants | both | trunk | graphspell |
| Files: | files | file ages | folders |
| SHA3-256: |
5dd255e81e39f3942c8f919e702ff52d |
| User & Date: | olr on 2018-02-12 12:55:12 |
| Other Links: | manifest | tags |
Context
|
2018-02-12
| ||
| 13:37 | [graphspell][js][bug] ibdawg: fix getJSON() check-in: c7ead17f10 user: olr tags: trunk, graphspell | |
| 12:55 | [graphspell] fix date generation check-in: 5dd255e81e user: olr tags: trunk, graphspell | |
| 12:29 | [graphspell][js] ibdawg: getJSON() function + [fx] update: lexicon editor check-in: ec5393a4f1 user: olr tags: trunk, fx, graphspell | |
Changes
Modified graphspell-js/dawg.js from [0b803fa3ec] to [efda06dcfb].
| ︙ | ︙ | |||
396 397 398 399 400 401 402 |
};
return oJSON;
}
_getDate () {
let oDate = new Date();
let sMonth = (oDate.getMonth() + 1).toString().padStart(2, "0"); // Month+1: Because JS always sucks somehow.
| | | 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 |
};
return oJSON;
}
_getDate () {
let oDate = new Date();
let sMonth = (oDate.getMonth() + 1).toString().padStart(2, "0"); // Month+1: Because JS always sucks somehow.
let sDay = (oDate.getDate()).toString().padStart(2, "0");
let sHours = (oDate.getHours()).toString().padStart(2, "0");
let sMinutes = (oDate.getMinutes()).toString().padStart(2, "0");
return `${oDate.getFullYear()}-${sMonth}-${sDay}, ${sHours}:${sMinutes}`;
}
}
|
| ︙ | ︙ |
Modified graphspell/dawg.py from [485e7076d7] to [96443fe4a2].
| ︙ | ︙ | |||
500 501 502 503 504 505 506 |
elif nCompressionMethod == 3:
hDst.write(self.oRoot.convToBytes3(self.nBytesArc, self.nBytesNodeAddress, self.nBytesOffset))
for oNode in self.lSortedNodes:
hDst.write(oNode.convToBytes3(self.nBytesArc, self.nBytesNodeAddress, self.nBytesOffset))
hDst.close()
def _getDate (self):
| | | 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 |
elif nCompressionMethod == 3:
hDst.write(self.oRoot.convToBytes3(self.nBytesArc, self.nBytesNodeAddress, self.nBytesOffset))
for oNode in self.lSortedNodes:
hDst.write(oNode.convToBytes3(self.nBytesArc, self.nBytesNodeAddress, self.nBytesOffset))
hDst.close()
def _getDate (self):
return time.strftime("%Y.%m.%d, %H:%M")
def _writeNodes (self, sPathFile, nCompressionMethod):
"for debugging only"
print(" > Write nodes")
with open(sPathFile+".nodes."+str(nCompressionMethod)+".txt", 'w', encoding='utf-8', newline="\n") as hDst:
if nCompressionMethod == 1:
hDst.write(self.oRoot.getTxtRepr1(self.nBytesArc, self.nBytesNodeAddress, self.lArcVal)+"\n")
|
| ︙ | ︙ |
Modified graphspell/ibdawg.py from [a42b8fee36] to [6527ad55bf].
| ︙ | ︙ | |||
189 190 191 192 193 194 195 |
hDst.write('// JavaScript\n// Generated data (do not edit)\n\n"use strict";\n\nconst dictionary = ')
hDst.write(json.dumps({
"sHeader": "/pyfsa/",
"sLangCode": self.sLangCode,
"sLangName": self.sLangName,
"sDicName": self.sDicName,
"sFileName": self.sFileName,
| | | 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 |
hDst.write('// JavaScript\n// Generated data (do not edit)\n\n"use strict";\n\nconst dictionary = ')
hDst.write(json.dumps({
"sHeader": "/pyfsa/",
"sLangCode": self.sLangCode,
"sLangName": self.sLangName,
"sDicName": self.sDicName,
"sFileName": self.sFileName,
"sDate": self.sDate,
"nEntry": self.nEntry,
"nChar": self.nChar,
"nAff": self.nAff,
"nTag": self.nTag,
"cStemming": self.cStemming,
"dChar": self.dChar,
"nNode": self.nNode,
|
| ︙ | ︙ |