adapt for updated pinboard DAL
This commit is contained in:
parent
83699695f9
commit
3dabd7ff46
1 changed files with 9 additions and 9 deletions
|
@ -1,18 +1,18 @@
|
||||||
from functools import lru_cache
|
from .common import get_files
|
||||||
from pathlib import Path
|
|
||||||
|
|
||||||
from mycfg.repos.pinbexport import model as pinbexport
|
from mycfg.repos.pinbexport import dal as pinbexport
|
||||||
from mycfg import paths
|
from mycfg import paths
|
||||||
|
|
||||||
# TODO would be nice to make interfaces available for mypy...
|
# TODO would be nice to make interfaces available for mypy...
|
||||||
Bookmark = pinbexport.Bookmark
|
Bookmark = pinbexport.Bookmark
|
||||||
|
|
||||||
def get_model():
|
|
||||||
export_dir = Path(paths.pinbexport.export_dir)
|
# yep; clearly looks that the purpose of my. package is to wire files to DAL implicitly; otherwise it's just passtrhough.
|
||||||
sources = list(sorted(export_dir.glob('*.json')))
|
def dal():
|
||||||
model = pinbexport.Model(sources)
|
sources = get_files(paths.pinbexport.export_dir, glob='*.json')
|
||||||
|
model = pinbexport.DAL(sources)
|
||||||
return model
|
return model
|
||||||
|
|
||||||
|
|
||||||
def get_bookmarks():
|
def bookmarks():
|
||||||
return get_model().bookmarks()
|
return dal().bookmarks()
|
||||||
|
|
Loading…
Add table
Reference in a new issue