Skip to content

Commit

Permalink
add author URLs, error by default if a URL is missing
Browse files Browse the repository at this point in the history
  • Loading branch information
bamos committed Jul 13, 2024
1 parent bb89d90 commit b6e3c25
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cv.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -224,6 +224,7 @@ all_publications:
sort_bib: True
include_image: True
group_by_year: True
error_without_author_url: True
author_urls:
'Aram-Alexandre Pooladian': 'http://arampooladian.com/'
'Carles Domingo-Enrich': 'https://cims.nyu.edu/~cd2754/'
Expand Down Expand Up @@ -393,6 +394,10 @@ all_publications:
'Yoshua Bengio': 'https://yoshuabengio.org/profile/'
'Alexander Tong': 'https://www.alextong.net/'
'Kirill Neklyudov': 'https://necludov.github.io/'
'Sanae Lotfi': 'https://sanaelotfi.github.io/'
'Yilun Kuang': 'https://yilunkuang.github.io/'
'Marc Anton Finzi': 'https://mfinzi.github.io/'
'Micah Goldblum': 'https://goldblum.github.io/'

repos:
- repo_url: https://github.com/facebookresearch/advprompter
Expand Down Expand Up @@ -510,7 +515,7 @@ talks:
- title: Amortized optimization for optimal transport and LLM attacks
location: ISMP
year: 2024
- title: Differentiable optimization for control and robotics
- title: Differentiable optimization for robotics
location: RSS Optimization for Robotics Workshop
url: https://sites.google.com/robotics.utias.utoronto.ca/frontiers-optimization-rss24/schedule
year: 2024
Expand Down
6 changes: 6 additions & 0 deletions generate.py
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ def _get_author_str(immut_author_list):

def _format_author_list(immut_author_list):
formatted_authors = []
author_not_found = False
for author in immut_author_list:
new_auth = author.split(", ")
assert len(new_auth) == 2
Expand All @@ -61,6 +62,7 @@ def _format_author_list(immut_author_list):
k = list(filter(lambda k: k in new_auth, author_urls.keys()))
if len(k) == 0 and config['name'] not in new_auth:
print(f"+ Author URL not found for {new_auth}")
author_not_found = True

new_auth = new_auth.replace(' ', ' ')
if len(k) > 0:
Expand All @@ -81,6 +83,10 @@ def _format_author_list(immut_author_list):
# if config['name'] in new_auth:
# new_auth = "<strong>" + new_auth + "</strong>"
formatted_authors.append(new_auth)

if author_not_found and config['error_without_author_url']:
raise ValueError('error: author URLs not found')

return formatted_authors

def _get_pub_str(pub, prefix, gidx, include_image):
Expand Down

0 comments on commit b6e3c25

Please sign in to comment.