Commit d0fbc439 authored by Jonas Smedegaard's avatar Jonas Smedegaard

New upstream version 0~20190225~dfsg1

parents 1a5bfa8f eb46cb13
[models]
dir = /Users/michele.pasin/.ontospy/models/
...@@ -8,7 +8,7 @@ ...@@ -8,7 +8,7 @@
# note: 1.8 major update with ontodocs split # note: 1.8 major update with ontodocs split
################## ##################
__version__ = "1.9.8.1" # Pypi latest: https://pypi.org/project/ontospy/ __version__ = "1.9.8.2" # Pypi latest: https://pypi.org/project/ontospy/
__copyright__ = "CopyRight (C) 2015-2018 by Michele Pasin" __copyright__ = "CopyRight (C) 2015-2018 by Michele Pasin"
__license__ = "GNU" __license__ = "GNU"
......
...@@ -43,17 +43,6 @@ from .core.ontospy import Ontospy ...@@ -43,17 +43,6 @@ from .core.ontospy import Ontospy
from .core.manager import * from .core.manager import *
from .core.utils import * from .core.utils import *
SHELL_EXAMPLES = """
#### LEGACY
Quick Examples:
> ontospy ~/Desktop/mymodel.rdf # ==> inspect a local RDF file
> ontospy lib -s # ==> list ontologies available in the local library
> ontospy lib --save http://xmlns.com/foaf/spec/ # ==> download FOAF vocabulary and save it in library
More info: <http://lambdamusic.github.io/Ontospy/>
------------
"""
CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help']) CONTEXT_SETTINGS = dict(help_option_names=['-h', '--help'])
...@@ -371,7 +360,7 @@ def lib(ctx, ...@@ -371,7 +360,7 @@ def lib(ctx,
if bootstrap: if bootstrap:
DONE_ACTION = True DONE_ACTION = True
action_bootstrap(verbose) action_bootstrap(verbose)
printDebug("Tip: you can now load an ontology by typing `ontospy -l`", printDebug("Tip: you can now load an ontology by typing `ontospy lib -s`",
"important") "important")
# raise SystemExit(1) # raise SystemExit(1)
...@@ -383,9 +372,6 @@ def lib(ctx, ...@@ -383,9 +372,6 @@ def lib(ctx,
if not filepath: if not filepath:
printDebug("Please specify a new directory for the local library.", printDebug("Please specify a new directory for the local library.",
'important') 'important')
printDebug(
"E.g. 'ontospy library --update /Users/john/ontologies'",
'tip')
sys.exit(0) sys.exit(0)
else: else:
_location = filepath[0] _location = filepath[0]
......
...@@ -162,7 +162,7 @@ def action_listlocal(all_details=True): ...@@ -162,7 +162,7 @@ def action_listlocal(all_details=True):
# printDebug("------------------", 'comment') # printDebug("------------------", 'comment')
if not options: if not options:
printDebug( printDebug(
"Your local library is empty. Use 'ontospy --bootstrap' to add some ontologies to it." "Your local library is empty. Use 'ontospy lib --bootstrap' to add some ontologies to it."
) )
return return
else: else:
......
...@@ -92,15 +92,16 @@ def get_localontologies(pattern=""): ...@@ -92,15 +92,16 @@ def get_localontologies(pattern=""):
"returns a list of file names in the ontologies folder (not the full path)" "returns a list of file names in the ontologies folder (not the full path)"
res = [] res = []
ONTOSPY_LOCAL_MODELS = get_home_location() ONTOSPY_LOCAL_MODELS = get_home_location()
if os.path.exists(ONTOSPY_LOCAL_MODELS): if not os.path.exists(ONTOSPY_LOCAL_MODELS):
for f in os.listdir(ONTOSPY_LOCAL_MODELS): get_or_create_home_repo()
if os.path.isfile(os.path.join(ONTOSPY_LOCAL_MODELS, f)): for f in os.listdir(ONTOSPY_LOCAL_MODELS):
if not f.startswith(".") and not f.endswith(".pickle"): if os.path.isfile(os.path.join(ONTOSPY_LOCAL_MODELS, f)):
if not pattern: if not f.startswith(".") and not f.endswith(".pickle"):
if not pattern:
res += [f]
else:
if pattern in f:
res += [f] res += [f]
else:
if pattern in f:
res += [f]
return res return res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment