Beispiel #1
0
def generateMainDesign3Enriched(data, language):
    main = headerCV3

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        main = main + r'''
      
      \part{''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''}
      
      '''
    if(data['my0:hasWorkHistory']):
        main = main + r'''
      
      \section{''' + workTitle[language] + r'''}
 
      \begin{eventlist}
      
      '''
        for item in (data['my0:hasWorkHistory']):
            startDateString = ''
            endDateString = ''
            if(item['my0:startDate'] != ''):
                startDate = datetime.strptime(
                    item['my0:startDate'], '%Y-%m-%d')
                startDateString = startDate.strftime("%b %Y")
            if(item['my0:endDate'] != ''):
                endDate = datetime.strptime(item['my0:endDate'], '%Y-%m-%d')
                endDateString = endDate.strftime("%b %Y")
            if(item['my0:isCurrent'] == True):
                endDateString = 'Now '
            endDate = datetime.strptime(item['my0:endDate'], '%Y-%m-%d')
            main = main + r'''
        \item{''' + startDateString + r''' - ''' + endDateString + r'''}
        {''' + item['my0:employedIn']['my0:organizationName'] + r''', ''' + item['my0:employedIn']['my0:organizationAddress']['my0:city'] + r'''}
        {''' + item['my0:jobTitle'] + r'''}

        ''' + item['my0:jobDescription'] + r'''

        '''
    main = main + r'''\end{eventlist}
    
    '''
    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        main = main + r'''
      \personal
        [''' + item['my0:hasWebsite'][0]['my0:websiteURL'] + r''']
        {''' + item['my0:address']['my0:street'] + comma + item['my0:address']['my0:postalCode'] + r'''\newline ''' + item['my0:address']['my0:city'] + r''' (''' + getnameURI(item['my0:address']['my0:country']) + r''')}
        {''' + item['my0:phoneNumber'][0] + r'''}
        {''' + item['my0:email'] + r'''}

      '''
    if(data['my0:hasEducation']):
        main = main + r'''
      
      \section{''' + educationTitle[language] + r'''}
      
      \begin{yearlist}
      
      '''
        for item in (data['my0:hasEducation']):
            startDateString = ''
            endDateString = ''
            if(item['my0:eduStartDate'] != ''):
                startDate = datetime.strptime(
                    item['my0:eduStartDate'], '%Y-%m-%d')
                startDateString = startDate.strftime("%Y")
            if(item['my0:eduGradDate'] != ''):
                endDate = datetime.strptime(
                    item['my0:eduGradDate'], '%Y-%m-%d')
                endDateString = endDate.strftime("%Y")
            if(item['my0:isEduCurrent'] == True):
                endDateString = 'Now '
            main = main + r'''

        \item[''' + getnameURI(item['my0:degreeType']) + r''']{''' + startDateString + r''' -- ''' + endDateString + r'''}
        {''' + item['my0:degree'] + r'''}
        {''' + item['my0:studiedIn']['my0:organizationName'] + r''', ''' + item['my0:studiedIn']['my0:organizationAddress']['my0:city'] + r'''}

        '''
    main = main + r'''\end{yearlist}
    
    '''
    if(data['my0:hasSkill']):
            # print language skills
        main = main + r'''
        \section{Language skills}
        
        \begin{factlist}
        '''
        for item in (data['my0:hasSkill']):
            if(item['@type'] == 'my0:LanguageSkill'):
                main = main + r'''
                \item{''' + item['my0:skillName'] + r'''}
                '''
        main = main + r'''
        \end{factlist}
        '''
        # print basic skills
        main = main + r'''
        
        \section{''' + skillTitle[language] + r'''}
        
        \begin{factlist}

        \item{''' + skilllevel[0][language] + r'''}
            {
        '''
        for item in (data['my0:hasSkill']):
            if(item['@type'] == 'my0:Skill' and ord(item['my0:skillLevel']) >= 4):
                main = main + item['my0:skillName'] + r''' '''
        main = main + r'''}
        
        '''
        # print intermediate skills
        main = main + r'''
                
        \item{''' + skilllevel[1][language] + r'''}
            {
        '''
        for item in (data['my0:hasSkill']):
            if(item['@type'] == 'my0:Skill' and ord(item['my0:skillLevel']) >= 2 and ord(item['my0:skillLevel']) < 4):
                main = main + item['my0:skillName'] + r''' '''
        main = main + r'''}
        
        '''
        # print basic skills
        main = main + r'''
                
        \item{''' + skilllevel[2][language] + r'''}
            {
        '''
        for item in (data['my0:hasSkill']):
            if(item['@type'] == 'my0:Skill' and ord(item['my0:skillLevel']) == 1):
                main = main + item['my0:skillName'] + r''' '''
        main = main + r'''}
        
        '''
        main = main + r'''\end{factlist}
        
        '''
    if(data['my0:hasOtherInfo']):
        main = main + r'''
        \section{''' + otherInfoTitle[language] + r'''}
        
        \begin{otherlist}
        '''
        for item in (data['my0:hasOtherInfo']):
            main = main + r''' {''' + getnameURI(item['my0:otherInfoType']) + \
                r'''}{\newline ''' + \
                item['my0:otherInfoDescription'] + r'''} '''
        main = main + r'''
        \end{otherlist}
        '''
    return main
