Compare commits
2 commits
59519eae3b
...
b0ef8c3fc0
| Author | SHA1 | Date | |
|---|---|---|---|
|
b0ef8c3fc0 |
|||
|
07173e4999 |
2 changed files with 3 additions and 3 deletions
|
|
@ -1,6 +1,5 @@
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
import sqlite3
|
import sqlite3
|
||||||
import datalad.api as dl
|
|
||||||
import os
|
import os
|
||||||
from .tracker import save, init
|
from .tracker import save, init
|
||||||
|
|
||||||
|
|
@ -63,7 +62,7 @@ def create(path: str) -> None:
|
||||||
Create folder of backlogs.
|
Create folder of backlogs.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
create(path)
|
init(path)
|
||||||
_create_db(os.path.join(path, 'backlogger.db'))
|
_create_db(os.path.join(path, 'backlogger.db'))
|
||||||
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
|
os.chmod(os.path.join(path, 'backlogger.db'), 0o666) # why does this not work?
|
||||||
_create_config(path)
|
_create_config(path)
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
import os
|
import os
|
||||||
from configparser import ConfigParser
|
from configparser import ConfigParser
|
||||||
from .trackers import datalad as dl
|
from .trackers import datalad as dl
|
||||||
|
from typing import Optional
|
||||||
|
|
||||||
|
|
||||||
def get_tracker(path: str) -> str:
|
def get_tracker(path: str) -> str:
|
||||||
|
|
@ -21,7 +22,7 @@ def get(path: str, file: str) -> None:
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
||||||
def save(path: str, message: str, files: list[str]) -> None:
|
def save(path: str, message: str, files: Optional[list[str]]=None) -> None:
|
||||||
tracker = get_tracker(path)
|
tracker = get_tracker(path)
|
||||||
if tracker == 'datalad':
|
if tracker == 'datalad':
|
||||||
dl.save(path, message, files)
|
dl.save(path, message, files)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue