mirror of
https://github.com/rendercv/rendercv.git
synced 2026-04-18 22:08:47 -04:00
add Telegram as a social network (#187)
This commit is contained in:
@@ -299,6 +299,7 @@ SocialNetworkName = Literal[
|
||||
"ResearchGate",
|
||||
"YouTube",
|
||||
"Google Scholar",
|
||||
"Telegram",
|
||||
]
|
||||
|
||||
available_social_networks = get_args(SocialNetworkName)
|
||||
@@ -366,6 +367,7 @@ class SocialNetwork(RenderCVBaseModelWithoutExtraKeys):
|
||||
"ResearchGate": "https://researchgate.net/profile/",
|
||||
"YouTube": "https://youtube.com/@",
|
||||
"Google Scholar": "https://scholar.google.com/citations?user=",
|
||||
"Telegram": "https://t.me/",
|
||||
}
|
||||
url = url_dictionary[self.network] + self.username
|
||||
|
||||
@@ -489,6 +491,7 @@ class CurriculumVitae(RenderCVBaseModelWithExtraKeys):
|
||||
"ResearchGate": "\\faResearchgate",
|
||||
"YouTube": "\\faYoutube",
|
||||
"Google Scholar": "\\faGraduationCap",
|
||||
"Telegram": "\\faTelegram",
|
||||
}
|
||||
for social_network in self.social_networks:
|
||||
clean_url = computers.make_a_url_clean(social_network.url)
|
||||
|
||||
@@ -8,7 +8,7 @@ import copy
|
||||
import pathlib
|
||||
import re
|
||||
from datetime import date as Date
|
||||
from typing import Any, Optional, Literal
|
||||
from typing import Any, Literal, Optional
|
||||
|
||||
import jinja2
|
||||
|
||||
@@ -478,9 +478,7 @@ def transform_markdown_sections_to_latex_sections(
|
||||
entry_as_dict = entry.model_dump()
|
||||
for entry_key, value in entry_as_dict.items():
|
||||
if isinstance(value, str):
|
||||
result = markdown_to_latex(
|
||||
escape_latex_characters(value)
|
||||
)
|
||||
result = markdown_to_latex(escape_latex_characters(value))
|
||||
setattr(entry, entry_key, result)
|
||||
elif isinstance(value, list):
|
||||
for j, item in enumerate(value):
|
||||
|
||||
@@ -23,7 +23,7 @@ from rendercv.renderer import templater
|
||||
# the output. Setting update_testdata to True will update the reference files with
|
||||
# the latest RenderCV. This should be done with caution, as it will overwrite the
|
||||
# reference files with the latest output.
|
||||
update_testdata = False
|
||||
update_testdata = True
|
||||
|
||||
# copy sample entries from docs/update_rendercv_files.py:
|
||||
education_entry_dictionary = {
|
||||
@@ -300,6 +300,7 @@ def rendercv_filled_curriculum_vitae_data_model(
|
||||
data.SocialNetwork(network="GitLab", username="johndoe"),
|
||||
data.SocialNetwork(network="ResearchGate", username="johndoe"),
|
||||
data.SocialNetwork(network="YouTube", username="johndoe"),
|
||||
data.SocialNetwork(network="Telegram", username="johndoe"),
|
||||
],
|
||||
sections={
|
||||
"Text Entries": [text_entry, text_entry, text_entry],
|
||||
|
||||
@@ -356,7 +356,7 @@ def test_render_command_with_custom_png_path_multiple_pages(tmp_path):
|
||||
runner.invoke(cli.app, ["new", "John Doe"])
|
||||
input_file_path = tmp_path / "John_Doe_CV.yaml"
|
||||
|
||||
run_render_command(
|
||||
result = run_render_command(
|
||||
input_file_path,
|
||||
tmp_path,
|
||||
[
|
||||
|
||||
@@ -411,6 +411,11 @@ def test_invalid_social_networks(network, username):
|
||||
"myusername",
|
||||
"https://scholar.google.com/citations?user=myusername",
|
||||
),
|
||||
(
|
||||
"Telegram",
|
||||
"myusername",
|
||||
"https://t.me/myusername",
|
||||
),
|
||||
],
|
||||
)
|
||||
def test_social_network_url(network, username, expected_url):
|
||||
|
||||
@@ -237,6 +237,10 @@
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{{\footnotesize\faYoutube}\hspace*{0.13cm}johndoe}}%
|
||||
\kern 0.25 cm%
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{{\footnotesize\faTelegram}\hspace*{0.13cm}johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{0.3 cm - 0.3 cm}
|
||||
|
||||
@@ -218,6 +218,10 @@
|
||||
\AND%
|
||||
\kern 5.0 pt%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{youtube.com/@johndoe}}%
|
||||
\kern 5.0 pt%
|
||||
\AND%
|
||||
\kern 5.0 pt%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{t.me/johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{5 pt - 0.3 cm}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
\social[gitlab]{johndoe}
|
||||
\social[researchgate]{johndoe}
|
||||
\social[youtube]{johndoe}
|
||||
\social[telegram]{johndoe}
|
||||
% Social icons
|
||||
% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
|
||||
% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted
|
||||
|
||||
@@ -213,6 +213,10 @@
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{\color{black}{\footnotesize\faYoutube}\hspace*{0.13cm}johndoe}}%
|
||||
\kern 0.25 cm%
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{\color{black}{\footnotesize\faTelegram}\hspace*{0.13cm}johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{0.3 cm - 0.3 cm}
|
||||
|
||||
@@ -237,6 +237,10 @@
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{{\footnotesize\faYoutube}\hspace*{0.13cm}johndoe}}%
|
||||
\kern 0.25 cm%
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{{\footnotesize\faTelegram}\hspace*{0.13cm}johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{0.3 cm - 0.3 cm}
|
||||
|
||||
@@ -218,6 +218,10 @@
|
||||
\AND%
|
||||
\kern 5.0 pt%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{youtube.com/@johndoe}}%
|
||||
\kern 5.0 pt%
|
||||
\AND%
|
||||
\kern 5.0 pt%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{t.me/johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{5 pt - 0.3 cm}
|
||||
|
||||
@@ -56,6 +56,7 @@
|
||||
\social[gitlab]{johndoe}
|
||||
\social[researchgate]{johndoe}
|
||||
\social[youtube]{johndoe}
|
||||
\social[telegram]{johndoe}
|
||||
% Social icons
|
||||
% \social[linkedin]{john.doe} % optional, remove / comment the line if not wanted
|
||||
% \social[xing]{john\_doe} % optional, remove / comment the line if not wanted
|
||||
|
||||
@@ -213,6 +213,10 @@
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://youtube.com/@johndoe}{\color{black}{\footnotesize\faYoutube}\hspace*{0.13cm}johndoe}}%
|
||||
\kern 0.25 cm%
|
||||
\AND%
|
||||
\kern 0.25 cm%
|
||||
\mbox{\hrefWithoutArrow{https://t.me/johndoe}{\color{black}{\footnotesize\faTelegram}\hspace*{0.13cm}johndoe}}%
|
||||
\end{header}
|
||||
|
||||
\vspace{0.3 cm - 0.3 cm}
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
- GitLab: [johndoe](https://gitlab.com/johndoe)
|
||||
- ResearchGate: [johndoe](https://researchgate.net/profile/johndoe)
|
||||
- YouTube: [johndoe](https://youtube.com/@johndoe)
|
||||
- Telegram: [johndoe](https://t.me/johndoe)
|
||||
|
||||
|
||||
# Text Entries
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
- GitLab: [johndoe](https://gitlab.com/johndoe)
|
||||
- ResearchGate: [johndoe](https://researchgate.net/profile/johndoe)
|
||||
- YouTube: [johndoe](https://youtube.com/@johndoe)
|
||||
- Telegram: [johndoe](https://t.me/johndoe)
|
||||
|
||||
|
||||
# Text Entries
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
- GitLab: [johndoe](https://gitlab.com/johndoe)
|
||||
- ResearchGate: [johndoe](https://researchgate.net/profile/johndoe)
|
||||
- YouTube: [johndoe](https://youtube.com/@johndoe)
|
||||
- Telegram: [johndoe](https://t.me/johndoe)
|
||||
|
||||
|
||||
# Text Entries
|
||||
|
||||
@@ -14,6 +14,7 @@
|
||||
- GitLab: [johndoe](https://gitlab.com/johndoe)
|
||||
- ResearchGate: [johndoe](https://researchgate.net/profile/johndoe)
|
||||
- YouTube: [johndoe](https://youtube.com/@johndoe)
|
||||
- Telegram: [johndoe](https://t.me/johndoe)
|
||||
|
||||
|
||||
# Text Entries
|
||||
|
||||
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -47,6 +47,7 @@
|
||||
<li>GitLab: <a href="https://gitlab.com/johndoe">johndoe</a></li>
|
||||
<li>ResearchGate: <a href="https://researchgate.net/profile/johndoe">johndoe</a></li>
|
||||
<li>YouTube: <a href="https://youtube.com/@johndoe">johndoe</a></li>
|
||||
<li>Telegram: <a href="https://t.me/johndoe">johndoe</a></li>
|
||||
</ul>
|
||||
<h1>Text Entries</h1>
|
||||
<p>This is a <em>TextEntry</em>. It is only a text and can be useful for sections like <strong>Summary</strong>. To showcase the TextEntry completely, this sentence is added, but it doesn't contain any information.</p>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<li>GitLab: <a href="https://gitlab.com/johndoe">johndoe</a></li>
|
||||
<li>ResearchGate: <a href="https://researchgate.net/profile/johndoe">johndoe</a></li>
|
||||
<li>YouTube: <a href="https://youtube.com/@johndoe">johndoe</a></li>
|
||||
<li>Telegram: <a href="https://t.me/johndoe">johndoe</a></li>
|
||||
</ul>
|
||||
<h1>Text Entries</h1>
|
||||
<p>This is a <em>TextEntry</em>. It is only a text and can be useful for sections like <strong>Summary</strong>. To showcase the TextEntry completely, this sentence is added, but it doesn't contain any information.</p>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<li>GitLab: <a href="https://gitlab.com/johndoe">johndoe</a></li>
|
||||
<li>ResearchGate: <a href="https://researchgate.net/profile/johndoe">johndoe</a></li>
|
||||
<li>YouTube: <a href="https://youtube.com/@johndoe">johndoe</a></li>
|
||||
<li>Telegram: <a href="https://t.me/johndoe">johndoe</a></li>
|
||||
</ul>
|
||||
<h1>Text Entries</h1>
|
||||
<p>This is a <em>TextEntry</em>. It is only a text and can be useful for sections like <strong>Summary</strong>. To showcase the TextEntry completely, this sentence is added, but it doesn't contain any information.</p>
|
||||
|
||||
@@ -47,6 +47,7 @@
|
||||
<li>GitLab: <a href="https://gitlab.com/johndoe">johndoe</a></li>
|
||||
<li>ResearchGate: <a href="https://researchgate.net/profile/johndoe">johndoe</a></li>
|
||||
<li>YouTube: <a href="https://youtube.com/@johndoe">johndoe</a></li>
|
||||
<li>Telegram: <a href="https://t.me/johndoe">johndoe</a></li>
|
||||
</ul>
|
||||
<h1>Text Entries</h1>
|
||||
<p>This is a <em>TextEntry</em>. It is only a text and can be useful for sections like <strong>Summary</strong>. To showcase the TextEntry completely, this sentence is added, but it doesn't contain any information.</p>
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 496 KiB After Width: | Height: | Size: 497 KiB |
Reference in New Issue
Block a user