Beispiel #2
0
def generateMainDesign2Enriched(data, language):
    main = headerCV2

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        # write personal information about the user
        main = main + r'''\def \fullname {''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''}
      '''

        if item['my0:phoneNumberMobile']:
            main = main + r'''\def \phoneicon {\faPhone}
        \def \phonetext {''' + item['my0:phoneNumberMobile'] + r'''}
        '''

        if item['my0:email']:
            main = main + r'''\def \emailicon {\faEnvelope}
        \def \emaillink {mailto:''' + item['my0:email'] + r'''} \def \emailtext {''' + item['my0:email'] + r'''}
        '''

    main = main + settingsPart2

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} \newline'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} \newline'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website['my0:websiteURL'] + r'''}{''' + website['my0:websiteURL'] + r'''} \newline
        '''

    main = main + r'''\newline'''

    if(data['my0:hasEducation']):
        # write educational information about the user
        main = main + r'''
      %-------------------------------------------------- EDUCATION --------------------------------------------------
      \section{\faGraduationCap}{''' + educationTitle[language] + r'''}
      '''
        educations = sorted(
            data['my0:hasEducation'],
            key=lambda x: x['my0:eduStartDate'], reverse=True
        )

        for item in (educations):
            orgName = getValueFromLang(item["my0:studiedIn"]["my0:orgName"], language)
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:studiedIn"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = runQueryCountryMainOntology(item["my0:studiedIn"]["my0:orgAddress"]["my0:country"], language)
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            degreeName = runQueryMainOntology(item['my0:degree'], language)
                    
            endDate = item['my0:eduGradDate']
            if item['my0:eduGradDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:eduStartDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + degreeName + r''' ''' + \
                getValueFromLang(item["my0:degreeFieldOfStudy"], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasCourse']):
        # write courses information about the user
        main = main + r'''
      %-------------------------------------------------- COURSES --------------------------------------------------
      \section{\faGraduationCap}{''' + courseTitle[language] + r'''}
      '''
        courses = sorted(
            data['my0:hasCourse'],
            key=lambda x: x['my0:courseStartDate'], reverse=True
        )
        for item in (courses):
            orgName = item["my0:organizedBy"]["my0:orgName"]
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:organizedBy"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = runQueryMainOntology(item["my0:organizedBy"]["my0:orgAddress"]["my0:country"], language)
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            
            endDate = item['my0:courseFinishDate']
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:courseStartDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + \
                getValueFromLang(item["my0:courseTitle"], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasWorkHistory']):
        # write experience information about the user
        main = main + r'''
      %-------------------------------------------------- EXPERIENCE --------------------------------------------------
      \section{\faPieChart}{''' + workTitle[language] + r'''}
      '''
        works = sorted(
            data['my0:hasWorkHistory'],
            key=lambda x: x['my0:startDate'], reverse=True
        )
        for item in (works):
            orgName = item["my0:employedIn"]["my0:orgName"]
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''

            orgCityName = getValueFromLang(item["my0:employedIn"]["my0:orgAddress"]["my0:city"], language)
            orgCityURL = runQueryDBPEDIA(orgCityName, language)
            if orgCityURL != "":
                orgCityName = r'''\href{''' + orgCityURL + \
                    r'''}{''' + orgCityName + r'''}'''

            orgCountryName = getnameURI(item["my0:employedIn"]["my0:orgAddress"]["my0:country"])
            orgCountryURL = runQueryDBPEDIA(orgCountryName, language)
            if orgCountryURL != "":
                orgCountryName = r'''\href{''' + orgCountryURL + \
                    r'''}{''' + orgCountryName + r'''}'''
            endDate = item['my0:endDate']
            if item['my0:endDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + orgName + r'''}{''' + \
                item['my0:startDate'] + r''' -- ''' + \
                endDate + r'''}'''
            main = main + r'''{''' + getValueFromLang(item['my0:jobTitle'], language) + \
                r'''}{''' + orgCityName + r''', ''' + orgCountryName + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:jobDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasProject']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PROJECTS --------------------------------------------------
      \section{\faFlask}{''' + projectTitle[language] + r'''}
      '''
        projects = sorted(
            data['my0:hasProject'],
            key=lambda x: x['my0:projectStartDate'], reverse=True
        )
        for item in (projects):

            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + getValueFromLang(item['my0:projectName'], language) + r'''}{
          ''' + item['my0:projectStartDate'] + r''' - ''' + endDate + r'''
        }{''' + getValueFromLang(item['my0:projectCreator'], language) + r'''}{}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:projectDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasPublication']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PUBLICATIONS --------------------------------------------------
      \section{\faBook}{''' + publicationTitle[language] + r'''}
      '''
        publications = sorted(
            data['my0:hasPublication'],
            key=lambda x: x['my0:publicationDate'], reverse=True
        )
        for item in (publications):

            title = r''' \href{''' + item['my0:publicationURL'] + \
                r'''}{''' + getValueFromLang(item['my0:publicationTitle'], language) + r'''} '''

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + title + r'''}{''' + \
                item['my0:publicationDate'] + r'''}{''' + item['my0:publicationAuthor'] + \
                r'''}{''' + item['my0:publicationPublisher'] + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:publicationDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasPatent']):
        # write project information about the user
        main = main + r'''
      %-------------------------------------------------- PATENTS --------------------------------------------------
      \section{\faCertificate}{''' + patentTitle[language] + r'''}
      '''
        patents = sorted(
            data['my0:hasPatent'],
            key=lambda x: x['my0:patentIssuedDate'], reverse=True
        )
        for item in (patents):

            title = r''' \href{''' + item['my0:patentURL'] + r'''}{''' + \
                getValueFromLang(item['my0:patentTitle'], language) + ''' - ''' + \
                    item['my0:patentNumber'] + r'''} '''
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]

            main = main + r'''  \resumeEntryStart
        \resumeEntryTSDL
        '''
            main = main + r'''{''' + title + r'''}{''' + \
                endDate + \
                r'''}{''' + item['my0:patentInventor'] + \
                r'''}{''' + getValueFromLang(item['my0:patentOffice'], language) + r'''}'''
            main = main + r'''\resumeItemListStart
        \resumeItem { ''' + getValueFromLang(item['my0:patentDescription'], language) + r'''}
        \resumeItemListEnd'''
            main = main + r'''\resumeEntryEnd
        '''

    if(data['my0:hasSkill']):
            # write skill information about the user
        main = main + r'''
      %-------------------------------------------------- SKILLS --------------------------------------------------
      \section{\faGears}{''' + skillTitle[language] + r'''} \resumeEntryStart
      '''
        main = main + r'''\resumeEntryS{''' + \
            languageTitle[language] + r''' }{'''

        firstElementLanguage = False
        firstElementSkill = False

        for items in (data['my0:hasSkill']):
            if(items['@type'] == 'my0:LanguageSkill'):
                if firstElementLanguage:
                    main = main + comma + getValueFromLang(items['my0:skillName'], language)
                else:
                    main = main + getValueFromLang(items['my0:skillName'], language)
                firstElementLanguage = True
        main = main + r'''}
      \resumeEntryS{''' + otherTitle[language] + r''' }
      {'''

        for items in (data['my0:hasSkill']):
            if(items['@type'] == 'my0:Skill'):
                if firstElementSkill:
                    main = main + comma + getValueFromLang(items['my0:skillName'], language)
                else:
                    main = main + getValueFromLang(items['my0:skillName'], language)
                firstElementSkill = True
        main = main + r'''}\resumeEntryEnd
      '''

    return main
Beispiel #3
0
def generateMainDesign1(data, language):

    main = headerCV1

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        country = getnameURI(item['my0:address']['my0:country'])
        # write personal information about the user
        main = main + r'''
      \begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
      \textbf{\Large ''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''} &
       \textbf{\today} \\
      ''' + item['my0:address']['my0:street'] + space + item['my0:address']['my0:postalCode'] + r''' & ''' + item['my0:email'] + r'''\\
      ''' + item['my0:address']['my0:city'] + comma + country + r''' & ''' + item['my0:phoneNumber'] + r'''\\'''

        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website['my0:websiteURL'] + r'''}{''' + website['my0:websiteURL'] + r'''} & \\
        '''
        main = main + r'''
      \end{tabular*}
      \\'''

    if (data['my0:hasWorkHistory']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \resheading{''' + workTitle[language] + r'''}
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \begin{itemize}'''
        works = sorted(
            data['my0:hasWorkHistory'],
            key=lambda x: x['my0:startDate'], reverse=True
        )

        for item in (works):
            endDate = item['my0:endDate']
            if item['my0:endDate'] == "":
                endDate = current[language]
            main = main + r'''
        \item \ressubheading{''' + item['my0:employedIn']['my0:organizationName'] + r'''}{''' + item['my0:employedIn']['my0:organizationAddress']['my0:city'] + r''', ''' + getnameURI(item['my0:employedIn']['my0:organizationAddress']['my0:country']) + r'''}{''' + item['my0:jobTitle'] + comma + getnameURI(item['my0:jobMode']) + r'''}{''' + item['my0:startDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:jobDescription'] + r'''}
        \end{itemize}'''

    main = main + r'''\end{itemize}'''

    if (data['my0:hasEducation']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + educationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''

        educations = sorted(
            data['my0:hasEducation'],
            key=lambda x: x['my0:eduStartDate'], reverse=True
        )
        for item in (educations):
            endDate = item['my0:eduGradDate']
            if item['my0:eduGradDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:studiedIn']['my0:organizationName'] + r'''}{''' + item['my0:studiedIn']['my0:organizationAddress']['my0:city'] + r''', ''' + getnameURI(item['my0:studiedIn']['my0:organizationAddress']['my0:country']) + r'''}{''' + getnameURI(item['my0:degreeType']) + comma + item['my0:degree'] + r'''}{''' + item['my0:eduStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:eduDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasCourse']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + courseTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        courses = sorted(
            data['my0:hasCourse'],
            key=lambda x: x['my0:courseStartDate'], reverse=True
        )
        for item in (courses):
            endDate = item['my0:courseFinishDate']
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:organizedBy']['my0:organizationName'] + r'''}{''' + item['my0:organizedBy']['my0:organizationAddress']['my0:city'] + r''', ''' + getnameURI(item['my0:organizedBy']['my0:organizationAddress']['my0:country']) + r'''}{''' + item['my0:courseTitle'] + comma + item['my0:courseURL'] + r'''}{''' + item['my0:courseStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:courseDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPublication']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + publicationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        publications = sorted(
            data['my0:hasPublication'],
            key=lambda x: x['my0:publicationDate'], reverse=True
        )
        for item in (publications):
            main = main + r'''
		    \item \ressubheading{''' + item['my0:publicationTitle'] + r'''}{''' + item['my0:publicationPublisher'] + r'''}{''' + item['my0:publicationAuthor'] + r'''}{''' + item['my0:publicationDate'] + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:publicationDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasProject']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + projectTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        projects = sorted(
            data['my0:hasProject'],
            key=lambda x: x['my0:projectStartDate'], reverse=True
        )
        for item in (projects):
            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:projectName'] + r'''}{''' + item['my0:projectCreator'] + r'''}{}{''' + item['my0:projectStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:projectDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPatent']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + patentTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        patents = sorted(
            data['my0:hasPatent'],
            key=lambda x: x['my0:patentIssuedDate'], reverse=True
        )
        for item in (patents):
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:patentTitle'] + r'''}{''' + item['my0:patentOffice'] + r'''}{''' + item['my0:patentInventor'] + r'''}{''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:patentDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasOtherInfo']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + otherInfoTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasOtherInfo']):
            main = main + r'''
		    \item[] \ressubheading{''' + getnameURI(item['my0:otherInfoType']) + r'''}{}{}{}\\*''' + item['my0:otherInfoDescription']

        main = main + r'''\end{itemize}'''
    return main
