-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
moved CEURWS cache config to separate config.py file
- Loading branch information
Showing
5 changed files
with
36 additions
and
32 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,27 @@ | ||
import os | ||
from pathlib import Path | ||
|
||
from lodstorage.storageconfig import StorageConfig | ||
|
||
|
||
class CEURWS: | ||
""" | ||
CEUR-WS | ||
""" | ||
|
||
@staticmethod | ||
def get_home_path() -> Path: | ||
""" | ||
Get home path | ||
""" | ||
home = Path.home() | ||
if "GITHUB_WORKSPACE" in os.environ: | ||
home = Path(os.environ["GITHUB_WORKSPACE"]) | ||
return home | ||
|
||
URL = "http://ceur-ws.org" | ||
home = get_home_path() | ||
CACHE_DIR = home.joinpath(".ceurws") | ||
CACHE_FILE = CACHE_DIR.joinpath("ceurws.db") | ||
CACHE_HTML = CACHE_DIR.joinpath("index.html") | ||
CONFIG = StorageConfig(cacheFile=str(CACHE_FILE)) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters