rendercv.data.models.entry_types¶
The rendercv.models.data.entry_types module contains the data models of all the available
entry types in RenderCV.
EntryType
¶
Bases: ABC
This class is an abstract class that defines all the methods an entry type should have.
Source code in src/rendercv/data/models/entry_types.py
OneLineEntry
¶
Bases: RenderCVBaseModelWithExtraKeys, EntryType
This class is the data model of OneLineEntry.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold(keywords)
¶
Make the given keywords bold in the details field.
Parameters:
-
keywords(list[str]) –The keywords to make bold.
Returns:
-
OneLineEntry–A OneLineEntry with the keywords made bold in the
detailsfield.
Source code in src/rendercv/data/models/entry_types.py
BulletEntry
¶
Bases: RenderCVBaseModelWithExtraKeys, EntryType
This class is the data model of BulletEntry.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold(keywords)
¶
Make the given keywords bold in the bullet field.
Parameters:
-
keywords(list[str]) –The keywords to make bold.
Returns:
-
BulletEntry–A BulletEntry with the keywords made bold in the
bulletfield.
Source code in src/rendercv/data/models/entry_types.py
NumberedEntry
¶
Bases: RenderCVBaseModelWithExtraKeys, EntryType
This class is the data model of NumberedEntry.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold(keywords)
¶
Make the given keywords bold in the number field.
Parameters:
-
keywords(list[str]) –The keywords to make bold.
Returns:
-
NumberedEntry–A NumberedEntry with the keywords made bold in the
numberfield.
Source code in src/rendercv/data/models/entry_types.py
ReversedNumberedEntry
¶
Bases: RenderCVBaseModelWithExtraKeys, EntryType
This class is the data model of ReversedNumberedEntry.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold(keywords)
¶
Make the given keywords bold in the reversed_number field.
Parameters:
-
keywords(list[str]) –The keywords to make bold.
Returns:
-
ReversedNumberedEntry–A ReversedNumberedEntry with the keywords made bold in the
reversed_numberfield.
Source code in src/rendercv/data/models/entry_types.py
EntryWithDate
¶
Bases: RenderCVBaseModelWithExtraKeys
This class is the parent class of some of the entry types that have date fields.
Source code in src/rendercv/data/models/entry_types.py
date_string
cached
property
¶
Return a date string based on the date field and cache date_string as
an attribute of the instance.
PublicationEntryBase
¶
Bases: RenderCVBaseModelWithExtraKeys
This class is the parent class of the PublicationEntry class.
Source code in src/rendercv/data/models/entry_types.py
doi_url
cached
property
¶
Return the URL of the DOI and cache doi_url as an attribute of the
instance.
clean_url
cached
property
¶
Return the clean URL of the publication and cache clean_url as an attribute
of the instance.
ignore_url_if_doi_is_given()
¶
Check if DOI is provided and ignore the URL if it is provided.
Source code in src/rendercv/data/models/entry_types.py
PublicationEntry
¶
Bases: EntryWithDate, PublicationEntryBase, EntryType
This class is the data model of PublicationEntry. PublicationEntry class is
created by combining the EntryWithDate and PublicationEntryBase classes to have
the fields in the correct order.
Source code in src/rendercv/data/models/entry_types.py
EntryBase
¶
Bases: EntryWithDate
This class is the parent class of some of the entry types. It is being used because some of the entry types have common fields like dates, highlights, location, etc.
Source code in src/rendercv/data/models/entry_types.py
397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 | |
date_string
cached
property
¶
date_string_only_years
cached
property
¶
time_span_string
cached
property
¶
Return a time span string based on the date, start_date, and end_date
fields and cache time_span_string as an attribute of the instance.
handle_nested_bullets_in_highlights(highlights)
classmethod
¶
Handle nested bullets in the highlights field.
Source code in src/rendercv/data/models/entry_types.py
check_and_adjust_dates()
¶
Call the validate_adjust_dates_of_an_entry function to validate the
dates.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold(keywords)
¶
Make the given keywords bold in the summary and highlights fields.
Parameters:
-
keywords(list[str]) –The keywords to make bold.
Returns:
-
EntryBase–An EntryBase with the keywords made bold in the
summaryandhighlights -
EntryBase–fields.
Source code in src/rendercv/data/models/entry_types.py
NormalEntryBase
¶
Bases: RenderCVBaseModelWithExtraKeys
This class is the parent class of the NormalEntry class.
Source code in src/rendercv/data/models/entry_types.py
NormalEntry
¶
Bases: EntryBase, NormalEntryBase, EntryType
This class is the data model of NormalEntry. NormalEntry class is created by
combining the EntryBase and NormalEntryBase classes to have the fields in the
correct order.
Source code in src/rendercv/data/models/entry_types.py
ExperienceEntryBase
¶
Bases: RenderCVBaseModelWithExtraKeys
This class is the parent class of the ExperienceEntry class.
Source code in src/rendercv/data/models/entry_types.py
ExperienceEntry
¶
Bases: EntryBase, ExperienceEntryBase, EntryType
This class is the data model of ExperienceEntry. ExperienceEntry class is
created by combining the EntryBase and ExperienceEntryBase classes to have the
fields in the correct order.
Source code in src/rendercv/data/models/entry_types.py
EducationEntryBase
¶
Bases: RenderCVBaseModelWithExtraKeys
This class is the parent class of the EducationEntry class.
Source code in src/rendercv/data/models/entry_types.py
EducationEntry
¶
Bases: EntryBase, EducationEntryBase, EntryType
This class is the data model of EducationEntry. EducationEntry class is
created by combining the EntryBase and EducationEntryBase classes to have the
fields in the correct order.
Source code in src/rendercv/data/models/entry_types.py
validate_date_field(date)
¶
Check if the date field is provided correctly.
Parameters:
-
date(int | str | None) –The date to validate.
Returns:
-
int | str | None–The validated date.
Source code in src/rendercv/data/models/entry_types.py
validate_start_and_end_date_fields(date)
¶
Check if the start_date and end_date fields are provided correctly.
Parameters:
-
date(str | date) –The date to validate.
Returns:
-
str–The validated date.
Source code in src/rendercv/data/models/entry_types.py
validate_and_adjust_dates_for_an_entry(start_date, end_date, date)
¶
Check if the dates are provided correctly and make the necessary adjustments.
Parameters:
-
start_date(StartDate) –The start date of the event.
-
end_date(EndDate) –The end date of the event.
-
date(ArbitraryDate) –The date of the event.
Returns:
-
tuple[StartDate, EndDate, ArbitraryDate]–The validated and adjusted
start_date,end_date, anddate.
Source code in src/rendercv/data/models/entry_types.py
make_keywords_bold_in_a_string(string, keywords)
¶
Make the given keywords bold in the given string, handling capitalization and substring issues.
Examples:
>>> make_keywords_bold_in_a_string("I know java and javascript", ["java"])
'I know **java** and javascript'
>>> make_keywords_bold_in_a_string("Experience with aws, Aws and AWS", ["aws"])
'Experience with **aws**, **Aws** and **AWS**'
Source code in src/rendercv/data/models/entry_types.py
compute_dates_for_sorting(start_date, end_date, date)
¶
Return end and start dates for sorting based on entry date fields.
Source code in src/rendercv/data/models/entry_types.py
sort_entries_by_date(entries, order)
¶
Sort the given entries based on the provided order.