Skip to content

Commit 228ee73

Browse files
committed
Fix usage of snippet
1 parent 64e8ee8 commit 228ee73

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

sphinxnotes/snippet/cli.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -148,9 +148,9 @@ def _on_command_get(args:argparse.Namespace):
148148
print('no such index ID', file=sys.stderr)
149149
sys.exit(1)
150150
if args.text:
151-
print('\n'.join(item.snippet.text()))
151+
print('\n'.join(item.snippet.rst))
152152
if args.file:
153-
print(item.snippet.file())
153+
print(item.snippet.file)
154154
if args.url:
155155
# HACK: get doc id in better way
156156
doc_id, _ = args.cache.index_id_to_doc_id.get(index_id)
@@ -159,13 +159,13 @@ def _on_command_get(args:argparse.Namespace):
159159
print(f'base URL for project {doc_id[0]} not configurated', file=sys.stderr)
160160
sys.exit(1)
161161
url = posixpath.join(base_url, doc_id[1] + '.html')
162-
if item.snippet.refid():
163-
url += '#' + item.snippet.refid()
162+
if item.snippet.refid:
163+
url += '#' + item.snippet.refid
164164
print(url)
165165
if args.line_start:
166-
print(item.snippet.scope()[0])
166+
print(item.snippet.lineno[0])
167167
if args.line_end:
168-
print(item.snippet.scope()[1])
168+
print(item.snippet.lineno[1])
169169

170170

171171
def _on_command_integration(args:argparse.Namespace):

0 commit comments

Comments
 (0)