edit LaTEX => add relevance.tex edit title.tex cds_introduction_data_science_assignment.tex / edit zotero.py zotero_bibtex_configuration.yaml

This commit is contained in:
TheOriginalGraLargeShrimpakaReaper committed 2024-10-24 12:23:36 +02:00
1 parent b2ef658402
commit 00fad219c9
7 files changed
+39 -30

No files matched your search

+10 -9
View File
@@ -10,11 +10,11 @@ import yaml
# Load the Configurations
def load_configuration(zotero_conf_filename):
zotero_bibtex_config = dict()
zotero_conf_dir = os.path.join(os.path.dirname(os.getcwd()), 'code_configuration')
# zotero_conf_dir = os.path.join(os.path.dirname(os.getcwd()), 'code_configuration')
#
# yaml_path = os.path.join(zotero_conf_dir, zotero_conf_filename)
yaml_path = os.path.join(zotero_conf_dir, zotero_conf_filename)
with open(yaml_path, "r") as file:
with open(zotero_conf_filename, "r") as file:
zotero_bibtex_config = yaml.load(file, Loader=yaml.FullLoader)
return zotero_bibtex_config
@@ -159,9 +159,9 @@ def write_bibliography(zotero_data, zotero_bibtex_config):
keystore_path = zotero_bibtex_config.get('common').get('keystore_filepath')
tex_dir = os.path.join(os.path.dirname(os.getcwd()), keystore_path)
yaml_path = os.path.join(tex_dir, keystore_file)
#yaml_path = os.path.join(tex_dir, keystore_file)
with open(yaml_path, "r") as file:
with open(keystore_file, "r") as file:
zotero_bibtex_keys = yaml.load(file, Loader=yaml.FullLoader)
zotero_bibtex_keys_specials = {
@@ -177,12 +177,13 @@ def write_bibliography(zotero_data, zotero_bibtex_config):
# tex_dir = os.path.join(os.path.dirname(os.getcwd()), 'source')
bibtex_path = zotero_bibtex_config.get('common').get('bibtex_filepath')
# tex_dir = os.path.join(os.path.dirname(os.getcwd()), bibtex_path)
tex_dir = os.path.join(os.path.dirname(), bibtex_path)
#tex_dir = os.path.join(os.path.dirname(), bibtex_path)
# tex_dir = os.path.join(os.getcwd(), 'src', 'content')
# file_name = 'Datenbank_Projektauftrag_Michael_Graber.bib'
file_name = zotero_bibtex_config.get('common').get('bibtex_filename')
file_path = os.path.join(tex_dir, file_name)
#file_path = os.path.join(tex_dir, file_name)
file_path = os.path.join(bibtex_path, file_name)
# bib_datas = BibliographyData()
listKeys = list()
@@ -300,6 +301,6 @@ def write_bibliography(zotero_data, zotero_bibtex_config):
BibliographyData.to_file(bib_datas, file_path, bib_format="bibtex", encoding='utf-8')
zotero_bibtex_config = load_configuration('zotero_bibtex_configuration.yaml')
zotero_bibtex_config = load_configuration('/home/gra/PycharmProjects/cds_introduction_data_science_assignment/src/gra/zotero_bibtex_configuration.yaml')
zotero_data = get_data(zotero_bibtex_config)
write_bibliography(zotero_data, zotero_bibtex_config)
+4 -4
View File
@@ -6,7 +6,7 @@ private:
result_limit: 100
access_type: "groups"
zotero_access_id: "5665342"
collection_id: "EJKIYYMC"
collection_id: "YYVZPL7F"
api_key: "6Xgb3XhGjQXwA8NuZgu3bw3s"
# keystore_file: "zotero_biblatex_keystore.yaml"
# keystore_filepath: "code_configuration"
@@ -20,7 +20,7 @@ public:
collection_id: "V5VYIYTF"
api_key: "6Xgb3XhGjQXwA8NuZgu3bw3s"
common:
keystore_file: "zotero_biblatex_keystore.yaml"
keystore_file: "/home/gra/PycharmProjects/cds_introduction_data_science_assignment/src/gra/zotero_biblatex_keystore.yaml"
keystore_filepath: "code_configuration"
bibtex_filepath: "term-paper"
bibtex_filename: "cds_computer_science_project.bib"
bibtex_filepath: "/home/gra/PycharmProjects/cds_introduction_data_science_assignment/term-paper"
bibtex_filename: "cds_data_science.bib"