Beispiel #4
0
def generateHTMLABOUT(aboutData, lang):
    address = aboutData['my0:address']
    formerName = aboutData["my0:formerName"]
    formerNameText = r''''''
    if formerName != "":
        formerNameText = r'''
        <span property="my0:formerName" content="''' + aboutData[
            'my0:formerName'] + r'''" class="text-primary">(''' + aboutData[
                'my0:formerName'] + r''')</span>
        '''
    countryName = runQueryCountryMainOntology(address['my0:country'], lang)
    fullAddress = getValueFromLang(address['my0:street'], lang) + ' ' + address['my0:postalCode'] + \
        ' ' + getValueFromLang(address['my0:city'], lang) + ' ' + countryName

    # add initial info on person, first name, last name, descriptions
    text = r'''
            <!--====================================================
                                    ABOUT
            ======================================================-->
            <section rel="my0:aboutPerson" typeof="my0:Person" class="resume-section p-3 p-lg-5 d-column" id="about">
                <div class="row my-auto pt-5">
                    <h1 class="mb-0 col-12 text-center"> <span property="my0:title"
                    content="''' + aboutData[
        'my0:title'] + r'''" class="text-primary">''' + runQueryMainOntology(
            aboutData['my0:title'], lang
        ) + r'''</span> <span property="my0:firstName" content="''' + aboutData[
            'my0:firstName'] + r'''">''' + aboutData['my0:firstName'] + r'''</span>
                    <span property="my0:lastName" content="''' + aboutData[
                'my0:lastName'] + r'''" class="text-primary">''' + aboutData[
                    'my0:lastName'] + r'''</span>
                    ''' + formerNameText + r'''
                    </h1>
                    <div class="subheading mb-5 col-12 text-center" property="my0:personShortDescription">''' + getValueFromLang(
                        aboutData['my0:personShortDescription'], lang) + r'''
                    </div>
                    <p property="my0:personLongDescription" class="col-12 ofsset-12 col-md-8 text-center mb-5 pt-3">''' + getValueFromLang(
                            aboutData['my0:personLongDescription'],
                            lang) + r'''
                    </p>
                    <ul rel="my0:hasWebsite" class="list-inline list-social-icons mb-0 col-12 pt-5 text-center">

    '''

    # add website information
    for website in (aboutData['my0:hasWebsite']):
        websiteType = getnameURI(website['my0:websiteType']).lower()
        websiteText = 'globe'
        if websiteType == 'facebook' or websiteType == 'linkedin' or websiteType == 'instagram' or websiteType == 'twitter' or websiteType == 'xing' or websiteType == 'github':
            websiteText = websiteType
        text = text + r'''
                        <li class="list-inline-item">
                            <a target="_blank" href="''' + website[
            'my0:websiteURL'] + r'''" typeof="my0:Website">
                                <span class="fa-stack fa-lg" property="my0:websiteURL" content="''' + website[
                'my0:websiteURL'] + r'''">
                                    <i class="fa fa-circle fa-stack-2x"></i>
                                    <i class="fa fa-''' + websiteText + r''' fa-stack-1x fa-inverse"></i>
                                </span>
                                <span 
                                hidden
                                property="my0:websiteType" content="''' + website[
                    'my0:websiteType'] + r'''">
                               </span>
                            </a>
                        </li>
                        '''
    # add contact information
    text = text + r'''
                    </ul>
                </div>'''
    text = text + r'''
                <br />
                <div class="row justify-content-center my-auto pt-5 text-center">
                    <div class="contact-cont2 col-4 col-md-2">
                        <div rel="my0:address" class="contact-add contact-box-desc">
                            <h3><i class="fa fa-map-marker cl-atlantis fa-1x"></i> Address</a></h3>
                            <a target="_empty" href="https://www.openstreetmap.org/search?query=''' + fullAddress + r'''"
                            typeof="my0:Address">
                                <span property="my0:street" content="''' + getValueFromLang(
        address['my0:street'], lang
    ) + r'''">''' + getValueFromLang(
        address['my0:street'], lang
    ) + r'''<span><br />
                                <span property="my0:postalCode" content="''' + address[
        'my0:postalCode'] + r'''">''' + address[
            'my0:postalCode'] + r'''</span> <span property="my0:city"
                                content="''' + getValueFromLang(
                address['my0:city'], lang
            ) + r'''">''' + getValueFromLang(
                address['my0:city'], lang
            ) + r'''</span>
                                <p property="my0:country" content="''' + address[
                'my0:country'] + r'''">
                                ''' + countryName + r'''</p>
                            </a>
                        </div>
                    </div>
                    <div class="contact-phone contact-box-desc col-4 col-md-2">
                        <h3><i class="fa fa-phone cl-atlantis fa-1x"></i> Phone</h3>
                        <p property="my0:phoneNumberMobile" content="''' + aboutData[
                    'my0:phoneNumberMobile'] + r'''">''' + aboutData[
                        'my0:phoneNumberMobile'] + r'''</p>
                    </div>
                    <div class="contact-mail contact-box-desc col-4 col-md-2">
                        <h3><i class="fa fa-envelope-o cl-atlantis fa-1x"></i> E-mail</h3>
                        <address property="my0:email" content="''' + aboutData[
                            'my0:email'] + r'''" class="address-details-f">
                            <a href="mailto:''' + aboutData[
                                'my0:email'] + r'''" class="">''' + aboutData[
                                    'my0:email'] + r'''</a>
                        </address>
                    </div>
                </div>
            </section>
                '''
    return text
