This commit is contained in:
Justus Kuhlmann 2024-08-26 09:05:31 +00:00
parent b9ce012062
commit a908cc2f2c
12 changed files with 7 additions and 4 deletions

5
TODO.md Normal file
View file

@ -0,0 +1,5 @@
# TODO
## Features
- [ ] implement import of non-datalad projects
- [ ] implement a way to use another backlog repo as a project

View file

@ -19,19 +19,16 @@ def move_submodule(repo_path, old_path, new_path):
""" """
os.rename(os.path.join(repo_path, old_path), os.path.join(repo_path, new_path)) os.rename(os.path.join(repo_path, old_path), os.path.join(repo_path, new_path))
# Öffne die.gitmodules-Datei
gitmodules_file_path = os.path.join(repo_path, GITMODULES_FILE) gitmodules_file_path = os.path.join(repo_path, GITMODULES_FILE)
with open(gitmodules_file_path, 'r') as file: with open(gitmodules_file_path, 'r') as file:
lines = [line.strip() for line in file] lines = [line.strip() for line in file]
# Ersetzen aller Vorkommnisse von old_path durch new_path
updated_lines = [] updated_lines = []
for line in lines: for line in lines:
if old_path in line: if old_path in line:
line = line.replace(old_path, new_path) line = line.replace(old_path, new_path)
updated_lines.append(line) updated_lines.append(line)
# Speichen der aktualisierten.gitmodules-Datei
with open(gitmodules_file_path, 'w') as file: with open(gitmodules_file_path, 'w') as file:
file.write("\n".join(updated_lines)) file.write("\n".join(updated_lines))

View file

@ -41,5 +41,6 @@ def create(path):
os.chmod(path + '/backlogger.db', 0o666) # why does this not work? os.chmod(path + '/backlogger.db', 0o666) # why does this not work?
os.makedirs(path + '/projects') os.makedirs(path + '/projects')
os.makedirs(path + '/archive') os.makedirs(path + '/archive')
os.makedirs(path + '/toml_imports')
os.makedirs(path + '/import_scripts/template.py') os.makedirs(path + '/import_scripts/template.py')
dl.save(path, dataset=path, message="Initialize backlogger directory.") dl.save(path, dataset=path, message="Initialize backlogger directory.")

View file

@ -1,6 +1,6 @@
from setuptools import setup from setuptools import setup
setup(name='pyerrors_backlog', setup(name='pyerrors_corrlib',
version='0.0.1', version='0.0.1',
author='Justus Kuhlmann', author='Justus Kuhlmann',
author_email='j_kuhl19@uni-muenster.de', author_email='j_kuhl19@uni-muenster.de',

View file