瀏覽代碼

fixed citation

Rodja Trappe 1 年之前
父節點
當前提交
baf87abe95
共有 2 個文件被更改,包括 7 次插入6 次删除
  1. 4 3
      .github/workflows/update_citation.py
  2. 3 3
      CITATION.cff

+ 4 - 3
.github/workflows/update_citation.py

@@ -7,7 +7,7 @@ import requests
 import yaml
 
 
-def get_infos() -> Tuple[str]:
+def get_infos() -> Tuple[str, str, str]:
     headers = {
         'Accept': 'application/json',
     }
@@ -24,8 +24,9 @@ def get_infos() -> Tuple[str]:
     except Exception:
         print('Error while getting the Zenodo infos')
         sys.exit(1)
-    data = response.json()[0]['metadata']
-    return data['doi'], data['version'], data['publication_date']
+    data = response.json()
+    metadata = data['hits']['hits'][0]['metadata']
+    return str(metadata['doi']), str(metadata['version']), str(metadata['publication_date'])
 
 
 if __name__ == '__main__':

+ 3 - 3
CITATION.cff

@@ -8,7 +8,7 @@ authors:
   given-names: Rodja
   orcid: https://orcid.org/0009-0009-4735-6227
 title: 'NiceGUI: Web-based user interfaces with Python. The nice way.'
-version: v1.3.16
-date-released: '2023-10-06'
+version: v1.4.2
+date-released: '2023-11-06'
 url: https://github.com/zauberzeug/nicegui
-doi: 10.5281/zenodo.8413612
+doi: 10.5281/zenodo.10075791