Please create a colorful handbook pdf for the below mentioned lust of vocabulary words and phrases.Please write pronunciation correct way in front of every vocabulary words and write their meaning in short in English and under that in Russian language.also write 3 sentences from our daily life using the vocabulary words in English and under that Russian translation mentioned. Petulant Perfidious Intriguing Fastidious Meticulous Micturate Too frivolous Quagmire Abstruse Illusion Delusion Douchebag Acrimonious Touch wood/knock the wood Eyeing Evil eye Casting of evil eye Apple of my eye See eye to eye Pernickety Alacrity Quintessential Plausible Pernicious
~/
Cambridge Dictionary Petulant Perfidious Intriguing Fastidious Meticulous Micturate Frivolous Quagmire Abstruse Illusion Delusion Acrimonious Pernickety Alacrity Quintessential Plausible Pernicious pronunciation definitions
~/
mkdir -p "/tmp/workspace/vocabulary-handbook/src" "/tmp/workspace/vocabulary-handbook/output" && fc-match "DejaVu Sans"
fc-match -f '%{file}\n' 'Noto Sans'
~/vocabulary-handbook/src/create_handbook.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.colors import HexColor
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfgen import canvas
from reportlab.lib.utils import simpleSplit
from reportlab.pdfbase.pdfmetrics import stringWidth
from pathlib import Path
OUT = Path('/tmp/workspace/vocabulary-handbook/output/Vocabulary_Handbook_English_Russian.pdf')
FONT = '/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf'
pdfmetrics.registerFont(TTFont('Noto', FONT))
pdfmetrics.registerFont(TTFont('NotoBold', FONT))
# Russian translations have been written in natural, learner-friendly wording.
entries = [
('Petulant', '/ˈpetʃ.ə.lənt/', 'adjective', 'Childishly sulky or easily annoyed.', 'Раздражительный, капризный; обиженный по-детски.', [
('The petulant child crossed his arms when it was time to leave the park.', 'Капризный ребёнок скрестил руки, когда пришло время уходить из парка.'),
('She gave a petulant reply because her coffee was cold.', 'Она ответила капризно, потому что её кофе был холодным.'),
('Try not to sound petulant when you ask for help.', 'Старайся не звучать капризно, когда просишь о помощи.')]),
('Perfidious', '/pərˈfɪd.i.əs/', 'adjective', 'Deceitful and untrustworthy; betraying loyalty.', 'Вероломный, предательский, коварный.', [
('It was perfidious of him to share our private message with everyone.', 'Было вероломно с его стороны показать всем наше личное сообщение.'),
('The perfidious colleague took credit for work he did not do.', 'Коварный коллега присвоил себе заслуги за работу, которую не выполнял.'),
('A perfidious friend breaks trust instead of keeping a promise.', 'Вероломный друг нарушает доверие вместо того, чтобы держать обещание.')]),
('Intriguing', '/ɪnˈtriː.ɡɪŋ/', 'adjective', 'Very interesting because it is unusual or mysterious.', 'Интригующий, вызывающий интерес.', [
('The new café has an intriguing menu with unusual desserts.', 'В новом кафе интригующее меню с необычными десертами.'),
('Her intriguing story made us ask many questions.', 'Её интригующая история заставила нас задать много вопросов.'),
('I found an intriguing note inside the old book.', 'Я нашёл интригующую записку внутри старой книги.')]),
('Fastidious', '/fæˈstɪd.i.əs/', 'adjective', 'Very careful about small details and standards.', 'Придирчивый к деталям; очень аккуратный.', [
('My fastidious roommate labels every container in the fridge.', 'Мой внимательный к деталям сосед по квартире подписывает каждый контейнер в холодильнике.'),
('She is fastidious about keeping her desk clean.', 'Она очень тщательно следит за чистотой своего стола.'),
('A fastidious customer checked every item on the receipt.', 'Придирчивый покупатель проверил каждый пункт в чеке.')]),
('Meticulous', '/məˈtɪk.jə.ləs/', 'adjective', 'Extremely careful and precise.', 'Скрупулёзный, очень тщательный.', [
('He made a meticulous list before going grocery shopping.', 'Перед походом за продуктами он составил скрупулёзный список.'),
('She is meticulous when packing for a trip.', 'Она очень тщательно собирается в поездку.'),
('The mechanic gave the bicycle a meticulous inspection.', 'Механик очень тщательно осмотрел велосипед.')]),
('Micturate', '/ˈmɪk.tʃə.reɪt/', 'verb, formal/medical', 'To urinate; to pass urine.', 'Мочиться, испускать мочу. Формальное медицинское слово.', [
('The nurse asked whether the patient had been able to micturate after the procedure.', 'Медсестра спросила, смог ли пациент помочиться после процедуры.'),
('The doctor recorded how often the patient needed to micturate.', 'Врач записал, как часто пациенту требовалось мочиться.'),
('In everyday speech, people usually say “urinate” or “go to the bathroom,” not “micturate.”', 'В повседневной речи обычно говорят “urinate” или “go to the bathroom”, а не “micturate”.')]),
('Too frivolous', '/tuː ˈfrɪv.əl.əs/', 'phrase', 'Not serious or sensible enough for the situation.', 'Слишком легкомысленный, несерьёзный.', [
('Buying another expensive bag feels too frivolous this month.', 'Покупка ещё одной дорогой сумки в этом месяце кажется слишком легкомысленной.'),
('His jokes were too frivolous during the serious meeting.', 'Его шутки были слишком несерьёзными во время важной встречи.'),
('We chose not to make a too frivolous comment after the bad news.', 'Мы решили не делать слишком легкомысленный комментарий после плохих новостей.')]),
('Quagmire', '/ˈkwæɡ.maɪər/', 'noun', 'A difficult, confusing situation that is hard to escape.', 'Трясина; запутанная ситуация, из которой трудно выбраться.', [
('Choosing a phone plan became a quagmire of hidden fees.', 'Выбор тарифного плана превратился в трясину скрытых платежей.'),
('The family got into a quagmire while trying to plan the wedding.', 'Семья попала в запутанную ситуацию, пытаясь спланировать свадьбу.'),
('Ignoring the leaking tap created a quagmire of repairs later.', 'Игнорирование протекающего крана позже привело к множеству сложных ремонтов.')]),
('Abstruse', '/æbˈstruːs/', 'adjective', 'Difficult to understand because it is complicated.', 'Сложный для понимания, заумный.', [
('The instructions for the new router were abstruse.', 'Инструкция к новому роутеру была сложной для понимания.'),
('His explanation of taxes sounded abstruse to me.', 'Его объяснение налогов показалось мне заумным.'),
('Please use simple words instead of abstruse language.', 'Пожалуйста, используй простые слова вместо заумного языка.')]),
('Illusion', '/ɪˈluː.ʒən/', 'noun', 'A false appearance or misleading impression.', 'Иллюзия, обманчивое впечатление.', [
('The mirror created the illusion that the room was bigger.', 'Зеркало создало иллюзию, что комната больше.'),
('The online photo gave the illusion of a perfect holiday.', 'Фотография в интернете создала иллюзию идеального отпуска.'),
('Good lighting can create the illusion of smoother skin.', 'Хорошее освещение может создать иллюзию более гладкой кожи.')]),
('Delusion', '/dɪˈluː.ʒən/', 'noun', 'A false belief that someone continues to hold despite evidence.', 'Заблуждение, ложное убеждение.', [
('It is a delusion to think that a password never needs changing.', 'Думать, что пароль никогда не нужно менять, - заблуждение.'),
('He was under the delusion that the shop was open on Sunday.', 'Он ошибочно считал, что магазин открыт в воскресенье.'),
('The idea that sleep is optional is a harmful delusion.', 'Мысль о том, что сон не обязателен, - вредное заблуждение.')]),
('Douchebag', '/ˈduːʃ.bæɡ/', 'noun, informal/offensive', 'A rude, selfish, or unpleasant man. Avoid in polite settings.', 'Грубый и неприятный человек. Грубое разговорное слово.', [
('Calling your neighbor a douchebag will only make the argument worse.', 'Если назвать соседа грубым словом, ссора только станет хуже.'),
('He acted like a douchebag by cutting in front of everyone in line.', 'Он повёл себя как грубый эгоист, пролезая без очереди.'),
('Use a calmer word when you are angry instead of “douchebag.”', 'Когда ты злишься, лучше используй более спокойное слово вместо “douchebag”.')]),
('Acrimonious', '/ˌæk.rɪˈməʊ.ni.əs/', 'adjective', 'Full of anger, bitterness, and harsh words.', 'Ожесточённый, язвительный, полный горечи.', [
('Their acrimonious argument about chores ruined dinner.', 'Их ожесточённый спор о домашних делах испортил ужин.'),
('The meeting became acrimonious when people started blaming one another.', 'Встреча стала язвительной, когда люди начали обвинять друг друга.'),
('Try to end an acrimonious text conversation and speak calmly later.', 'Постарайся прекратить ожесточённую переписку и спокойно поговорить позже.')]),
('Touch wood / knock on wood', '/tʌtʃ wʊd/; /nɒk ɒn wʊd/', 'idiom', 'Said to hope that good luck will continue and a bad thing will not happen.', 'Постучать по дереву; говорят, чтобы не сглазить.', [
('Touch wood, my laptop has not crashed this week.', 'Постучу по дереву, мой ноутбук на этой неделе не зависал.'),
('“We have never missed a flight, knock on wood,” Dad said.', '«Мы никогда не опаздывали на рейс, постучим по дереву», - сказал папа.'),
('Touch wood, the children have stayed healthy all winter.', 'Постучим по дереву, дети оставались здоровыми всю зиму.')]),
('Eyeing', '/ˈaɪ.ɪŋ/', 'verb form', 'Looking at someone or something with interest, desire, or suspicion.', 'Поглядывающий, присматривающийся; разглядывающий.', [
('I saw you eyeing the last slice of pizza.', 'Я видел, как ты поглядывал на последний кусок пиццы.'),
('She was eyeing the empty seat by the window.', 'Она присматривалась к свободному месту у окна.'),
('The cat kept eyeing my sandwich from the table.', 'Кот всё время поглядывал на мой бутерброд со стола.')]),
('Evil eye', '/ˌiː.vəl ˈaɪ/', 'noun', 'A look believed in some cultures to bring bad luck or harm.', 'Сглаз; взгляд, которому приписывают способность приносить несчастье.', [
('My grandmother wears a small charm to protect against the evil eye.', 'Моя бабушка носит маленький талисман для защиты от сглаза.'),
('In some cultures, people worry that praise may attract the evil eye.', 'В некоторых культурах люди боятся, что похвала может привлечь сглаз.'),
('The blue bead is often used as a symbol against the evil eye.', 'Синяя бусина часто используется как символ защиты от сглаза.')]),
('Casting the evil eye', '/ˌkɑː.stɪŋ ðiː ˌiː.vəl ˈaɪ/', 'phrase', 'Giving a look thought to bring bad luck or harm.', 'Сглазить; бросать взгляд, который, как считают, приносит несчастье.', [
('She joked that her sister was casting the evil eye at her new shoes.', 'Она пошутила, что её сестра сглазила её новые туфли.'),
('In the story, the jealous neighbor was accused of casting the evil eye.', 'В этой истории ревнивую соседку обвинили в том, что она сглазила.'),
('He was not really casting the evil eye; he was simply tired.', 'Он вовсе не пытался сглазить, он просто устал.')]),
('Apple of my eye', '/ˌæp.əl əv maɪ ˈaɪ/', 'idiom', 'A person who is loved more than anyone else.', 'Зеница ока; самый любимый человек.', [
('My youngest niece is the apple of my eye.', 'Моя младшая племянница - зеница моего ока.'),
('That old guitar is the apple of his eye.', 'Та старая гитара - его самая любимая вещь.'),
('For many grandparents, a grandchild is the apple of their eye.', 'Для многих бабушек и дедушек внук или внучка - зеница ока.')]),
('See eye to eye', '/siː ˌaɪ tə ˈaɪ/', 'idiom', 'To agree fully about something.', 'Полностью соглашаться, сходиться во взглядах.', [
('My sister and I do not always see eye to eye about money.', 'Мы с сестрой не всегда сходимся во взглядах на деньги.'),
('The team finally saw eye to eye on the holiday schedule.', 'Команда наконец пришла к общему мнению о графике отпусков.'),
('We can disagree and still be friends if we do not see eye to eye.', 'Мы можем не соглашаться друг с другом и всё же оставаться друзьями.')]),
('Pernickety', '/pəˈnɪk.ə.ti/', 'adjective', 'Too concerned with small details; fussy.', 'Привередливый, придирчивый к мелочам.', [
('My pernickety uncle checks the restaurant reviews before every meal out.', 'Мой привередливый дядя проверяет отзывы о ресторане перед каждым походом туда.'),
('She is pernickety about how the towels are folded.', 'Она придирчива к тому, как сложены полотенца.'),
('Do not be so pernickety about one tiny spelling mistake.', 'Не будь таким придирчивым из-за одной маленькой ошибки в написании.')]),
('Alacrity', '/əˈlæk.rə.ti/', 'noun', 'Cheerful willingness and quickness to act.', 'Готовность и живость, с которой что-то делают.', [
('He accepted the invitation with alacrity.', 'Он с готовностью принял приглашение.'),
('The children cleaned up with surprising alacrity when dessert was mentioned.', 'Дети убрались с удивительной готовностью, когда упомянули десерт.'),
('She replied with alacrity because she was eager to help.', 'Она быстро и охотно ответила, потому что хотела помочь.')]),
('Quintessential', '/ˌkwɪn.tɪˈsen.ʃəl/', 'adjective', 'The most typical or perfect example of something.', 'Типичный, самый характерный; воплощающий суть.', [
('A cup of tea is a quintessential part of his morning routine.', 'Чашка чая - типичная часть его утреннего распорядка.'),
('This little bakery is the quintessential neighborhood shop.', 'Эта маленькая пекарня - типичный магазинчик по соседству.'),
('Her black dress is a quintessential wardrobe basic.', 'Её чёрное платье - типичная базовая вещь гардероба.')]),
('Plausible', '/ˈplɔː.zə.bəl/', 'adjective', 'Seeming reasonable or likely to be true.', 'Правдоподобный, разумный на вид.', [
('Traffic is a plausible reason for being ten minutes late.', 'Пробки - правдоподобная причина опоздать на десять минут.'),
('His explanation sounded plausible, so we checked the details.', 'Его объяснение звучало правдоподобно, поэтому мы проверили детали.'),
('It is plausible that the package will arrive tomorrow.', 'Вполне вероятно, что посылка придёт завтра.')]),
('Pernicious', '/pəˈnɪʃ.əs/', 'adjective', 'Having a harmful effect, often gradually.', 'Пагубный, вредный, часто с постепенным эффектом.', [
('Skipping sleep can have a pernicious effect on your mood.', 'Недостаток сна может пагубно влиять на настроение.'),
('A pernicious rumor can damage a friendship over time.', 'Пагубный слух может со временем разрушить дружбу.'),
('The pernicious habit of checking notifications interrupts concentration.', 'Пагубная привычка постоянно проверять уведомления мешает сосредоточиться.')]),
]
W,H=A4
M=38
palette=[HexColor('#7C3AED'),HexColor('#0EA5E9'),HexColor('#10B981'),HexColor('#F59E0B'),HexColor('#EF4444'),HexColor('#EC4899'),HexColor('#14B8A6'),HexColor('#6366F1')]
text=HexColor('#18213A'); muted=HexColor('#4B5563'); paper=HexColor('#FBFCFF')
def draw_wrapped(c, s, x, y, maxw, font, size, leading, colour=text):
c.setFont(font,size); c.setFillColor(colour)
lines=simpleSplit(s,font,size,maxw)
for line in lines:
c.drawString(x,y,line); y-=leading
return y
def footer(c,num):
c.setStrokeColor(HexColor('#D8E2F0')); c.line(M,26,W-M,26)
c.setFillColor(muted); c.setFont('Noto',7.5)
c.drawString(M,14,'Everyday English Vocabulary | English-Russian')
c.drawRightString(W-M,14,str(num))
def entry(c,e,idx,page):
word,pron,kind,meaning,ru,examples=e
accent=palette[idx%len(palette)]
c.setFillColor(paper); c.rect(0,0,W,H,fill=1,stroke=0)
c.setFillColor(accent); c.rect(0,H-20,W,20,fill=1,stroke=0)
# geometric decoration
c.setFillColor(colors.Color(accent.red,accent.green,accent.blue,alpha=.10)); c.circle(W-52,H-70,45,fill=1,stroke=0); c.circle(40,100,55,fill=1,stroke=0)
y=H-56
c.setFillColor(accent); c.roundRect(M,y-36,W-2*M,36,9,fill=1,stroke=0)
c.setFillColor(colors.white); c.setFont('NotoBold',19)
c.drawString(M+13,y-24,word)
c.setFont('Noto',8.5); c.drawRightString(W-M-13,y-22,kind.upper())
y-=57
c.setFillColor(HexColor('#EEF2FF')); c.roundRect(M,y-31,W-2*M,31,7,fill=1,stroke=0)
c.setFillColor(HexColor('#3730A3')); c.setFont('NotoBold',9); c.drawString(M+11,y-19,'PRONUNCIATION')
c.setFont('Noto',11); c.drawString(M+112,y-19,pron)
y-=51
c.setFillColor(accent); c.setFont('NotoBold',10); c.drawString(M,y,'MEANING')
y-=17; y=draw_wrapped(c,meaning,M,y,W-2*M,'Noto',10.2,14,text)
y-=5; c.setFillColor(HexColor('#F0FDF4')); c.roundRect(M,y-5,W-2*M,0,1,fill=1,stroke=0)
y-=15; c.setFillColor(HexColor('#047857')); c.setFont('NotoBold',9); c.drawString(M,y,'ПО-РУССКИ')
y-=17; y=draw_wrapped(c,ru,M,y,W-2*M,'Noto',10.2,14,HexColor('#14532D'))
y-=14
c.setFillColor(accent); c.roundRect(M,y-17,W-2*M,22,7,fill=1,stroke=0)
c.setFillColor(colors.white); c.setFont('NotoBold',10); c.drawString(M+10,y-3,'DAILY-LIFE EXAMPLES / ПРИМЕРЫ ИЗ ЖИЗНИ')
y-=33
for n,(en,russian) in enumerate(examples,1):
c.setFillColor(accent); c.circle(M+6,y+1,6,fill=1,stroke=0)
c.setFillColor(colors.white); c.setFont('NotoBold',7); c.drawCentredString(M+6,y-1.7,str(n))
y=draw_wrapped(c,en,M+20,y+2,W-2*M-20,'Noto',9.2,12,text)
y-=1; y=draw_wrapped(c,russian,M+20,y,W-2*M-20,'Noto',9.1,12,muted)
y-=11
footer(c,page)
def main():
c=canvas.Canvas(str(OUT),pagesize=A4,pageCompression=1)
c.setTitle('Everyday English Vocabulary - English-Russian Handbook')
c.setAuthor('Orris')
c.setFillColor(HexColor('#F7F5FF')); c.rect(0,0,W,H,fill=1,stroke=0)
for i,col in enumerate(palette):
c.setFillColor(colors.Color(col.red,col.green,col.blue,alpha=.86)); c.circle(35+i*27,H-40-(i%2)*17,22,fill=1,stroke=0)
c.setFillColor(HexColor('#1E1B4B')); c.setFont('NotoBold',30); c.drawString(M,H-155,'Everyday English')
c.setFillColor(HexColor('#7C3AED')); c.setFont('NotoBold',28); c.drawString(M,H-193,'Vocabulary Handbook')
c.setFillColor(muted); c.setFont('Noto',14); c.drawString(M,H-224,'English pronunciation, concise meanings, and Russian translations')
c.setFillColor(colors.white); c.roundRect(M,H-412,W-2*M,116,16,fill=1,stroke=0)
c.setFillColor(HexColor('#312E81')); c.setFont('NotoBold',13); c.drawString(M+20,H-328,'24 useful words, phrases, and idioms')
c.setFillColor(muted); c.setFont('Noto',10.5)
c.drawString(M+20,H-354,'Each entry includes: pronunciation • meaning in English • Russian meaning')
c.drawString(M+20,H-376,'three natural English examples • Russian translation for every example')
c.setFillColor(HexColor('#FEF3C7')); c.roundRect(M,H-485,W-2*M,42,11,fill=1,stroke=0)
c.setFillColor(HexColor('#92400E')); c.setFont('Noto',9.3)
c.drawString(M+15,H-461,'Usage note: “douchebag” is an offensive informal word. “Micturate” is formal/medical.')
c.setFillColor(HexColor('#EDE9FE')); c.roundRect(M,95,W-2*M,66,14,fill=1,stroke=0)
c.setFillColor(HexColor('#5B21B6')); c.setFont('NotoBold',11); c.drawString(M+16,132,'Study tip')
c.setFillColor(text); c.setFont('Noto',9.5); c.drawString(M+16,112,'Read each English sentence aloud, then cover the Russian translation and try to recall it.')
footer(c,1); c.showPage()
for i,e in enumerate(entries):
entry(c,e,i,i+2); c.showPage()
c.save()
print(OUT)
if __name__=='__main__': main()
python "/tmp/workspace/vocabulary-handbook/src/create_handbook.py" && ls -lh "/tmp/workspace/vocabulary-handbook/output/Vocabulary_Handbook_English_Russian.pdf"
python -c "from pypdf import PdfReader; p='/tmp/workspace/vocabulary-handbook/output/Vocabulary_Handbook_English_Russian.pdf'; r=PdfReader(p); print('pages',len(r.pages)); t='\\n'.join(x.extract_text() or '' for x in r.pages); print('chars',len(t)); print('missing', [w for w in ['Petulant','Perfidious','Micturate','Douchebag','Pernicious','ПО-РУССКИ'] if w not in t])"
Vocabulary Handbook English Russian
PDF Document · PDF
Please create following changes In the colorful handbook pdf prepared above, firstly write pronunciation in respelling way easier to understand, secondly title page should have only this text and that's all " Everyday English vocabulary"
~/
python -c "from pathlib import Path; import re; p=Path('/tmp/workspace/vocabulary-handbook/src/create_handbook.py'); s=p.read_text(); reps={'/ˈpetʃ.ə.lənt/':'PET-yuh-luhnt','/pərˈfɪd.i.əs/':'per-FID-ee-us','/ɪnˈtriː.ɡɪŋ/':'in-TREE-ging','/fæˈstɪd.i.əs/':'fa-STID-ee-us','/məˈtɪk.jə.ləs/':'muh-TIK-yuh-lus','/ˈmɪk.tʃə.reɪt/':'MIK-chuh-rayt','/tuː ˈfrɪv.əl.əs/':'too FRIV-uh-lus','/ˈkwæɡ.maɪər/':'KWAG-myre','/æbˈstruːs/':'ab-STROOSS','/ɪˈluː.ʒən/':'ih-LOO-zhun','/dɪˈluː.ʒən/':'dih-LOO-zhun','/ˈduːʃ.bæɡ/':'DOOSH-bag','/ˌæk.rɪˈməʊ.ni.əs/':'ak-rih-MOH-nee-us','/tʌtʃ wʊd/; /nɒk ɒn wʊd/':'tuch wood; nok on wood','/ˈaɪ.ɪŋ/':'EYE-ing','/ˌiː.vəl ˈaɪ/':'EE-vul EYE','/ˌkɑː.stɪŋ ðiː ˌiː.vəl ˈaɪ/':'KAS-ting thee EE-vul EYE','/ˌæp.əl əv maɪ ˈaɪ/':'AP-ul uv my EYE','/siː ˌaɪ tə ˈaɪ/':'see EYE tuh EYE','/pəˈnɪk.ə.ti/':'per-NIK-uh-tee','/əˈlæk.rə.ti/':'uh-LAK-rih-tee','/ˌkwɪn.tɪˈsen.ʃəl/':'kwin-tuh-SEN-shul','/ˈplɔː.zə.bəl/':'PLAW-zuh-bul','/pəˈnɪʃ.əs/':'per-NISH-us'}; for a,b in reps.items(): s=s.replace(a,b); old=re.search(r\" c\.setFillColor\(HexColor\('#F7F5FF'\)\).*? footer\(c,1\); c\.showPage\(\)\",s,flags=re.S).group(0); new=\"\"\" c.setFillColor(HexColor('#F7F5FF')); c.rect(0,0,W,H,fill=1,stroke=0)\n for i,col in enumerate(palette):\n c.setFillColor(colors.Color(col.red,col.green,col.blue,alpha=.82)); c.circle(35+i*27,H-40-(i%2)*17,22,fill=1,stroke=0)\n c.setFillColor(HexColor('#1E1B4B')); c.setFont('NotoBold',30)\n title = 'Everyday English vocabulary'\n c.drawCentredString(W/2, H/2, title)\n c.showPage()\"\"\"; s=s.replace(old,new); p.write_text(s)" && python "/tmp/workspace/vocabulary-handbook/src/create_handbook.py" && ls -lh "/tmp/workspace/vocabulary-handbook/output/Vocabulary_Handbook_English_Russian.pdf"
python -c "from pypdf import PdfReader; p='/tmp/workspace/vocabulary-handbook/output/Vocabulary_Handbook_English_Russian.pdf'; r=PdfReader(p); cover=r.pages[0].extract_text().strip(); body='\\n'.join(pg.extract_text() or '' for pg in r.pages[1:]); print('pages=',len(r.pages)); print('cover=',repr(cover)); print('ipa_present=', '/' in body); print('respelling_checks=',[x in body for x in ['PET-yuh-luhnt','per-FID-ee-us','MIK-chuh-rayt','tuch wood; nok on wood','per-NISH-us']])"
Vocabulary Handbook English Russian
PDF Document · PDF
Please create a colorful handbook pdf for the below mentioned list of vocabulary words and phrases and also add vocabulary words from photo attached.Please write pronunciation correct way in front of every vocabulary words ( respelling format)and write their meaning in short in English and under that in Russian language.also write 3 sentences from our daily life using the vocabulary words in English and under that Russian translation mention. Ramblers Car boot sales National anthem The NHS medical system Regional autonomy Mixed bag Northumberland Getting into Bug Cultural heritage Belching Posh restaurant
Cambridge Dictionary vocabulary definitions pronunciation ramblers car boot sale NHS regional autonomy mixed bag getting into bug cultural heritage belching posh restaurant
~/
~/vocabulary-handbook/src/create_new_handbook.py
from reportlab.lib.pagesizes import A4
from reportlab.lib import colors
from reportlab.lib.colors import HexColor
from reportlab.pdfbase import pdfmetrics
from reportlab.pdfbase.ttfonts import TTFont
from reportlab.pdfgen import canvas
from reportlab.lib.utils import simpleSplit
from reportlab.pdfbase.pdfmetrics import stringWidth
from pathlib import Path
OUT = Path('/tmp/workspace/vocabulary-handbook/output/Everyday_English_Vocabulary_Book_2.pdf')
FONT = '/usr/share/fonts/google-noto-vf/NotoSans[wght].ttf'
pdfmetrics.registerFont(TTFont('Noto', FONT))
pdfmetrics.registerFont(TTFont('NotoBold', FONT))
E = [
('Ramblers','RAM-blurz','people who enjoy taking long walks in the countryside','Любители пеших прогулок по сельской местности',[
('The ramblers set off early to avoid the rain.','Любители пеших прогулок отправились рано, чтобы избежать дождя.'),('We met a group of ramblers near the village café.','Мы встретили группу туристов-пешеходов возле деревенского кафе.'),('My parents became ramblers after they moved closer to the hills.','Мои родители стали любителями пеших прогулок после переезда ближе к холмам.')]),
('Car boot sale','kar BOOT sayl','an outdoor sale where people sell used things from their cars','Распродажа подержанных вещей из багажников автомобилей',[
('We found a cheap lamp at the car boot sale on Sunday.','В воскресенье мы нашли дешёвую лампу на распродаже из багажников.'),('She is taking old toys to the car boot sale.','Она везёт старые игрушки на распродажу из багажников.'),('Let us visit the car boot sale before breakfast.','Давай сходим на распродажу из багажников до завтрака.')]),
('National anthem','NASH-uh-nul AN-thum','a country’s official patriotic song','Официальная патриотическая песня страны, государственный гимн',[
('Everyone stood when the national anthem began.','Все встали, когда начался государственный гимн.'),('The children learned the national anthem at school.','Дети выучили государственный гимн в школе.'),('We heard the national anthem before the match.','Мы услышали государственный гимн перед матчем.')]),
('The NHS medical system','the en-aych-ESS MED-i-kul SIS-tum','the publicly funded health service in the United Kingdom','Государственная система здравоохранения Великобритании',[
('My neighbour booked a doctor’s appointment through the NHS.','Мой сосед записался к врачу через систему NHS.'),('The NHS medical system provides many services free at the point of use.','Система NHS предоставляет многие услуги бесплатно в момент обращения.'),('She called NHS 111 for medical advice.','Она позвонила в NHS 111 за медицинским советом.')]),
('Regional autonomy','REE-juh-nul aw-TON-uh-mee','the right of a region to govern some of its own affairs','Право региона самостоятельно решать часть своих вопросов',[
('The news discussed regional autonomy in the north of the country.','В новостях обсуждали региональную автономию на севере страны.'),('Regional autonomy can let local leaders make local decisions.','Региональная автономия может позволить местным лидерам принимать местные решения.'),('We learned about regional autonomy in our politics class.','Мы изучали региональную автономию на уроке политики.')]),
('Mixed bag','mikst BAG','a group or result containing both good and bad things','Смешанный набор, в котором есть и хорошее, и плохое',[
('The new film was a mixed bag, but I liked the music.','Новый фильм оказался смешанным набором, но мне понравилась музыка.'),('My day was a mixed bag: a good meeting and a delayed bus.','Мой день был неоднозначным: хорошая встреча и опоздавший автобус.'),('The restaurant reviews are a mixed bag.','Отзывы о ресторане очень разные.')]),
('Northumberland','nor-THUM-ber-lund','a historic county in north-east England','Нортумберленд, историческое графство на северо-востоке Англии',[
('We spent our holiday walking along the coast in Northumberland.','Мы провели отпуск, гуляя по побережью Нортумберленда.'),('Northumberland has beautiful castles and wide beaches.','В Нортумберленде есть красивые замки и широкие пляжи.'),('My friend took photos of the stars in Northumberland.','Мой друг фотографировал звёзды в Нортумберленде.')]),
('Getting into','GET-ing IN-too','becoming interested in or starting to enjoy something','Начинать интересоваться чем-то или увлекаться чем-то',[
('I am getting into cooking simple dinners at home.','Я начинаю увлекаться приготовлением простых ужинов дома.'),('She is getting into podcasts on her bus ride.','Она начинает увлекаться подкастами во время поездки на автобусе.'),('Are you getting into yoga this year?','Ты начинаешь заниматься йогой в этом году?')]),
('Bug','BUG','a small insect; informally, a minor illness or a computer problem','Жук или маленькое насекомое; также лёгкая болезнь или компьютерная ошибка',[
('There is a bug on the kitchen window.','На кухонном окне сидит жук.'),('I stayed home because I caught a stomach bug.','Я остался дома, потому что подхватил кишечную инфекцию.'),('The app has a bug, so it will not open.','В приложении есть ошибка, поэтому оно не открывается.')]),
('Cultural heritage','KUL-chuh-rul HAIR-i-tij','traditions, places, and objects passed down from earlier generations','Традиции, места и предметы, унаследованные от прошлых поколений',[
('The museum protects the city’s cultural heritage.','Музей защищает культурное наследие города.'),('Grandma’s recipes are part of our cultural heritage.','Рецепты бабушки являются частью нашего культурного наследия.'),('We visited a festival to learn about local cultural heritage.','Мы посетили фестиваль, чтобы узнать о местном культурном наследии.')]),
('Belching','BEL-ching','making a loud sound by releasing gas from the stomach','Отрыжка, выпуск газа из желудка через рот',[
('Belching after a fizzy drink can be uncomfortable.','Отрыжка после газированного напитка может быть неприятной.'),('He apologised for belching at the table.','Он извинился за отрыжку за столом.'),('Eating slowly may reduce belching after dinner.','Медленное питание может уменьшить отрыжку после ужина.')]),
('Posh restaurant','posh RES-tuh-ront','an expensive, stylish restaurant','Дорогой, модный ресторан',[
('We booked a posh restaurant for our anniversary.','Мы забронировали дорогой ресторан на годовщину.'),('You may need to dress smartly for that posh restaurant.','В этот модный ресторан, возможно, нужно одеться нарядно.'),('The posh restaurant had candles on every table.','В дорогом ресторане на каждом столике стояли свечи.')]),
('No big thing','noh big THING','not important or not difficult','Ничего важного; несложное дело',[
('Do not worry about the late reply, it is no big thing.','Не переживай из-за позднего ответа, это неважно.'),('Picking you up after work is no big thing.','Забрать тебя после работы совсем несложно.'),('It was no big thing to make an extra sandwich.','Сделать лишний бутерброд было несложно.')]),
('Not the done thing','not the DUN thing','not socially acceptable or usual','Не принято; не соответствует правилам поведения',[
('In our office, arriving very late is not the done thing.','В нашем офисе сильно опаздывать не принято.'),('It is not the done thing to read someone else’s messages.','Не принято читать чужие сообщения.'),('Wearing muddy shoes indoors is not the done thing here.','Здесь не принято заходить в помещение в грязной обуви.')]),
('Chance would be a fine thing','chans wood bee uh FYN thing','said when you think something desirable is very unlikely','Говорят, когда желаемое событие очень маловероятно',[
('“A quiet weekend?” “Chance would be a fine thing!”','«Тихие выходные?» «Хотелось бы, но вряд ли!»'),('A pay rise would be a fine thing, but I am not expecting one.','Повышение зарплаты было бы замечательно, но я его не жду.'),('“A seat on the bus?” “Chance would be a fine thing at this hour.”','«Место в автобусе?» «Хотелось бы, но в это время вряд ли.»')]),
('The furthest thing from my mind','the FUR-thist thing frum my MYND','something you are not thinking about at all','То, о чём вы совсем не думаете',[
('Moving house was the furthest thing from my mind this morning.','Переезд был последним, о чём я думал сегодня утром.'),('Dessert was the furthest thing from my mind after that large meal.','Десерт был последним, о чём я думал после такого большого ужина.'),('An argument was the furthest thing from my mind when I called her.','Ссора была последним, о чём я думал, когда звонил ей.')]),
('First thing','furst THING','very early, before doing anything else','С самого начала; прежде всего',[
('I check my calendar first thing in the morning.','Я первым делом утром проверяю календарь.'),('Please call me first thing tomorrow.','Пожалуйста, позвони мне завтра с самого утра.'),('First thing after work, I feed the cat.','Первым делом после работы я кормлю кота.')]),
('What with one thing and another','wot with wun thing and uh-NUH-thur','because of several different things that keep you busy','Из-за множества разных дел и забот',[
('What with one thing and another, I forgot to buy milk.','Из-за множества дел я забыл купить молоко.'),('What with one thing and another, we did not have time to call.','Из-за разных дел у нас не было времени позвонить.'),('What with one thing and another, the weekend passed quickly.','Из-за множества дел выходные быстро прошли.')]),
('One thing led to another','wun thing led tuh uh-NUH-thur','a series of events caused something to happen','Одно привело к другому',[
('We started talking at the café, and one thing led to another.','Мы начали разговаривать в кафе, и одно привело к другому.'),('I watched one video, and one thing led to another, so I stayed up late.','Я посмотрел одно видео, одно привело к другому, и я лёг поздно.'),('One thing led to another, and we decided to take a trip together.','Одно привело к другому, и мы решили поехать в путешествие вместе.')]),
]
W,H=A4
M=42
palette=[HexColor('#5B5BD6'),HexColor('#EF6C91'),HexColor('#F6B73C'),HexColor('#1AA6A6'),HexColor('#7E57C2')]
def footer(c,page):
c.setStrokeColor(HexColor('#E1E4FF'));c.line(M,29,W-M,29)
c.setFillColor(HexColor('#5B5BD6'));c.setFont('Noto',8);c.drawString(M,17,'Everyday English vocabulary | English-Russian learner handbook')
c.drawRightString(W-M,17,str(page))
def wrapped(c,text,x,y,width,font,size,leading,color):
c.setFont(font,size);c.setFillColor(color)
lines=simpleSplit(text,font,size,width)
for ln in lines:c.drawString(x,y,ln);y-=leading
return y
def cover(c):
c.setFillColor(HexColor('#F7F5FF'));c.rect(0,0,W,H,fill=1,stroke=0)
for i,col in enumerate(palette):
c.setFillColor(colors.Color(col.red,col.green,col.blue,alpha=.82));c.circle(35+i*45,H-45-(i%2)*22,34,fill=1,stroke=0)
c.setFillColor(HexColor('#1E1B4B'));c.setFont('NotoBold',30);c.drawCentredString(W/2,H/2,'Everyday English vocabulary')
c.showPage()
def entry(c,word,pron,meaning,rus,examples,n,page):
c.setFillColor(HexColor('#FCFCFF'));c.rect(0,0,W,H,fill=1,stroke=0)
col=palette[n%len(palette)]
c.setFillColor(col);c.rect(0,H-108,W,108,fill=1,stroke=0)
c.setFillColor(colors.white);c.setFont('NotoBold',23)
title_lines=simpleSplit(word,'NotoBold',23,W-2*M)
y=H-52
for ln in title_lines:c.drawString(M,y,ln);y-=28
c.setFont('NotoBold',11);c.drawString(M, y-2, 'Say it: '+pron)
y=H-132
c.setFillColor(HexColor('#5B5BD6'));c.setFont('NotoBold',10);c.drawString(M,y,'MEANING IN ENGLISH');y-=18
y=wrapped(c,meaning,M,y,W-2*M,'Noto',11,16,HexColor('#26253A'))-9
c.setFillColor(HexColor('#EF6C91'));c.setFont('NotoBold',10);c.drawString(M,y,'ПО-РУССКИ');y-=18
y=wrapped(c,rus,M,y,W-2*M,'Noto',11,16,HexColor('#26253A'))-12
c.setStrokeColor(HexColor('#D9D9F5'));c.line(M,y,W-M,y);y-=22
c.setFillColor(HexColor('#1AA6A6'));c.setFont('NotoBold',10);c.drawString(M,y,'DAILY-LIFE EXAMPLES');y-=20
for i,(en,ru) in enumerate(examples,1):
c.setFillColor(HexColor('#F0FAFA'));c.roundRect(M,y-50,W-2*M,52,7,fill=1,stroke=0)
c.setFillColor(col);c.setFont('NotoBold',9);c.drawString(M+10,y-14,str(i)+'.')
ye=wrapped(c,en,M+26,y-14,W-2*M-34,'Noto',9.3,12,HexColor('#22233A'))
wrapped(c,ru,M+26,ye-2,W-2*M-34,'Noto',8.7,11,HexColor('#555268'))
y-=64
footer(c,page);c.showPage()
c=canvas.Canvas(str(OUT),pagesize=A4)
c.setTitle('Everyday English vocabulary')
cover(c)
for i,e in enumerate(E,1):entry(c,*e,i,i+1)
c.save()
print(OUT)
python "/tmp/workspace/vocabulary-handbook/src/create_new_handbook.py" && ls -lh "/tmp/workspace/vocabulary-handbook/output/Everyday_English_Vocabulary_Book_2.pdf"
python -c "from pypdf import PdfReader; p='/tmp/workspace/vocabulary-handbook/output/Everyday_English_Vocabulary_Book_2.pdf'; r=PdfReader(p); tx=[x.extract_text() or '' for x in r.pages]; print('pages',len(r.pages)); print('cover',repr(tx[0].strip())); body='\\n'.join(tx[1:]); terms=['Ramblers','Car boot sale','The NHS medical system','Posh restaurant','No big thing','Not the done thing','Chance would be a fine thing','The furthest thing from my mind','First thing','What with one thing and another','One thing led to another']; print('missing',[t for t in terms if t not in body]); print('say_it',body.count('Say it:'))"
Everyday English Vocabulary Book 2
PDF Document · PDF