import of non-datalad projects
This commit is contained in:
parent
496724091d
commit
ec63662359
2 changed files with 32 additions and 16 deletions
|
@ -3,12 +3,12 @@ import datalad.api as dl
|
|||
import os
|
||||
|
||||
|
||||
def _create_db(path):
|
||||
def _create_db(db):
|
||||
"""
|
||||
Create the database file and the table.
|
||||
|
||||
"""
|
||||
conn = sqlite3.connect(path)
|
||||
conn = sqlite3.connect(db)
|
||||
c = conn.cursor()
|
||||
c.execute('''CREATE TABLE IF NOT EXISTS backlogs
|
||||
(id INTEGER PRIMARY KEY,
|
||||
|
@ -38,9 +38,8 @@ def create(path):
|
|||
"""
|
||||
dl.create(path)
|
||||
_create_db(path + '/backlogger.db')
|
||||
os.chmod(path + '/backlogger.db', 0o666)
|
||||
os.chmod(path + '/backlogger.db', 0o666) # why does this not work?
|
||||
os.makedirs(path + '/projects')
|
||||
os.makedirs(path + '/projects/tmp')
|
||||
os.makedirs(path + '/archive')
|
||||
os.makedirs(path + '/import_scripts/template.py')
|
||||
dl.save(path, dataset=path, message="Initialize backlogger directory.")
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue