Compare commits
No commits in common. "assets" and "master" have entirely different histories.
21
CONTRIBUTING.md
Normal file
21
CONTRIBUTING.md
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
# How to Contribute
|
||||||
|
|
||||||
|
The easiest way to contribute is via CrowdAnki. Install Anki and add the addon CrowdAnki to it.
|
||||||
|
Then, you can add this repo via `File -> CrowdAnki: Import from git repository`.
|
||||||
|
After you've done the modifications you want to, export the deck via `File -> Export -> CrowdAnki JSON representation`
|
||||||
|
These changes can then be added via a normal git pull request.
|
||||||
|
(If you're not too familiar with git, you can also just send the json to my email: abocken@ethz.ch, then I will add the changes.)
|
||||||
|
|
||||||
|
## Editing fields
|
||||||
|
|
||||||
|
You've probably noticed how the fields I'm using aren't plain text but are HTML.
|
||||||
|
If you want to edit a field in a major way, please familiarize yourself with the HTML representation of each field.
|
||||||
|
I think you'll quickly get the format after looking at one or two examples.
|
||||||
|
|
||||||
|
You can view the html of a field in the Browse window via:
|
||||||
|
|
||||||
|
Select a card -> select the field you want to edit -> click on the burger menu (the one to the right where all the format options like bold and italics are) -> edit HTML
|
||||||
|
|
||||||
|
`Ctrl+Shift+X`should also open up the HTML of the field.
|
||||||
|
|
||||||
|
Shoot me an email if there is anything unclear to you, I'll gladly help you. (abocken@ethz.ch)
|
21
LICENSE
Normal file
21
LICENSE
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
MIT License
|
||||||
|
|
||||||
|
Copyright (c) 2020 Alexander Bocken
|
||||||
|
|
||||||
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
in the Software without restriction, including without limitation the rights
|
||||||
|
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||||
|
copies of the Software, and to permit persons to whom the Software is
|
||||||
|
furnished to do so, subject to the following conditions:
|
||||||
|
|
||||||
|
The above copyright notice and this permission notice shall be included in all
|
||||||
|
copies or substantial portions of the Software.
|
||||||
|
|
||||||
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||||
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||||
|
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||||
|
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||||
|
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||||
|
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||||
|
SOFTWARE.
|
33
README.md
Normal file
33
README.md
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
# AVL
|
||||||
|
|
||||||
|
<img src="/../assets/total_front.png" alt="Example of front of card" width="49%"> <img src="/../assets/total_back.png" alt="Example of back of card" width="49%">
|
||||||
|
|
||||||
|
This is a vocabulary list for Anki derived from the Advanced Vocabulary List (AVL). It includes no. 201 to no. 520.
|
||||||
|
|
||||||
|
This vocab list is for the purpose of stuyding these words for my course [Advanced English for academic purposes C1-C2](https://www.sprachenzentrum.uzh.ch/de/angebot/Kursdetail.html?sprachid=sprache:englisch&targetgpid=zielgruppe:studentETHZ&kursnr=217424a3-e447-4531-9d39-3b04ea63006e) at university.
|
||||||
|
A heavy focus is set on cognates and collocations for each word family, not just a definition for each word.
|
||||||
|
|
||||||
|
## How to use/import
|
||||||
|
|
||||||
|
You can easily import this deck via either the avilable `AVL.apkg` or CrowdAnki.
|
||||||
|
(Information for the latter see below)
|
||||||
|
The apkg files can be found in the ['Releases' section](https://github.com/AlexBocken/AVL/releases) of this github.
|
||||||
|
|
||||||
|
I'm using Anki as my vocab program with the Addon [CrowdAnki](https://github.com/Stvad/CrowdAnki) to export in a diff-friendly json-file. You can easily add it to your Anki setup via the code given on [its AnkiWeb page](https://ankiweb.net/shared/info/1788670778).
|
||||||
|
|
||||||
|
## Implementation
|
||||||
|
|
||||||
|
For time management reasons, I've decided to just rip the information from [ozdic.com](http://www.ozdic.com/).
|
||||||
|
This leaves me with 50 words that couldn't be found on ozdic.
|
||||||
|
(See the TODO.md for the list of words yet to be added correctly.)
|
||||||
|
These will be added manually from time to time over the coming winter semester 2020.
|
||||||
|
|
||||||
|
### Script
|
||||||
|
|
||||||
|
The script I've implemented to rip from ozdic seems to work fine in general, but has a few issues from time to time.
|
||||||
|
Expect some weird formatting at points.
|
||||||
|
These will be fixed over the coming weeks.
|
||||||
|
|
||||||
|
## License
|
||||||
|
|
||||||
|
MIT
|
51
TODO.md
Normal file
51
TODO.md
Normal file
@ -0,0 +1,51 @@
|
|||||||
|
| no. | word |
|
||||||
|
| ---- | ------- |
|
||||||
|
| 241 | regarding |
|
||||||
|
| 242 | european |
|
||||||
|
| 268 | construct |
|
||||||
|
| 274 | multiple |
|
||||||
|
| 276 | overall |
|
||||||
|
| 289 | urban |
|
||||||
|
| 292 | mental |
|
||||||
|
| 298 | visual |
|
||||||
|
| 299 | above |
|
||||||
|
| 306 | i.e. |
|
||||||
|
| 308 | conclude |
|
||||||
|
| 310 | agricultural |
|
||||||
|
| 311 | moreover |
|
||||||
|
| 312 | rapidly |
|
||||||
|
| 314 | approximately |
|
||||||
|
| 321 | precisely |
|
||||||
|
| 323 | domestic |
|
||||||
|
| 326 | actual |
|
||||||
|
| 341 | largely |
|
||||||
|
| 347 | enable |
|
||||||
|
| 352 | substantial |
|
||||||
|
| 357 | external |
|
||||||
|
| 361 | subsequent |
|
||||||
|
| 383 | considerable |
|
||||||
|
| 388 | respectively |
|
||||||
|
| 392 | german |
|
||||||
|
| 396 | constitute |
|
||||||
|
| 399 | acquire |
|
||||||
|
| 414 | collective |
|
||||||
|
| 419 | furthermore |
|
||||||
|
| 424 | characterize |
|
||||||
|
| 432 | extensive |
|
||||||
|
| 433 | biological |
|
||||||
|
| 436 | widely |
|
||||||
|
| 438 | merely |
|
||||||
|
| 446 | explicitly |
|
||||||
|
| 449 | nevertheless |
|
||||||
|
| 452 | intellectual |
|
||||||
|
| 463 | strongly |
|
||||||
|
| 472 | racial |
|
||||||
|
| 476 | mutual |
|
||||||
|
| 486 | assign |
|
||||||
|
| 487 | asia |
|
||||||
|
| 502 | hence |
|
||||||
|
| 504 | give |
|
||||||
|
| 509 | ethical |
|
||||||
|
| 514 | residential |
|
||||||
|
| 517 | simultaneously |
|
||||||
|
| 518 | possess |
|
320
script/avl.csv
Normal file
320
script/avl.csv
Normal file
@ -0,0 +1,320 @@
|
|||||||
|
201 unit
|
||||||
|
202 total
|
||||||
|
203 complex
|
||||||
|
204 employ
|
||||||
|
205 promote
|
||||||
|
206 literature
|
||||||
|
207 procedure
|
||||||
|
208 appropriate
|
||||||
|
209 estimate
|
||||||
|
210 negative
|
||||||
|
211 characteristic
|
||||||
|
212 typically
|
||||||
|
213 challenge
|
||||||
|
214 principle
|
||||||
|
215 element
|
||||||
|
216 ethnic
|
||||||
|
217 depend
|
||||||
|
218 creation
|
||||||
|
219 integration
|
||||||
|
220 aspect
|
||||||
|
221 publish
|
||||||
|
222 perspective
|
||||||
|
223 basic
|
||||||
|
224 belief
|
||||||
|
225 technique
|
||||||
|
226 outcome
|
||||||
|
227 explore
|
||||||
|
228 distribution
|
||||||
|
229 future
|
||||||
|
230 importance
|
||||||
|
231 independent
|
||||||
|
232 initial
|
||||||
|
233 feature
|
||||||
|
234 desire
|
||||||
|
235 following
|
||||||
|
236 alternative
|
||||||
|
237 consistent
|
||||||
|
238 basis
|
||||||
|
239 contrast
|
||||||
|
240 obtain
|
||||||
|
241 regarding
|
||||||
|
242 european
|
||||||
|
243 distinction
|
||||||
|
244 express
|
||||||
|
245 variety
|
||||||
|
246 broad
|
||||||
|
247 component
|
||||||
|
248 frequently
|
||||||
|
249 assume
|
||||||
|
250 additional
|
||||||
|
251 tool
|
||||||
|
252 predict
|
||||||
|
253 internal
|
||||||
|
254 labor
|
||||||
|
255 engage
|
||||||
|
256 separate
|
||||||
|
257 highly
|
||||||
|
258 rely
|
||||||
|
259 assess
|
||||||
|
260 objective
|
||||||
|
261 encourage
|
||||||
|
262 adopt
|
||||||
|
263 view
|
||||||
|
264 stability
|
||||||
|
265 client
|
||||||
|
266 instrument
|
||||||
|
267 extend
|
||||||
|
268 construct
|
||||||
|
269 demand
|
||||||
|
270 vision
|
||||||
|
271 propose
|
||||||
|
272 efficiency
|
||||||
|
273 solution
|
||||||
|
274 multiple
|
||||||
|
275 conclusion
|
||||||
|
276 overall
|
||||||
|
277 presence
|
||||||
|
278 claim
|
||||||
|
279 transform
|
||||||
|
280 generate
|
||||||
|
281 failure
|
||||||
|
282 advance
|
||||||
|
283 connection
|
||||||
|
284 journal
|
||||||
|
285 initiative
|
||||||
|
286 enhance
|
||||||
|
287 accurate
|
||||||
|
288 facility
|
||||||
|
289 urban
|
||||||
|
290 protection
|
||||||
|
291 extent
|
||||||
|
292 mental
|
||||||
|
293 consequence
|
||||||
|
294 institute
|
||||||
|
295 content
|
||||||
|
296 device
|
||||||
|
297 scholar
|
||||||
|
298 visual
|
||||||
|
299 above
|
||||||
|
300 unique
|
||||||
|
301 difficulty
|
||||||
|
302 discipline
|
||||||
|
303 sustain
|
||||||
|
304 capacity
|
||||||
|
305 perceive
|
||||||
|
306 i.e.
|
||||||
|
307 ensure
|
||||||
|
308 conclude
|
||||||
|
309 combination
|
||||||
|
310 agricultural
|
||||||
|
311 moreover
|
||||||
|
312 emphasize
|
||||||
|
313 rapidly
|
||||||
|
314 approximately
|
||||||
|
315 acceptance
|
||||||
|
316 sector
|
||||||
|
317 commitment
|
||||||
|
318 experiment
|
||||||
|
319 implication
|
||||||
|
320 evaluate
|
||||||
|
321 precisely
|
||||||
|
322 notion
|
||||||
|
323 domestic
|
||||||
|
324 restriction
|
||||||
|
325 consist
|
||||||
|
326 actual
|
||||||
|
327 formal
|
||||||
|
328 industrial
|
||||||
|
329 revolution
|
||||||
|
330 fundamental
|
||||||
|
331 essential
|
||||||
|
332 adapt
|
||||||
|
333 contact
|
||||||
|
334 colleague
|
||||||
|
335 dimension
|
||||||
|
336 account
|
||||||
|
337 statistics
|
||||||
|
338 theme
|
||||||
|
339 locate
|
||||||
|
340 adequate
|
||||||
|
341 largely
|
||||||
|
342 ideal
|
||||||
|
343 philosophy
|
||||||
|
344 minority
|
||||||
|
345 hypothesis
|
||||||
|
346 psychological
|
||||||
|
347 enable
|
||||||
|
348 trend
|
||||||
|
349 exchange
|
||||||
|
350 percentage
|
||||||
|
351 sufficient
|
||||||
|
352 substantial
|
||||||
|
353 explanation
|
||||||
|
354 emotional
|
||||||
|
355 preference
|
||||||
|
356 calculate
|
||||||
|
357 external
|
||||||
|
358 code
|
||||||
|
359 flow
|
||||||
|
360 transition
|
||||||
|
361 subsequent
|
||||||
|
362 phase
|
||||||
|
363 rural
|
||||||
|
364 intensity
|
||||||
|
365 monitor
|
||||||
|
366 competitive
|
||||||
|
367 core
|
||||||
|
368 volume
|
||||||
|
369 framework
|
||||||
|
370 incorporate
|
||||||
|
371 encounter
|
||||||
|
372 cite
|
||||||
|
373 attribute
|
||||||
|
374 emphasis
|
||||||
|
375 waste
|
||||||
|
376 climate
|
||||||
|
377 differ
|
||||||
|
378 technical
|
||||||
|
379 mechanism
|
||||||
|
380 description
|
||||||
|
381 assert
|
||||||
|
382 assistance
|
||||||
|
383 considerable
|
||||||
|
384 modify
|
||||||
|
385 isolation
|
||||||
|
386 territory
|
||||||
|
387 origin
|
||||||
|
388 respectively
|
||||||
|
389 judgement
|
||||||
|
390 cycle
|
||||||
|
391 assumption
|
||||||
|
392 german
|
||||||
|
393 illustrate
|
||||||
|
394 justify
|
||||||
|
395 manner
|
||||||
|
396 constitute
|
||||||
|
397 phenomenon
|
||||||
|
398 relevant
|
||||||
|
399 acquire
|
||||||
|
400 correspond
|
||||||
|
401 planning
|
||||||
|
402 error
|
||||||
|
403 household
|
||||||
|
404 practical
|
||||||
|
405 professional
|
||||||
|
406 theoretical
|
||||||
|
407 summary
|
||||||
|
408 depression
|
||||||
|
409 sequence
|
||||||
|
410 consideration
|
||||||
|
411 derive
|
||||||
|
412 arise
|
||||||
|
413 radical
|
||||||
|
414 collective
|
||||||
|
415 recognition
|
||||||
|
416 proportion
|
||||||
|
417 mode
|
||||||
|
418 resistance
|
||||||
|
419 furthermore
|
||||||
|
420 diversity
|
||||||
|
421 anxiety
|
||||||
|
422 logic
|
||||||
|
423 whole
|
||||||
|
424 characterize
|
||||||
|
425 cooperation
|
||||||
|
426 dominate
|
||||||
|
427 implementation
|
||||||
|
428 universal
|
||||||
|
429 significance
|
||||||
|
430 resolution
|
||||||
|
431 numerous
|
||||||
|
432 extensive
|
||||||
|
433 biological
|
||||||
|
434 display
|
||||||
|
435 publication
|
||||||
|
436 widely
|
||||||
|
437 permit
|
||||||
|
438 merely
|
||||||
|
439 joint
|
||||||
|
440 comprehensive
|
||||||
|
441 alter
|
||||||
|
442 insight
|
||||||
|
443 document
|
||||||
|
444 imply
|
||||||
|
445 absence
|
||||||
|
446 explicitly
|
||||||
|
447 conventional
|
||||||
|
448 index
|
||||||
|
449 nevertheless
|
||||||
|
450 facilitate
|
||||||
|
451 evolution
|
||||||
|
452 intellectual
|
||||||
|
453 govern
|
||||||
|
454 signal
|
||||||
|
455 passage
|
||||||
|
456 discovery
|
||||||
|
457 introduction
|
||||||
|
458 boundary
|
||||||
|
459 gain
|
||||||
|
460 yield
|
||||||
|
461 decline
|
||||||
|
462 ratio
|
||||||
|
463 strongly
|
||||||
|
464 crucial
|
||||||
|
465 settlement
|
||||||
|
466 resolve
|
||||||
|
467 distinguish
|
||||||
|
468 independence
|
||||||
|
469 formation
|
||||||
|
470 transmission
|
||||||
|
471 shape
|
||||||
|
472 racial
|
||||||
|
473 detect
|
||||||
|
474 poverty
|
||||||
|
475 intention
|
||||||
|
476 mutual
|
||||||
|
477 evolve
|
||||||
|
478 shift
|
||||||
|
479 progressive
|
||||||
|
480 flexibility
|
||||||
|
481 domain
|
||||||
|
482 profession
|
||||||
|
483 apparent
|
||||||
|
484 coordinate
|
||||||
|
485 constrain
|
||||||
|
486 assign
|
||||||
|
487 asia
|
||||||
|
488 electronic
|
||||||
|
489 exception
|
||||||
|
490 visible
|
||||||
|
491 norm
|
||||||
|
492 adjust
|
||||||
|
493 consumption
|
||||||
|
494 symbol
|
||||||
|
495 dominant
|
||||||
|
496 barrier
|
||||||
|
497 motor
|
||||||
|
498 entry
|
||||||
|
499 underlie
|
||||||
|
500 bias
|
||||||
|
501 discriminate
|
||||||
|
502 hence
|
||||||
|
503 guide
|
||||||
|
504 give
|
||||||
|
505 dialogue
|
||||||
|
506 manufacture
|
||||||
|
507 enterprise
|
||||||
|
508 scope
|
||||||
|
509 ethical
|
||||||
|
510 province
|
||||||
|
511 retain
|
||||||
|
512 capability
|
||||||
|
513 revision
|
||||||
|
514 residential
|
||||||
|
515 expansion
|
||||||
|
516 strengthen
|
||||||
|
517 simultaneously
|
||||||
|
518 possess
|
||||||
|
519 manifest
|
||||||
|
520 incentive
|
|
570
script/cards.csv
Normal file
570
script/cards.csv
Normal file
File diff suppressed because one or more lines are too long
570
script/cards_cleaned.csv
Normal file
570
script/cards_cleaned.csv
Normal file
File diff suppressed because one or more lines are too long
133
script/gethtml
Executable file
133
script/gethtml
Executable file
@ -0,0 +1,133 @@
|
|||||||
|
#!/bin/zsh
|
||||||
|
# This script is just the initial step in porting the avl data to anki
|
||||||
|
# It does not work 100% reliable, but it's good enough for me
|
||||||
|
# Manual adjustments on the exported data should be expected
|
||||||
|
# This script is rather ugly in its Implementation
|
||||||
|
[ -f cards.csv ] && rm cards.csv
|
||||||
|
touch cards.csv
|
||||||
|
|
||||||
|
handle_cleaned_html(){
|
||||||
|
## Handling of multiple meanings
|
||||||
|
meaning_clean_func="$1"
|
||||||
|
no_func="$2"
|
||||||
|
word_func="$3"
|
||||||
|
pof_func="$4"
|
||||||
|
if echo "$meaning_clean_func" | grep -q "SUP"; then
|
||||||
|
count_func="$(echo "$meaning_clean_func" | grep -c "SUP")"
|
||||||
|
echo "Found $count_func multiple meanings for the word $word_func ($pof_func)"
|
||||||
|
|
||||||
|
for j in {1..$count_func}; do
|
||||||
|
meaning="$( echo "$meaning_clean_func" | grep "<SUP> $j" | perl -pe "s|<P> <SUP> $j </SUP> <TT> (.*?) </TT> </P>|\1|" )"
|
||||||
|
echo MEANING:
|
||||||
|
echo "$meaning"
|
||||||
|
echo DONE
|
||||||
|
[ -f categoriestmp ] && rm categoriestmp
|
||||||
|
touch categoriestmp
|
||||||
|
[ -f backofcardtmp ] && rm backofcardtmp
|
||||||
|
touch backofcardtmp
|
||||||
|
printout=false
|
||||||
|
|
||||||
|
while IFS= read -r line; do
|
||||||
|
if [ $printout = true ]; then
|
||||||
|
if echo "$line" | grep -q "<P> <SUP> $(( j + 1 )) </SUP>" ; then
|
||||||
|
printout=false
|
||||||
|
else
|
||||||
|
echo "$line" >> backofcardtmp
|
||||||
|
if echo "$line" | grep -q '<P> <U>'; then
|
||||||
|
echo "$line" | perl -pe "s|<P> <U> (.*?) </U>(.*?)$|<P> <U> \1 </U> </P>|" >> categoriestmp
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
if echo "$line" | grep -q "SUP"; then
|
||||||
|
if echo "$line" | grep -q "<P> <SUP> $j </SUP>"; then
|
||||||
|
printout=true
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done <<< $(echo "$meaning_clean_func")
|
||||||
|
echo BACKSIDE:
|
||||||
|
cat backofcardtmp
|
||||||
|
echo CATEGORIES
|
||||||
|
cat categoriestmp
|
||||||
|
echo DONE
|
||||||
|
categories="$(cat categoriestmp | tr '\n' ' ')"
|
||||||
|
backside="$(cat backofcardtmp | tr '\n' ' ' )"
|
||||||
|
printf "%s.%s;\"%s\";\"%s\";\"%s\";\"%s\";\"%s\"\n" "$no_func" "$j" "$word_func" "$meaning" "$categories" "$backside" "$pof_func" >> cards.csv
|
||||||
|
done
|
||||||
|
else
|
||||||
|
echo "Found only one meaning for the word $word_func ($pof_func)"
|
||||||
|
meaning="" #ozdic only provides meaning if there are different ones and the collocations for those different meanings differ.
|
||||||
|
[ -f categoriestmp ] && rm categoriestmp
|
||||||
|
touch categoriestmp
|
||||||
|
while IFS= read -r line; do
|
||||||
|
#echo current line:
|
||||||
|
#echo "$line"
|
||||||
|
echo "$line" | grep "<P> <U> " | perl -pe "s|<P> <U> (.*?) </U>(.*?)$|<P> <U> \1 </U> </P>|" >> categoriestmp
|
||||||
|
done <<< $(echo "$meaning_clean")
|
||||||
|
backside="$( echo "$meaning_clean_func" | grep "<P> <U> " | grep -vF '<DIV class="item"><P class="word"><B>'| tr '\n' ' ')"
|
||||||
|
#cat categoriestmp
|
||||||
|
categories="$(cat categoriestmp | tr '\n' ' ' )"
|
||||||
|
printf "%s;\"%s\";\"%s\";\"%s\";\"%s\";\"%s\"\n" "$no_func" "$word_func" "$meaning" "$categories" "$backside" "$pof_func" >> cards.csv
|
||||||
|
|
||||||
|
fi
|
||||||
|
#printf "%s;\"%s\";\"%s\"\n" "$no" "$word" "$meaning_clean" >> cards.csv
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
cat avl.csv | while read line || [[ -n $line ]];
|
||||||
|
do
|
||||||
|
no="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $1}' )"
|
||||||
|
word="$(echo "$line" | awk 'BEGIN{FS = "\t" } {print $2}' )"
|
||||||
|
printf "card:%s\t(%s)\n" "$no" "$word"
|
||||||
|
meaning_clean="$(curl --no-progress-meter http://www.ozdic.com/collocation-dictionary/"$word" | sed '6,35d; 38,48d' | tac | sed '6,30d' | tac | tr '\t' ' ' | tr -d '\r')"
|
||||||
|
#echo MEANINGCLEAN1:
|
||||||
|
#echo "$meaning_clean"
|
||||||
|
#echo DONE
|
||||||
|
echo "Checking whether there are multiple parts of speech..."
|
||||||
|
pof_count="$(echo "$meaning_clean" | grep -c "<P class=\"word\">" )"
|
||||||
|
if [ $pof_count -gt 1 ]; then
|
||||||
|
echo "$pof_count parts of speech found!"
|
||||||
|
# seperate into multiple "meaning_clean"
|
||||||
|
pofs="$( echo "$meaning_clean" | grep "<DIV class=\"item\"><P class=\"word\"><B>" | perl -pe "s|^.*?<DIV class=\"item\"><P class=\"word\"><B>[a-zA-Z]*? </B><I>([a-zA-Z\.]*?) </I> </P>|\1|g")"
|
||||||
|
#echo "pofs:"
|
||||||
|
#echo "$pofs"
|
||||||
|
pofs="$(printf "%s\nscript" "$pofs" )"
|
||||||
|
for i in {1..$pof_count}; do
|
||||||
|
current_pof=$( echo "$pofs" | sed "${i}q;d") #| sed 's/\./\\./g')
|
||||||
|
next_pof=$(echo "$pofs" | sed "$((i+1))q;d") #| sed 's/\./\\./g')
|
||||||
|
echo current_pof: $current_pof
|
||||||
|
echo next_pof: $next_pof
|
||||||
|
#start="<DIV class=\"item\"><P class=\"word\"><B>$word <\/B><I>$current_pof <\/I> <\/P>"
|
||||||
|
start="$( printf '<DIV class="item"><P class="word"><B>%s </B><I>%s </I> </P>\n' "$word" "$current_pof" )"
|
||||||
|
if [ $i -eq $pof_count ]; then
|
||||||
|
stop="$next_pof"
|
||||||
|
#echo MEANINGCLEAN_LASTPOF:
|
||||||
|
#echo "$meaning_clean"
|
||||||
|
#echo DONE
|
||||||
|
else
|
||||||
|
stop="$( printf '<DIV class="item"><P class="word"><B>%s </B><I>%s </I> </P>\n' "$word" "$next_pof" )"
|
||||||
|
fi
|
||||||
|
meaning_clean_temp="$( echo "$meaning_clean" | sed 's,'"$start"',START,')"
|
||||||
|
meaning_clean_temp="$( echo "$meaning_clean_temp" | sed 's,'"$stop"',STOP,' )"
|
||||||
|
echo MEANINGCLEAN_TEMP:
|
||||||
|
echo "$meaning_clean_temp"
|
||||||
|
echo DONE
|
||||||
|
pof_meaning_clean="$(echo "$meaning_clean_temp" | sed -n '/START/,/STOP/ { /START/n; /STOP/!p }' )"
|
||||||
|
echo POFMEANINGCLEAN
|
||||||
|
echo "$pof_meaning_clean"
|
||||||
|
echo DONE
|
||||||
|
|
||||||
|
notemp="$no"'.'"$i"
|
||||||
|
handle_cleaned_html "$pof_meaning_clean" "$notemp" "$word" "$current_pof"
|
||||||
|
done
|
||||||
|
|
||||||
|
else
|
||||||
|
echo "only one part of speech found"
|
||||||
|
pof="$( echo "$meaning_clean" | grep "<DIV class=\"item\"><P class=\"word\"><B>" | perl -pe "s|^.*?<DIV class=\"item\"><P class=\"word\"><B>[a-zA-Z]*? </B><I>([a-zA-Z\.]*?) </I> </P>|\1|g")"
|
||||||
|
echo POF:"$pof"
|
||||||
|
handle_cleaned_html "$meaning_clean" "$no" "$word" "$pof"
|
||||||
|
fi
|
||||||
|
|
||||||
|
done
|
||||||
|
|
||||||
|
rm backofcardtmp categoriestmp
|
BIN
total_back.png
BIN
total_back.png
Binary file not shown.
Before Width: | Height: | Size: 426 KiB |
BIN
total_front.png
BIN
total_front.png
Binary file not shown.
Before Width: | Height: | Size: 58 KiB |
Loading…
Reference in New Issue
Block a user