Skip to content

Commit

Permalink
Merge pull request #2 from spjmurray/url_paths
Browse files Browse the repository at this point in the history
Better Address Notification
  • Loading branch information
spjmurray authored Sep 26, 2018
2 parents 47ab34f + aca157b commit bbc83e2
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion src/run
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,15 @@ def init_repo(args):
os.chdir(ANTORA_HOME + '/' + BASE_REPO)
Executor.execute(['antora', PLAYBOOK])

# Calculate the URL to report back to the user
with open(MODULE_REPO_PATH + args.path + '/antora.yml') as filedesc:
module = yaml.load(filedesc.read())

page, _ = os.path.splitext(module['start_page'].split(':')[1])
url = module['name'] + '/' + module['version'] + '/' + page + '.html'

logging.info('Serving content on http://localhost:8080/%s', url)


def init_httpd():
"""Start the HTTP daemon when the vhost directory is created"""
Expand All @@ -104,7 +113,7 @@ def init_httpd():
def init_slumber():
"""Sleep until we are killed"""

logging.info('Serving content on http://localhost:8080, press Ctl+C to exit ...')
logging.info('Press Ctl+C to exit ...')
while True:
time.sleep(10)

Expand Down

0 comments on commit bbc83e2

Please sign in to comment.