Beispiel #5
0
def generateMainDesign1Enriched(data, language):
    main = headerCV1

    if (data['my0:aboutPerson']):
        item = data['my0:aboutPerson']
        address = item['my0:address']
        country = runQueryCountryMainOntology(address['my0:country'], language)
        full_address = address['my0:street'] + space + address['my0:city'] + \
            space + address['my0:postalCode'] + space + country

        # write personal information about the user
        main = main + r'''
      \begin{tabular*}{7in}{l@{\extracolsep{\fill}}r}
      \textbf{\Large ''' + item['my0:firstName'] + space + item['my0:lastName'] + r'''} & \textbf{\today} \\
      ''' + address['my0:street'] + space + address['my0:postalCode'] + r''' & ''' + item['my0:email'] + r'''\\''' + address['my0:city'] + comma + country + r'''\href{https://www.openstreetmap.org/search?query=''' + full_address + r'''}{\faMapMarker}  & ''' + item['my0:phoneNumber'] + r'''\\
      '''
        # write website information about the user
        for website in (item['my0:hasWebsite']):
            if doesURIContainWord(website['my0:websiteType'], 'Linkedin'):
                main = main + \
                    r'''\faLinkedin { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            elif doesURIContainWord(website['my0:websiteType'], 'Xing'):
                main = main + \
                    r'''\faXing { }  \href{''' + website['my0:websiteURL'] + \
                    r'''}{''' + website['my0:websiteURL'] + r'''} & \\'''
            else:
                main = main + r'''\faGlobe { }  \href{''' + website['my0:websiteURL'] + r'''}{''' + website['my0:websiteURL'] + r'''} & \\
        '''
        main = main + r'''
      \end{tabular*}
      \\'''

    if (data['my0:hasWorkHistory']):

        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \resheading{''' + workTitle[language] + r'''}
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
      \begin{itemize}'''
        for item in (data['my0:hasWorkHistory']):

            address = item['my0:employedIn']['my0:organizationAddress']
            orgName = item['my0:employedIn']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            jobMode = runQueryMainOntology(item['my0:jobMode'], language)
            endDate = item['my0:endDate']
            if item['my0:endDate'] == "":
                endDate = current[language]

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + item['my0:jobTitle'] + comma + jobMode + r'''}{''' + item['my0:startDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:jobDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasEducation']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + educationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasEducation']):
            address = item['my0:studiedIn']['my0:organizationAddress']
            orgName = item['my0:studiedIn']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            endDate = item['my0:eduGradDate']
            if item['my0:eduGradDate'] == "":
                endDate = current[language]
            degreeType = runQueryMainOntology(item['my0:degreeType'], language)

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + item['my0:degree'] + comma + degreeType + r'''}{''' + item['my0:eduStartDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:eduDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasCourse']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + courseTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasCourse']):
            address = item['my0:organizedBy']['my0:organizationAddress']
            orgName = item['my0:organizedBy']['my0:organizationName']
            orgURL = runQueryDBPEDIA(orgName, language)
            if orgURL != "":
                orgName = r'''\href{''' + orgURL + \
                    r'''}{''' + orgName + r'''}'''
            country = runQueryCountryMainOntology(
                address['my0:country'], language)
            country = r'''\href{''' + country + r'''}{''' + \
                getnameURI(address['my0:country']) + r'''}'''
            city = address['my0:city']
            cityURL = runQueryDBPEDIA(city, language)
            if cityURL != "":
                city = r'''\href{''' + cityURL + r'''}{''' + city + r'''}'''
            endDate = item['my0:courseFinishDate']
            if item['my0:courseFinishDate'] == "":
                endDate = current[language]
            coursetit = item['my0:courseTitle']
            if item['my0:courseURL']:
                coursetit = r'''\href{''' + item['my0:courseURL'] + \
                    r'''}{''' + item['my0:courseTitle'] + r'''}'''

            main = main + r'''
        \item \ressubheading{''' + orgName + r'''}{''' + city + r''', ''' + country + r'''}{''' + coursetit + r'''}{''' + item['my0:courseStartDate'] + r''' - ''' + endDate + r'''}\\
        \begin{itemize}
        \item[]{''' + item['my0:courseDescription'] + r'''}
        \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPublication']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + publicationTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        publications = sorted(
            data['my0:hasPublication'],
            key=lambda x: x['my0:publicationDate'], reverse=True
        )
        for item in (publications):
            main = main + r'''
		    \item \ressubheading{''' + item['my0:publicationTitle'] + r'''}{''' + item['my0:publicationPublisher'] + r'''}{''' + item['my0:publicationAuthor'] + r'''}{''' + item['my0:publicationDate'] + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:publicationDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasProject']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + projectTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        projects = sorted(
            data['my0:hasProject'],
            key=lambda x: x['my0:projectStartDate'], reverse=True
        )
        for item in (projects):
            endDate = item['my0:projectEndDate']
            if item['my0:projectEndDate'] == "":
                endDate = current[language]
            main = main + r'''
		    \item \ressubheading{''' + item['my0:projectName'] + r'''}{''' + item['my0:projectCreator'] + r'''}{}{''' + item['my0:projectStartDate'] + r''' - ''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:projectDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasPatent']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + patentTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        patents = sorted(
            data['my0:hasPatent'],
            key=lambda x: x['my0:patentIssuedDate'], reverse=True
        )
        for item in (patents):
            endDate = item['my0:patentIssuedDate']
            if item['my0:patentIssuedDate'] == "":
                endDate = pending[language]
            patentNumber = item['my0:patentNumber']
            main = main + r'''
		    \item \ressubheading{''' + item['my0:patentTitle'] + r''' - ''' + patentNumber + r'''}{''' + item['my0:patentOffice'] + r'''}{''' + item['my0:patentInventor'] + r'''}{''' + endDate + r'''}\\
		    \begin{itemize}
		    \item[]{''' + item['my0:patentDescription'] + r'''}
		    \end{itemize}'''

        main = main + r'''\end{itemize}'''

    if (data['my0:hasOtherInfo']):
        main = main + r'''
      %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \resheading{''' + otherInfoTitle[language] + r'''}
	    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
	    \begin{itemize}'''
        for item in (data['my0:hasOtherInfo']):
            types = runQueryMainOntology(item['my0:otherInfoType'], language)

            main = main + r'''
		    \item[] \ressubheading{''' + types + r'''}{}{}{}\\*''' + item['my0:otherInfoDescription']

        main = main + r'''\end{itemize}'''
    return main