Skip to content

Commit 212b95f

Browse files
committed
Add recipe to resolving a link id
1 parent 354faf5 commit 212b95f

1 file changed

Lines changed: 17 additions & 1 deletion

File tree

tools/make/lib/links/links.mk

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,20 @@
11

22
# VARIABLES #
33

4-
# Define the command for returning a citation reference:
4+
# Define the command for inserting a link into the database:
55
LINKS_INSERT ?= $(NODE) $(TOOLS_DIR)/links/create/bin/cli
66

77
# Define the command-line options to be used when executing the command:
88
LINKS_INSERT_FLAGS ?= \
99
--database $(ROOT_DIR)/docs/links/database.json
1010

11+
# Define the command for resolving an id from a URI:
12+
LINKS_URI2ID ?= $(NODE) $(TOOLS_DIR)/links/uri2id/bin/cli
13+
14+
# Define the command-line options to be used when executing the command:
15+
LINKS_URI2ID_FLAGS ?= \
16+
--database $(ROOT_DIR)/docs/links/database.json
17+
1118

1219
# TARGETS #
1320

@@ -19,3 +26,12 @@ links-insert: $(NODE_MODULES)
1926
$(QUIET) $(LINKS_INSERT) $(LINKS_INSERT_FLAGS)
2027

2128
.PHONY: links-insert
29+
30+
# Resolve a link id.
31+
#
32+
# This target resolves a database link identifier from a URI.
33+
34+
links-uri2id: $(NODE_MODULES)
35+
$(QUIET) $(LINKS_URI2ID) $(LINKS_URI2ID_FLAGS)
36+
37+
.PHONY: links-uri2id

0 commit comments

Comments
 (0)