-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathTODO.otl
186 lines (160 loc) · 8.23 KB
/
TODO.otl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
> Goals
TODO
[_] FIXME: angle brackets break format for xhtml and fb2
[_] FIXME: save indendent scroll position in local storage
[_] FIXME: dld/tl bugs found on re:zero
[_] HACK deal with connection interruptions (don't freeze as it's now)
[_] Simplify dicts format as one file
[$] Split todo.otl in multiple docs/*.nou.
2016-07-02 [X] Move 'js' parts into aeternum
Split development in different orphan branches
[_] FIX: when specifed direct --url to chapter w/o number -- need process chapter anyway
:= Currently it's not -- because loop won't run with chapters=[]
: http://stackoverflow.com/questions/15301147/python-argparse-default-value-or-specified-value
[_] Autogenerated gh-pages
http://stackoverflow.com/questions/5296236/how-to-add-a-git-repo-as-a-submodule-of-itself-or-how-to-generate-github-page
Add links to all involved sub-repos
[_] Releases
https://help.github.com/articles/creating-releases/
Allow world-wide editable wiki for users to place their own lexics/sub-plugins/TL-stories
TRY:(syntax)
Make with python -- converge statistics from separate words, then crop by
threshold >3, filter frequent particles '-to', filter list of already
highlighted words (contained several yaml's -- specific and general),
show. Then using this statistics on new files you can speedily determine
necessary new words to add. Then you can generate .vimrc with necessary
syntax.
Second merit -- using statistics, you can show translation only under
first 3 word entries, ignoring all others -- for text space economy when
prominent knowing language.
$ cat arifureta-130.otl | sed -rn '/\|\s*(\w+)\s*\|.*/s//\1/p' | sort -n | uniq -c | sort -n
Static formats generators
xhtml
[_] THINK? use xml2dict parser for forming page?
: https://github.com/martinblech/xmltodict
TODO: add splitting by regex, generate content by js?
Regex
http://www.w3schools.com/jsref/jsref_obj_regexp.asp
(i) https://developer.mozilla.org/en/docs/Web/JavaScript/Guide/Regular_Expressions
File reading
http://www.html5rocks.com/en/tutorials/file/dndfiles/
http://stackoverflow.com/questions/3582671/how-to-open-a-local-disk-file-with-javascript
https://gist.github.com/thiagodebastos/08ea551b97892d585f17
NOTE: loaded db must be pre-generated from all translators, dicts, etc purposely for this WN
? how to unite db's for subtitution / highlighting
THINK:(-vs-) db format
sqlite
better access time
compressed size
query
! CHECK: sqlite in js
plain text
readability
editability
distribution
vcs
Format
BUT: how to load yaml? Or js can natively (but js isn't Ruby)?
: http://stackoverflow.com/questions/4335804/javascript-yaml-parser
https://github.com/tj/js-yaml
https://github.com/jeremyfa/yaml.js
https://code.google.com/archive/p/javascript-yaml-parser
ALT:(own format) simplified yaml -- use code snips from yaml parser
keys: ^\s*([a-z_]+\.?)+:\s*$
MAYBE use '.' for flattened nesting
object-like k1.k2.k3:
path-like k1/k2/k3:
THEN all next stuff until another key goes into last key
+ no need to awfully control indent in 920 editor on android
+ useful for long lists to find out hierarchy coords
+ easy split/join throughout multiple files
- miswritten path parts -> disjointed hierarchy
single-line statement: \s*
origin, sound, tr1, tr2, ...
indent parsed only for keys
no mixed keys/statements on one level
all statements go to last key independently from indent
[_] Document dict/style formats in README
[_] Table folding / hiding
[_] DEV Copy to clipboard on press (individual words) in table column
http://stackoverflow.com/questions/3325867/folding-unfolding-table-with-html-javascript
>>[_] http://www.html5rocks.com/en/mobile/responsivedesign/
[_] DEV popup meaning/transcription on click
http://www.sitepoint.com/xhtml-strict-popups/
http://accessify.com/features/tutorials/the-perfect-popup/archive/
[_] How about clicking on syntax words -> links to some chapter of jap grammar book?
< likewise some figure of speech which I forget often
THINK
DEV integrate yarxi.pl
[_] Copy articles inside xhtml (one article -- many references)
[_] toggle visibility of section with article from yarxi by click on word
[_] reuse same article (content is one copy) for all same words (construct dictionary with back-refs)
Store db reduced for particular novel instead of universal dicts
[_] jump to glossary at bottom of page / another embedded page / popup window with content
NOTE:DEV:(js)
2016-02-04 [X] FIXME keep scroll position on resize and browser restart
[_] THINK: onresize and onbeforeunload -- enough to storePos()? But if crash...
[_] FIXME: If text wraps, then on resize relative position isn't correct
[_] BUG: call for storePos(); inside onResize() don't work as expected
:= It somehow saves new position after resize instead of old!
:? CHECK: Maybe window 'h' is updated before 'y'?
[_] BUG:WARNING: key scrollRelPos in localStorage is shared between all arifureta-*.xhtml
: Therefore when loading new page it will jump to new old inherited position!
THINK
2016-02-03 [X] TODO: continue line-by-line translation from last response onward
[_] FIXME: don't split line in source/web.py, if before/after regex <=6 symbols
: Also unite all splitting in one place -- move additional splitting at ','
[_] FIXME: split line -- when url for GET must be less then 2000 characters
[_] Make statistics on words
: choose set by threshold and highlight -- or hi! by gradations of like
: pink or better last gray palette. Others same as normal text/kana.
:= This will allow to focus on most often used kanji to remember
Export vim syntax highlighting to phone
hardcopy > ss.ps (no japanese) and then ps2pdf ss.ps
:OR :TOhtml and then make epub?
:> Now I work with .xhtml creation
[_] Reformat synonyms table to easily copy entries into yml as whole row
:= can be also kept hidden and being copied in yml format only on click
IDEA: different processing, based on absolute paths?
E.g. -- treat group 'Characters' as whole words only
:> No sense: as I could use patterns in fields. Firstly, accumulate some lexics.
IDEA: in xhtml make words in table as links
en-ru -- translate in online dictionary
jap-kanji -- search in yarxi/stardict
IDEA: choose word group directly from radio list after click on word
:= It allows to fill db in much more faster/comfortable way
IDEA: using Qt I can edit TL's textboxes with fakevim
REGRESSION
[_] FIX generation from yml vim syntax highlightings
[_] THINK if possible to fix auto indentation for yml
[_] Concealing in yml of '|' and replacing with bold ', '
[_] FIX: remove jap '[' ']' from TR table
DEV plugin for vim: specific highlighting and editing optimization
:= To eliminate necessity in votl and logically use some own keymaps.
:+ Then I could use python inside vim to regenerate and reload syntax files
> IDEA (cornerstones):
Lexems -- fast extraction into *.yml
Grammar -- group and split difficult sentences
IDEA: edits in vim -> export back into db to benefit all other formats/viewers
Consider as the best idea, especially for ranobe translation process.
[_] Shortcuts to fast populate *.yml with new words
:? open split with local .yml, fast open ',.[0-9]' common .yml
[_] Regex convert
SEE:(vim) :h perl-patterns
https://github.com/othree/eregex.vim/blob/master/plugin/eregex.vim
THINK: prefer perl (or what compatible with js) instead of vimre?
[_] THINK?: Attach account from yarp for grammar parsing
DEV
[_] USE cfg/*.yml for common lexics and <ranobe>.yml or <ranobe>/*.yml for specific
[_] Generate vimrc from all yml cfgs into ~/.cache/forestanza.vim
: OR load by :pythondo, assuming already installed pyYaml
[_] Load syntax by 'source forestanza.vim' inside local <ranobe>/.vimrc
: OR inside <ranobe>/ place script to launch: vim -c 'source ...'
Style
256 term -> RGB
http://www.calmar.ws/vim/256-xterm-24bit-rgb-color-chart.html
[_] Split lexics and colorscheme.
[_] Treat whole key-path inside yml as identifier for group
[_] Inherit colors in colorschemes from parent level
[_] Override colors by direct path
[_] Set several color variations for term and gui/pdf