1- from itertools import product
21from pathlib import Path
3- import json
4- import random
2+
3+ from . salutations import typed_salutations
54
65
76def get_resume (format , name = 'resume' ):
@@ -33,54 +32,6 @@ def experience_skills(job_id=None):
3332 return [s .strip () for s in skills [job_id ].split ('+' ) if s ]
3433
3534
36- def salutation_permutations ():
37- """Say 'Hello, my name is' in a bunch of ways"""
38- hellojis = '👋 🌊 🙋 🖖' .split ()
39-
40- hello = (
41- 'hello sawubona haai molo dumela'
42- 'hi yo sup hiya hey howzit hoesit aweh hola heita'
43- ).split ()
44- hello .extend (['whakind eksê' , 'hoe lyk it' ])
45-
46- my_names_are = [
47- 'my name is' ,
48- 'my naam is' ,
49- 'igama lami ngu' ,
50- 'lebitso la ka ke'
51- ]
52-
53- salutation_permutations = list (product (
54- hellojis , hello , my_names_are
55- ))
56- random .shuffle (salutation_permutations )
57-
58- salutations = [
59- f'🤓{ emoji } { hello } , { my_name_is } '
60- for emoji , hello , my_name_is in salutation_permutations
61- ]
62- return salutations
63-
64-
65- TYPED_JS = "https://cdn.jsdelivr.net/npm/typed.js@2.0.12"
66- def typed_salutations ():
67- return typed_js ('h1' , salutation_permutations ())
68-
69- def typed_js (dom_element , things_to_type ):
70- options = json .dumps (dict (
71- smartBackspace = True ,
72- startDelay = 3000 ,
73- showCursor = False ,
74- typeSpeed = 50 ,
75- strings = things_to_type ,
76- ))
77-
78- return '\n ' .join ([
79- f'<script src="{ TYPED_JS } "></script>' ,
80- f"<script>var typed = new Typed('{ dom_element } ', { options } );</script>" ,
81- ])
82-
83-
8435BADGE_URL_TEMPLATE = "https://img.shields.io/badge/{badge_name}?style={style}&logo={logo}&logoColor={colour}"
8536SKILL_BADGE_MAP = {
8637 # browsers
@@ -134,6 +85,7 @@ def generate_badge_url(skill):
13485 'badge_name style logo colour' .split (),
13586 [skill_id , 'for-the-badge' , skill , 'white' ],
13687 )))
88+
13789def skills_badge_urls (company = None ):
13890 badges = [
13991 generate_badge_url (skill )
@@ -145,7 +97,6 @@ def skills_badge_urls(company=None):
14597 return ' ' .join ([f'<img src="{ url } "/>' for url in badges ])
14698
14799
148-
149100def define_env (env ):
150101 env .variables ['skills_badge_urls' ] = skills_badge_urls
151102 env .variables ['typed_salutations' ] = typed_salutations
0 commit comments