Skip to content

Commit

Permalink
Merge pull request #174 from MikroElektronika/IvanRuzavin-patch-3
Browse files Browse the repository at this point in the history
Update add_extra_index_info.py
  • Loading branch information
StrahinjaJacimovic authored Dec 17, 2024
2 parents ef859b0 + 08dd2d6 commit 932e0d3
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions scripts/add_extra_index_info.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,12 +256,13 @@ def add(indexed_item_source, gh_token, es_index):
else:
download_database('https://github.com/MikroElektronika/core_packages/blob/main/necto_db.db?raw=true', db_path)

# Get extra info for boards
if indexed_item_source['category'] == 'Board Package':
doc_extra_info = form_extra_information('board', indexed_item_source['display_name'], indexed_item_source['download_link'], gh_token)
# Get extra info for cards
elif indexed_item_source['category'] == 'Card Package':
doc_extra_info = form_extra_information('card', indexed_item_source['display_name'], indexed_item_source['download_link'], gh_token)
if doc_extra_info != {}:
indexed_item_source.update(doc_extra_info)
print(f"INFO: Added \"extra_information\" to {indexed_item_source['name']}")
if 'category' in indexed_item_source:
# Get extra info for boards
if indexed_item_source['category'] == 'Board Package':
doc_extra_info = form_extra_information('board', indexed_item_source['display_name'], indexed_item_source['download_link'], gh_token)
# Get extra info for cards
elif indexed_item_source['category'] == 'Card Package':
doc_extra_info = form_extra_information('card', indexed_item_source['display_name'], indexed_item_source['download_link'], gh_token)
if doc_extra_info != {}:
indexed_item_source.update(doc_extra_info)
print(f"INFO: Added \"extra_information\" to {indexed_item_source['name']}")

0 comments on commit 932e0d3

Please sign in to comment.