Skip to content
Snippets Groups Projects
Commit 8e0399ea authored by Mathieu Loiseau's avatar Mathieu Loiseau
Browse files

neutraliser le dossier de travail

parent 7f220e33
No related branches found
No related tags found
No related merge requests found
...@@ -4,8 +4,10 @@ import wikitextparser ...@@ -4,8 +4,10 @@ import wikitextparser
import importlib import importlib
import json import json
#version #version
import pathlib
the_path = pathlib.Path(__file__).parent.resolve()
import git import git
the_version = git.Repo(search_parent_directories=True).head.object.hexsha the_version = git.Repo(the_path).head.object.hexsha
#logging #logging
from wikstraklog import Wikstraklog from wikstraklog import Wikstraklog
...@@ -537,7 +539,7 @@ class ParserContext: ...@@ -537,7 +539,7 @@ class ParserContext:
class Wikstraktor: class Wikstraktor:
@classmethod @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: try:
m_name = f"{wiki_language}_{entry_language}".capitalize() m_name = f"{wiki_language}_{entry_language}".capitalize()
instance = getattr(importlib.import_module(f"parsers.{m_name.lower()}"), f"{m_name}_straktor")() instance = getattr(importlib.import_module(f"parsers.{m_name.lower()}"), f"{m_name}_straktor")()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment