my.instapaper: use instapexport from PIP package
This commit is contained in:
parent
24fb983399
commit
3404b3fcf1
2 changed files with 5 additions and 23 deletions
|
@ -226,10 +226,6 @@ for cls, p in modules:
|
||||||
'''
|
'''
|
||||||
# path[s]/glob to the exported JSON data
|
# path[s]/glob to the exported JSON data
|
||||||
export_path : Paths
|
export_path : Paths
|
||||||
|
|
||||||
# path to a local clone of instapexport
|
|
||||||
# alternatively, you can put the repository (or a symlink) in $MY_CONFIG/my/config/repos/instapexport
|
|
||||||
instapexport: Optional[PathIsh] = None
|
|
||||||
#+end_src
|
#+end_src
|
||||||
** [[file:../my/github/gdpr.py][my.github.gdpr]]
|
** [[file:../my/github/gdpr.py][my.github.gdpr]]
|
||||||
|
|
||||||
|
|
|
@ -21,30 +21,16 @@ class instapaper(user_config):
|
||||||
# path[s]/glob to the exported JSON data
|
# path[s]/glob to the exported JSON data
|
||||||
export_path : Paths
|
export_path : Paths
|
||||||
|
|
||||||
# path to a local clone of instapexport
|
|
||||||
# alternatively, you can put the repository (or a symlink) in $MY_CONFIG/my/config/repos/instapexport
|
|
||||||
instapexport: Optional[PathIsh] = None
|
|
||||||
|
|
||||||
@property
|
|
||||||
def dal_module(self):
|
|
||||||
rpath = self.instapexport
|
|
||||||
if rpath is not None:
|
|
||||||
from .core.common import import_dir
|
|
||||||
return import_dir(rpath, '.dal')
|
|
||||||
else:
|
|
||||||
import my.config.repos.instapexport.dal as dal
|
|
||||||
return dal
|
|
||||||
|
|
||||||
|
|
||||||
from .core.cfg import make_config
|
from .core.cfg import make_config
|
||||||
config = make_config(instapaper)
|
config = make_config(instapaper)
|
||||||
|
|
||||||
|
|
||||||
from typing import TYPE_CHECKING
|
try:
|
||||||
if TYPE_CHECKING:
|
from instapexport import dal
|
||||||
import my.config.repos.instapexport.dal as dal
|
except ModuleNotFoundError as e:
|
||||||
else:
|
from .core.compat import pre_pip_dal_handler
|
||||||
dal = config.dal_module
|
dal = pre_pip_dal_handler('instapexport', e, config, requires=REQUIRES)
|
||||||
|
|
||||||
############################
|
############################
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue