From 8e0399ea0a74a9560acd770a0ca1b0bd18c2b3ba Mon Sep 17 00:00:00 2001
From: Mathieu Loiseau <mathieu.loiseau@liris.cnrs.fr>
Date: Thu, 11 Jan 2024 17:45:23 +0100
Subject: [PATCH] neutraliser le dossier de travail

---
 wikstraktor.py | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/wikstraktor.py b/wikstraktor.py
index 07853b2..0a00a04 100755
--- a/wikstraktor.py
+++ b/wikstraktor.py
@@ -4,8 +4,10 @@ import wikitextparser
 import importlib
 import json
 #version
+import pathlib
+the_path = pathlib.Path(__file__).parent.resolve()
 import git
-the_version = git.Repo(search_parent_directories=True).head.object.hexsha
+the_version = git.Repo(the_path).head.object.hexsha
 #logging
 from wikstraklog import Wikstraklog
 
@@ -537,7 +539,7 @@ class ParserContext:
 
 class Wikstraktor:
 	@classmethod
-	def get_instance(cls, wiki_language, entry_language, logfile="wikstraktor.sqlite"):
+	def get_instance(cls, wiki_language, entry_language, logfile=str(the_path)+"/wikstraktor.sqlite"):
 		try:
 			m_name = f"{wiki_language}_{entry_language}".capitalize()
 			instance = getattr(importlib.import_module(f"parsers.{m_name.lower()}"), f"{m_name}_straktor")()
-- 
GitLab