Added a post on commands, and revised commands.

This commit is contained in:
Ahmet Bakan 2015-02-02 23:20:25 -08:00
parent 9c8826daf6
commit 6790edb0d2
5 changed files with 170 additions and 466 deletions

View file

@ -5,7 +5,7 @@ import ablog
import argparse
def find_confdir():
def find_confdir(subparser):
from os.path import isfile, join, abspath
confdir = os.getcwd()
@ -22,9 +22,17 @@ def find_confdir():
if isfile(conf) and 'ablog' in open(conf).read():
return confdir
else:
return None
subparser.exit("Current directory and its parents doesn't "
"contain configuration file (conf.py).")
def read_conf(confdir):
sys.path.insert(0, confdir)
conf = __import__('conf')
sys.path.pop(0)
return conf
class ABlogVersion(argparse.Action):
@ -38,14 +46,14 @@ class ABlogVersion(argparse.Action):
ablog_parser = argparse.ArgumentParser(
description="ABlog for blogging with Sphinx",
epilog="See 'ablog <command> -h' for more information on a specific "
"command."
)
"command.")
ablog_parser.add_argument('-v', '--version',
help="print ABlog version and exit",
action=ABlogVersion, nargs=0)
from .start import ablog_start
ablog_commands = ablog_parser.add_subparsers(
title='subcommands')
@ -55,32 +63,72 @@ subparser.set_defaults(func=lambda ns: ablog_start())
subparser.set_defaults(subparser=subparser)
def ablog_build(**kwargs):
if 0:
def ablog_post(subparser, **kwargs):
conf = read_conf(find_confdir(subparser))
filename = kwargs['filename']
title = kwargs['title']
date_format = getattr(conf, 'post_date_format', '%b %d, %Y')
# add template here and create file
print('{} is ready to be edited.'.format(filename))
subparser = ablog_commands.add_parser('post',
help='post ',
version=ablog.__version__)
subparser.add_argument('filename', help='filename')
subparser.add_argument('-t', '--title', dest='title', type=str,
help='post title')
subparser.set_defaults(func=lambda ns: ablog_post(**ns.__dict__))
subparser.set_defaults(subparser=subparser)
def ablog_build(subparser, **kwargs):
confdir = find_confdir(subparser)
conf = read_conf(confdir)
website = (kwargs['website'] or
os.path.join(confdir, getattr(conf, 'ablog_builddir', '_website')))
doctrees = (kwargs['doctrees'] or
os.path.join(confdir, getattr(conf, 'ablog_doctrees', '_doctrees')))
sourcedir = (kwargs['sourcedir'] or confdir)
argv = sys.argv[:1]
argv.extend(['-b', kwargs['builder']])
argv.extend(['-d', kwargs['doctrees']])
argv.extend(['.', kwargs['outdir']])
argv.extend(['-b', kwargs['builder'] or getattr(conf, 'ablog_builder', 'dirhtml')])
argv.extend(['-d', doctrees])
argv.extend([sourcedir, website])
from sphinx import main
main(argv)
subparser = ablog_commands.add_parser('build',
help='build your blog project',
description="Build options can be set in conf.py. "
"Default values of path options are relative to conf.py.",
version=ablog.__version__)
subparser.add_argument('-b', '--builder', dest='builder', type=str,
default='dirhtml',
help='sphinx builder to use; default is `dirhtml`')
subparser.add_argument('-b', dest='builder', type=str,
help="builder to use, default is value of `ablog_builder` or dirhtml")
subparser.add_argument('-d', '--doctrees', dest='doctrees', type=str,
subparser.add_argument('-d', dest='doctrees', type=str,
default='_doctrees',
help='path for the cached environment and doctree files; default is `_doctrees`')
help="path for the cached environment and doctree files, "
"default is value of `ablog_doctrees` or _doctrees")
subparser.add_argument('-o', '--outdir', dest='outdir', type=str,
default='_output',
help='path for your; default is `_output`')
subparser.add_argument('-w', dest='website', type=str,
help="path for website, "
"default is value of `ablog_website` or _website")
subparser.add_argument('-s', dest='sourcedir', type=str,
help="root path for source files, "
"default is path to the folder that contains conf.py")
subparser.set_defaults(func=lambda ns: ablog_build(**ns.__dict__))
subparser.set_defaults(subparser=subparser)
@ -89,10 +137,8 @@ subparser.set_defaults(subparser=subparser)
def ablog_serve(subparser, **kwargs):
confdir = find_confdir()
if not confdir:
subparser.exit('Configuration file (conf.py) could not be found '
'in the current working directory and its parents.')
confdir = find_confdir(subparser)
conf = read_conf(confdir)
import SimpleHTTPServer
import SocketServer
@ -109,23 +155,23 @@ def ablog_serve(subparser, **kwargs):
print(msg)
print("Quit the server with CONTROL-C.")
outdir = os.path.join(confdir, kwargs['outdir'])
website = (kwargs['website'] or
os.path.join(confdir, getattr(conf, 'ablog_builddir', '_website')))
os.chdir(outdir)
os.chdir(website)
(webbrowser.open_new_tab('http://127.0.0.1:8000') and
httpd.serve_forever())
subparser = ablog_commands.add_parser('serve',
help='serve your project locally',
help='serve and view your project',
version=ablog.__version__)
subparser.add_argument('-o', '--outdir', dest='outdir', type=str,
default='_output',
help='path to your project built directory; default is `_output`')
subparser.add_argument('-w', dest='website', type=str,
help="path for website, "
"default is value of `ablog_website` or _website")
subparser.add_argument('-p', '--port', dest='port', type=int,
subparser.add_argument('-p', dest='port', type=int,
default=8000,
help='port number for HTTP server; default is 8000')
@ -135,6 +181,7 @@ subparser.set_defaults(subparser=subparser)
def ablog_main():

View file

@ -1,196 +0,0 @@
# Makefile for Sphinx documentation
#
# You can set these variables from the command line.
SPHINXOPTS = -T -P
SPHINXBUILD = sphinx-build
SPHINXBUILD3 = sphinx-build3
PAPER =
BUILDDIR = _build
# User-friendly check for sphinx-build
ifeq ($(shell which $(SPHINXBUILD) >/dev/null 2>&1; echo $$?), 1)
$(error The '$(SPHINXBUILD)' command was not found. Make sure you have Sphinx installed, then set the SPHINXBUILD environment variable to point to the full path of the '$(SPHINXBUILD)' executable. Alternatively you can add the directory with the executable to your PATH. If you don't have Sphinx installed, grab it from http://sphinx-doc.org/)
endif
# Internal variables.
PAPEROPT_a4 = -D latex_paper_size=a4
PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILDDIR)/doctrees $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
.PHONY: help clean html dirhtml singlehtml pickle json htmlhelp qthelp devhelp epub latex latexpdf text man changes linkcheck doctest gettext
help:
@echo "Please use \`make <target>' where <target> is one of"
@echo " html to make standalone HTML files"
@echo " dirhtml to make HTML files named index.html in directories"
@echo " singlehtml to make a single large HTML file"
@echo " pickle to make pickle files"
@echo " json to make JSON files"
@echo " htmlhelp to make HTML files and a HTML help project"
@echo " qthelp to make HTML files and a qthelp project"
@echo " devhelp to make HTML files and a Devhelp project"
@echo " epub to make an epub"
@echo " latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter"
@echo " latexpdf to make LaTeX files and run them through pdflatex"
@echo " latexpdfja to make LaTeX files and run them through platex/dvipdfmx"
@echo " text to make text files"
@echo " man to make manual pages"
@echo " texinfo to make Texinfo files"
@echo " info to make Texinfo files and run them through makeinfo"
@echo " gettext to make PO message catalogs"
@echo " changes to make an overview of all changed/added/deprecated items"
@echo " xml to make Docutils-native XML files"
@echo " pseudoxml to make pseudoxml-XML files for display purposes"
@echo " linkcheck to check all external links for integrity"
@echo " doctest to run all doctests embedded in the documentation (if enabled)"
install:
cd ..; pip install -U .
install3:
cd ..; pip3 install -U .
clean:
rm -rf $(BUILDDIR)/html/*
rm -rf $(BUILDDIR)/dirhtml/*
rm -rf $(BUILDDIR)/doctrees/*
html: install
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
html3: install3
$(SPHINXBUILD) -b html $(ALLSPHINXOPTS) $(BUILDDIR)/html
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/html."
dirhtml: install
$(SPHINXBUILD) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
dirhtml3: install3
$(SPHINXBUILD3) -b dirhtml $(ALLSPHINXOPTS) $(BUILDDIR)/dirhtml
@echo
@echo "Build finished. The HTML pages are in $(BUILDDIR)/dirhtml."
singlehtml:
$(SPHINXBUILD) -b singlehtml $(ALLSPHINXOPTS) $(BUILDDIR)/singlehtml
@echo
@echo "Build finished. The HTML page is in $(BUILDDIR)/singlehtml."
pickle:
$(SPHINXBUILD) -b pickle $(ALLSPHINXOPTS) $(BUILDDIR)/pickle
@echo
@echo "Build finished; now you can process the pickle files."
json:
$(SPHINXBUILD) -b json $(ALLSPHINXOPTS) $(BUILDDIR)/json
@echo
@echo "Build finished; now you can process the JSON files."
htmlhelp:
$(SPHINXBUILD) -b htmlhelp $(ALLSPHINXOPTS) $(BUILDDIR)/htmlhelp
@echo
@echo "Build finished; now you can run HTML Help Workshop with the" \
".hhp project file in $(BUILDDIR)/htmlhelp."
qthelp:
$(SPHINXBUILD) -b qthelp $(ALLSPHINXOPTS) $(BUILDDIR)/qthelp
@echo
@echo "Build finished; now you can run "qcollectiongenerator" with the" \
".qhcp project file in $(BUILDDIR)/qthelp, like this:"
@echo "# qcollectiongenerator $(BUILDDIR)/qthelp/ablog.qhcp"
@echo "To view the help file:"
@echo "# assistant -collectionFile $(BUILDDIR)/qthelp/ablog.qhc"
devhelp:
$(SPHINXBUILD) -b devhelp $(ALLSPHINXOPTS) $(BUILDDIR)/devhelp
@echo
@echo "Build finished."
@echo "To view the help file:"
@echo "# mkdir -p $$HOME/.local/share/devhelp/ablog"
@echo "# ln -s $(BUILDDIR)/devhelp $$HOME/.local/share/devhelp/ablog"
@echo "# devhelp"
epub:
$(SPHINXBUILD) -b epub $(ALLSPHINXOPTS) $(BUILDDIR)/epub
@echo
@echo "Build finished. The epub file is in $(BUILDDIR)/epub."
latex:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo
@echo "Build finished; the LaTeX files are in $(BUILDDIR)/latex."
@echo "Run \`make' in that directory to run these through (pdf)latex" \
"(use \`make latexpdf' here to do that automatically)."
latexpdf:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through pdflatex..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
latexpdfja:
$(SPHINXBUILD) -b latex $(ALLSPHINXOPTS) $(BUILDDIR)/latex
@echo "Running LaTeX files through platex and dvipdfmx..."
$(MAKE) -C $(BUILDDIR)/latex all-pdf-ja
@echo "pdflatex finished; the PDF files are in $(BUILDDIR)/latex."
text:
$(SPHINXBUILD) -b text $(ALLSPHINXOPTS) $(BUILDDIR)/text
@echo
@echo "Build finished. The text files are in $(BUILDDIR)/text."
man:
$(SPHINXBUILD) -b man $(ALLSPHINXOPTS) $(BUILDDIR)/man
@echo
@echo "Build finished. The manual pages are in $(BUILDDIR)/man."
texinfo:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo
@echo "Build finished. The Texinfo files are in $(BUILDDIR)/texinfo."
@echo "Run \`make' in that directory to run these through makeinfo" \
"(use \`make info' here to do that automatically)."
info:
$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(BUILDDIR)/texinfo
@echo "Running Texinfo files through makeinfo..."
make -C $(BUILDDIR)/texinfo info
@echo "makeinfo finished; the Info files are in $(BUILDDIR)/texinfo."
gettext:
$(SPHINXBUILD) -b gettext $(I18NSPHINXOPTS) $(BUILDDIR)/locale
@echo
@echo "Build finished. The message catalogs are in $(BUILDDIR)/locale."
changes:
$(SPHINXBUILD) -b changes $(ALLSPHINXOPTS) $(BUILDDIR)/changes
@echo
@echo "The overview file is in $(BUILDDIR)/changes."
linkcheck:
$(SPHINXBUILD) -b linkcheck $(ALLSPHINXOPTS) $(BUILDDIR)/linkcheck
@echo
@echo "Link check complete; look for any errors in the above output " \
"or in $(BUILDDIR)/linkcheck/output.txt."
doctest:
$(SPHINXBUILD) -b doctest $(ALLSPHINXOPTS) $(BUILDDIR)/doctest
@echo "Testing of doctests in the sources finished, look at the " \
"results in $(BUILDDIR)/doctest/output.txt."
xml:
$(SPHINXBUILD) -b xml $(ALLSPHINXOPTS) $(BUILDDIR)/xml
@echo
@echo "Build finished. The XML files are in $(BUILDDIR)/xml."
pseudoxml:
$(SPHINXBUILD) -b pseudoxml $(ALLSPHINXOPTS) $(BUILDDIR)/pseudoxml
@echo
@echo "Build finished. The pseudo-XML files are in $(BUILDDIR)/pseudoxml."

View file

@ -6,6 +6,9 @@ import sys
import alabaster
import ablog
ablog_builder = 'dirhtml'
ablog_website = '_website'
extensions = [
'sphinx.ext.autodoc',
'sphinx.ext.doctest',

View file

@ -1,242 +0,0 @@
@ECHO OFF
REM Command file for Sphinx documentation
if "%SPHINXBUILD%" == "" (
set SPHINXBUILD=sphinx-build
)
set BUILDDIR=_build
set ALLSPHINXOPTS=-d %BUILDDIR%/doctrees %SPHINXOPTS% .
set I18NSPHINXOPTS=%SPHINXOPTS% .
if NOT "%PAPER%" == "" (
set ALLSPHINXOPTS=-D latex_paper_size=%PAPER% %ALLSPHINXOPTS%
set I18NSPHINXOPTS=-D latex_paper_size=%PAPER% %I18NSPHINXOPTS%
)
if "%1" == "" goto help
if "%1" == "help" (
:help
echo.Please use `make ^<target^>` where ^<target^> is one of
echo. html to make standalone HTML files
echo. dirhtml to make HTML files named index.html in directories
echo. singlehtml to make a single large HTML file
echo. pickle to make pickle files
echo. json to make JSON files
echo. htmlhelp to make HTML files and a HTML help project
echo. qthelp to make HTML files and a qthelp project
echo. devhelp to make HTML files and a Devhelp project
echo. epub to make an epub
echo. latex to make LaTeX files, you can set PAPER=a4 or PAPER=letter
echo. text to make text files
echo. man to make manual pages
echo. texinfo to make Texinfo files
echo. gettext to make PO message catalogs
echo. changes to make an overview over all changed/added/deprecated items
echo. xml to make Docutils-native XML files
echo. pseudoxml to make pseudoxml-XML files for display purposes
echo. linkcheck to check all external links for integrity
echo. doctest to run all doctests embedded in the documentation if enabled
goto end
)
if "%1" == "clean" (
for /d %%i in (%BUILDDIR%\*) do rmdir /q /s %%i
del /q /s %BUILDDIR%\*
goto end
)
%SPHINXBUILD% 2> nul
if errorlevel 9009 (
echo.
echo.The 'sphinx-build' command was not found. Make sure you have Sphinx
echo.installed, then set the SPHINXBUILD environment variable to point
echo.to the full path of the 'sphinx-build' executable. Alternatively you
echo.may add the Sphinx directory to PATH.
echo.
echo.If you don't have Sphinx installed, grab it from
echo.http://sphinx-doc.org/
exit /b 1
)
if "%1" == "html" (
%SPHINXBUILD% -b html %ALLSPHINXOPTS% %BUILDDIR%/html
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/html.
goto end
)
if "%1" == "dirhtml" (
%SPHINXBUILD% -b dirhtml %ALLSPHINXOPTS% %BUILDDIR%/dirhtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/dirhtml.
goto end
)
if "%1" == "singlehtml" (
%SPHINXBUILD% -b singlehtml %ALLSPHINXOPTS% %BUILDDIR%/singlehtml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The HTML pages are in %BUILDDIR%/singlehtml.
goto end
)
if "%1" == "pickle" (
%SPHINXBUILD% -b pickle %ALLSPHINXOPTS% %BUILDDIR%/pickle
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the pickle files.
goto end
)
if "%1" == "json" (
%SPHINXBUILD% -b json %ALLSPHINXOPTS% %BUILDDIR%/json
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can process the JSON files.
goto end
)
if "%1" == "htmlhelp" (
%SPHINXBUILD% -b htmlhelp %ALLSPHINXOPTS% %BUILDDIR%/htmlhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run HTML Help Workshop with the ^
.hhp project file in %BUILDDIR%/htmlhelp.
goto end
)
if "%1" == "qthelp" (
%SPHINXBUILD% -b qthelp %ALLSPHINXOPTS% %BUILDDIR%/qthelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished; now you can run "qcollectiongenerator" with the ^
.qhcp project file in %BUILDDIR%/qthelp, like this:
echo.^> qcollectiongenerator %BUILDDIR%\qthelp\ablog.qhcp
echo.To view the help file:
echo.^> assistant -collectionFile %BUILDDIR%\qthelp\ablog.ghc
goto end
)
if "%1" == "devhelp" (
%SPHINXBUILD% -b devhelp %ALLSPHINXOPTS% %BUILDDIR%/devhelp
if errorlevel 1 exit /b 1
echo.
echo.Build finished.
goto end
)
if "%1" == "epub" (
%SPHINXBUILD% -b epub %ALLSPHINXOPTS% %BUILDDIR%/epub
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The epub file is in %BUILDDIR%/epub.
goto end
)
if "%1" == "latex" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
if errorlevel 1 exit /b 1
echo.
echo.Build finished; the LaTeX files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdf" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "latexpdfja" (
%SPHINXBUILD% -b latex %ALLSPHINXOPTS% %BUILDDIR%/latex
cd %BUILDDIR%/latex
make all-pdf-ja
cd %BUILDDIR%/..
echo.
echo.Build finished; the PDF files are in %BUILDDIR%/latex.
goto end
)
if "%1" == "text" (
%SPHINXBUILD% -b text %ALLSPHINXOPTS% %BUILDDIR%/text
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The text files are in %BUILDDIR%/text.
goto end
)
if "%1" == "man" (
%SPHINXBUILD% -b man %ALLSPHINXOPTS% %BUILDDIR%/man
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The manual pages are in %BUILDDIR%/man.
goto end
)
if "%1" == "texinfo" (
%SPHINXBUILD% -b texinfo %ALLSPHINXOPTS% %BUILDDIR%/texinfo
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The Texinfo files are in %BUILDDIR%/texinfo.
goto end
)
if "%1" == "gettext" (
%SPHINXBUILD% -b gettext %I18NSPHINXOPTS% %BUILDDIR%/locale
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The message catalogs are in %BUILDDIR%/locale.
goto end
)
if "%1" == "changes" (
%SPHINXBUILD% -b changes %ALLSPHINXOPTS% %BUILDDIR%/changes
if errorlevel 1 exit /b 1
echo.
echo.The overview file is in %BUILDDIR%/changes.
goto end
)
if "%1" == "linkcheck" (
%SPHINXBUILD% -b linkcheck %ALLSPHINXOPTS% %BUILDDIR%/linkcheck
if errorlevel 1 exit /b 1
echo.
echo.Link check complete; look for any errors in the above output ^
or in %BUILDDIR%/linkcheck/output.txt.
goto end
)
if "%1" == "doctest" (
%SPHINXBUILD% -b doctest %ALLSPHINXOPTS% %BUILDDIR%/doctest
if errorlevel 1 exit /b 1
echo.
echo.Testing of doctests in the sources finished, look at the ^
results in %BUILDDIR%/doctest/output.txt.
goto end
)
if "%1" == "xml" (
%SPHINXBUILD% -b xml %ALLSPHINXOPTS% %BUILDDIR%/xml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The XML files are in %BUILDDIR%/xml.
goto end
)
if "%1" == "pseudoxml" (
%SPHINXBUILD% -b pseudoxml %ALLSPHINXOPTS% %BUILDDIR%/pseudoxml
if errorlevel 1 exit /b 1
echo.
echo.Build finished. The pseudo-XML files are in %BUILDDIR%/pseudoxml.
goto end
)
:end

View file

@ -0,0 +1,92 @@
.. _commands:
ABlog Commands
==============
.. post:: Feb 1, 2015
:tags: config
:author: Ahmet
:category: Manual
:location: SF
`ablog` command is designed to streamline blog operations, i.e.
building, serving, and viewing blog pages, as well as starting a new
blog.
.. code-block:: sh
$ ablog
usage: ablog [-h] [-v] {start,post,build,serve} ...
ABlog for blogging with Sphinx
optional arguments:
-h, --help show this help message and exit
-v, --version print ABlog version and exit
subcommands:
{start,post,build,serve}
start start a new blog project
post post
build build your blog project
serve serve your project locally
See 'ablog <command> -h' for more information on a specific command.
`ablog start`
-------------
.. code-block:: sh
$ ablog start -h
usage: ablog start [-h]
optional arguments:
-h, --help show this help message and exit
`ablog build`
-------------
.. code-block:: sh
$ ablog build -h
usage: ablog build [-h] [-v] [-b BUILDER] [-d DOCTREES] [-w WEBSITE]
[-s SOURCEDIR]
Build options can be set in conf.py. Default values of path options are
relative to conf.py.
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-b BUILDER builder to use, default is value of `ablog_builder` or
dirhtml
-d DOCTREES path for the cached environment and doctree files, default is
value of `ablog_doctrees` or _doctrees
-w WEBSITE path for website, default is value of `ablog_website` or
_website
-s SOURCEDIR root path for source files, default is path to the folder
that contains conf.py
`ablog serve`
-------------
.. code-block:: sh
$ ablog serve -h
usage: ablog serve [-h] [-v] [-w WEBSITE] [-p PORT]
optional arguments:
-h, --help show this help message and exit
-v, --version show program's version number and exit
-w WEBSITE path for website, default is value of `ablog_website` or
_website
-p PORT port number for HTTP server; default is 8000