Add script to launch md_browser against local file |
|||
Issue descriptionIt would be nice if you could type: md_browser my_doc_file.md ... and have md_browser launch, and then a browser window opened on the appropriate URL, saving time composing the URL.
,
Nov 5 2016
,
Nov 8 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/57ae508bce667f41d0e765004ac70f3c797d4e9f commit 57ae508bce667f41d0e765004ac70f3c797d4e9f Author: dpranke <dpranke@chromium.org> Date: Tue Nov 08 00:38:49 2016 Add support for opening MD files directly in md_browser. R=jsbell@chromium.org BUG= 598813 Review-Url: https://codereview.chromium.org/2476133002 Cr-Commit-Position: refs/heads/master@{#430445} [modify] https://crrev.com/57ae508bce667f41d0e765004ac70f3c797d4e9f/tools/md_browser/md_browser.py
,
Nov 15 2016
Close this now?
,
Nov 15 2016
Yup! |
|||
►
Sign in to add a comment |
|||
Comment 1 by jsb...@chromium.org
, Mar 29 2016My fragile bash version: #/usr/bin/env bash file=$(readlink -f "$1") if [ -z "$file" ]; then echo "fatal: Missing filename" 1>&2 exit -1 fi root=$(git rev-parse --show-toplevel 2> /dev/null) if [ -z "$root" ]; then echo "fatal: Not a git repository" 1>&2 exit -1 fi relative="${file#$root}" python -mwebbrowser "http://localhost:8080$relative" & python $root/tools/md_browser/md_browser.py wait