We are currently solving the following issue within our repository. Here is the issue text:
--- BEGIN ISSUE ---
nikola auto X doit auto
The nikola auto commands hides the doit auto command.

Both are useful...
What about renaming nikola auto to "liveroload" this way we can use both?

if you guys agree I will make a pull request.


--- END ISSUE ---

Below are some code segments, each from a relevant file. One or more of these files may contain bugs.
--- BEGIN FILES ---
Path: `nikola/main.py`
Content:
```
1 # -*- coding: utf-8 -*-
2 
3 # Copyright © 2012-2013 Roberto Alsina and others.
4 
5 # Permission is hereby granted, free of charge, to any
6 # person obtaining a copy of this software and associated
7 # documentation files (the "Software"), to deal in the
8 # Software without restriction, including without limitation
9 # the rights to use, copy, modify, merge, publish,
10 # distribute, sublicense, and/or sell copies of the
11 # Software, and to permit persons to whom the Software is
12 # furnished to do so, subject to the following conditions:
13 #
14 # The above copyright notice and this permission notice
15 # shall be included in all copies or substantial portions of
16 # the Software.
17 #
18 # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY
19 # KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20 # WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
21 # PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS
22 # OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR
23 # OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR
24 # OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
25 # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
26 
27 from __future__ import print_function, unicode_literals
28 from operator import attrgetter
29 import os
30 import shutil
31 import sys
32 import traceback
33 
34 from doit.loader import generate_tasks
35 from doit.cmd_base import TaskLoader
36 from doit.reporter import ExecutedOnlyReporter
37 from doit.doit_cmd import DoitMain
38 from doit.cmd_help import Help as DoitHelp
39 from doit.cmd_run import Run as DoitRun
40 from doit.cmd_clean import Clean as DoitClean
41 from logbook import NullHandler
42 
43 from . import __version__
44 from .nikola import Nikola
45 from .utils import _reload, sys_decode, get_root_dir, LOGGER, STRICT_HANDLER
46 
47 
48 config = {}
49 
50 
51 def main(args):
52     quiet = False
53     if len(args) > 0 and args[0] == 'build' and '--strict' in args:
54         LOGGER.notice('Running in strict mode')
55         STRICT_HANDLER.push_application()
56     if len(args) > 0 and args[0] == 'build' and '-q' in args or '--quiet' in args:
57         nullhandler = NullHandler()
58         nullhandler.push_application()
59         quiet = True
60     global config
61 
62     root = get_root_dir()
63     if root:
64         os.chdir(root)
65 
66     sys.path.append('')
67     try:
68         import conf
69         _reload(conf)
70         config = conf.__dict__
71     except Exception:
72         if os.path.exists('conf.py'):
73             msg = traceback.format_exc(0).splitlines()[1]
74             LOGGER.error('In conf.py line {0}: {1}'.format(sys.exc_info()[2].tb_lineno, msg))
75             sys.exit(1)
76         config = {}
77 
78     site = Nikola(**config)
79     return DoitNikola(site, quiet).run(args)
80 
81 
82 class Help(DoitHelp):
83     """show Nikola usage instead of doit """
84 
85     @staticmethod
86     def print_usage(cmds):
87         """print nikola "usage" (basic help) instructions"""
88         print("Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com\n\n")
89         print("Available commands:")
90         for cmd in sorted(cmds.values(), key=attrgetter('name')):
91             print("  nikola %-*s %s" % (20, cmd.name, cmd.doc_purpose))
92         print("")
93         print("  nikola help                 show help / reference")
94         print("  nikola help <command>       show command usage")
95         print("  nikola help <task-name>     show task usage")
96 
97 
98 class Build(DoitRun):
99     """expose "run" command as "build" for backward compatibility"""
100     def __init__(self, *args, **kw):
101         opts = list(self.cmd_options)
102         opts.append(
103             {
104                 'name': 'strict',
105                 'long': 'strict',
106                 'default': False,
107                 'type': bool,
108                 'help': "Fail on things that would normally be warnings.",
109             }
110         )
111         opts.append(
112             {
113                 'name': 'quiet',
114                 'long': 'quiet',
115                 'short': 'q',
116                 'default': False,
117                 'type': bool,
118                 'help': "Run quietly.",
119             }
120         )
121         self.cmd_options = tuple(opts)
122         super(Build, self).__init__(*args, **kw)
123 
124 
125 class Clean(DoitClean):
126     """A clean that removes cache/"""
127 
128     def clean_tasks(self, tasks, dryrun):
129         if not dryrun and config:
130             cache_folder = config.get('CACHE_FOLDER', 'cache')
131             if os.path.exists(cache_folder):
132                 shutil.rmtree(cache_folder)
133         return super(Clean, self).clean_tasks(tasks, dryrun)
134 
135 
136 class NikolaTaskLoader(TaskLoader):
137     """custom task loader to get tasks from Nikola instead of dodo.py file"""
138     def __init__(self, nikola, quiet=False):
139         self.nikola = nikola
140         self.quiet = quiet
141 
142     def load_tasks(self, cmd, opt_values, pos_args):
143         if self.quiet:
144             DOIT_CONFIG = {
145                 'verbosity': 0,
146                 'reporter': 'zero',
147             }
148         else:
149             DOIT_CONFIG = {
150                 'reporter': ExecutedOnlyReporter,
151             }
152         DOIT_CONFIG['default_tasks'] = ['render_site', 'post_render']
153         tasks = generate_tasks(
154             'render_site',
155             self.nikola.gen_tasks('render_site', "Task", 'Group of tasks to render the site.'))
156         latetasks = generate_tasks(
157             'post_render',
158             self.nikola.gen_tasks('post_render', "LateTask", 'Group of tasks to be executes after site is rendered.'))
159         return tasks + latetasks, DOIT_CONFIG
160 
161 
162 class DoitNikola(DoitMain):
163     # overwite help command
164     DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean]
165     TASK_LOADER = NikolaTaskLoader
166 
167     def __init__(self, nikola, quiet=False):
168         self.nikola = nikola
169         self.task_loader = self.TASK_LOADER(nikola, quiet)
170 
171     def get_commands(self):
172         # core doit commands
173         cmds = DoitMain.get_commands(self)
174         # load nikola commands
175         for name, cmd in self.nikola.commands.items():
176             cmds[name] = cmd
177         return cmds
178 
179     def run(self, cmd_args):
180         sub_cmds = self.get_commands()
181         args = self.process_args(cmd_args)
182         args = [sys_decode(arg) for arg in args]
183 
184         if len(args) == 0 or any(arg in ["--help", '-h'] for arg in args):
185             cmd_args = ['help']
186             args = ['help']
187             # Hide run because Nikola uses build
188             sub_cmds.pop('run')
189 
190         if len(args) == 0 or args[0] not in sub_cmds.keys() or \
191                 args[0] == 'build':
192             # Check for conf.py before launching run
193             if not self.nikola.configured:
194                 LOGGER.error("This command needs to run inside an "
195                              "existing Nikola site.")
196                 return False
197         return super(DoitNikola, self).run(cmd_args)
198 
199     @staticmethod
200     def print_version():
201         print("Nikola version " + __version__)
202
```
--- END FILES ---

Please first localize the bug based on the issue statement, and then generate a patch according to the `git diff` format fenced by three backticks.

Here is an example:

```diff
diff --git a/examples/server_async.py b/examples/server_async.py
--- a/examples/server_async.py
+++ b/examples/server_async.py
@@ -313,4 +313,4 @@
 
 
 if __name__ == "__main__":
-    asyncio.run(run_async_server("."), debug=True)
+    asyncio.run(run_async_server(), debug=True)
diff --git a/examples/server_sync.py b/examples/server_sync.py
--- a/examples/server_sync.py
+++ b/examples/server_sync.py
@@ -313,5 +313,5 @@
 
 
 if __name__ == "__main__":
-    server = run_sync_server(".")
+    server = run_sync_server()
     server.shutdown()

```

diff --git a/nikola/main.py b/nikola/main.py
--- a/nikola/main.py
+++ b/nikola/main.py
@@ -38,6 +38,7 @@
 from doit.cmd_help import Help as DoitHelp
 from doit.cmd_run import Run as DoitRun
 from doit.cmd_clean import Clean as DoitClean
+from doit.cmd_auto import Auto as DoitAuto
 from logbook import NullHandler
 
 from . import __version__
@@ -132,6 +133,10 @@
                 shutil.rmtree(cache_folder)
         return super(Clean, self).clean_tasks(tasks, dryrun)
 
+# Nikola has its own "auto" commands that uses livereload.
+# Expose original doit "auto" command as "doit_auto".
+DoitAuto.name = 'doit_auto'
+
 
 class NikolaTaskLoader(TaskLoader):
     """custom task loader to get tasks from Nikola instead of dodo.py file"""
@@ -161,7 +166,7 @@
 
 class DoitNikola(DoitMain):
     # overwite help command
-    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean]
+    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean, DoitAuto]
     TASK_LOADER = NikolaTaskLoader
 
     def __init__(self, nikola, quiet=False):

{"golden_diff": "diff --git a/nikola/main.py b/nikola/main.py\n--- a/nikola/main.py\n+++ b/nikola/main.py\n@@ -38,6 +38,7 @@\n from doit.cmd_help import Help as DoitHelp\n from doit.cmd_run import Run as DoitRun\n from doit.cmd_clean import Clean as DoitClean\n+from doit.cmd_auto import Auto as DoitAuto\n from logbook import NullHandler\n \n from . import __version__\n@@ -132,6 +133,10 @@\n                 shutil.rmtree(cache_folder)\n         return super(Clean, self).clean_tasks(tasks, dryrun)\n \n+# Nikola has its own \"auto\" commands that uses livereload.\n+# Expose original doit \"auto\" command as \"doit_auto\".\n+DoitAuto.name = 'doit_auto'\n+\n \n class NikolaTaskLoader(TaskLoader):\n     \"\"\"custom task loader to get tasks from Nikola instead of dodo.py file\"\"\"\n@@ -161,7 +166,7 @@\n \n class DoitNikola(DoitMain):\n     # overwite help command\n-    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean]\n+    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean, DoitAuto]\n     TASK_LOADER = NikolaTaskLoader\n \n     def __init__(self, nikola, quiet=False):\n", "issue": "nikola auto X doit auto\nThe nikola auto commands hides the doit auto command.\n\nBoth are useful...\nWhat about renaming nikola auto to \"liveroload\" this way we can use both?\n\nif you guys agree I will make a pull request.\n\n", "before_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2013 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfrom __future__ import print_function, unicode_literals\nfrom operator import attrgetter\nimport os\nimport shutil\nimport sys\nimport traceback\n\nfrom doit.loader import generate_tasks\nfrom doit.cmd_base import TaskLoader\nfrom doit.reporter import ExecutedOnlyReporter\nfrom doit.doit_cmd import DoitMain\nfrom doit.cmd_help import Help as DoitHelp\nfrom doit.cmd_run import Run as DoitRun\nfrom doit.cmd_clean import Clean as DoitClean\nfrom logbook import NullHandler\n\nfrom . import __version__\nfrom .nikola import Nikola\nfrom .utils import _reload, sys_decode, get_root_dir, LOGGER, STRICT_HANDLER\n\n\nconfig = {}\n\n\ndef main(args):\n    quiet = False\n    if len(args) > 0 and args[0] == 'build' and '--strict' in args:\n        LOGGER.notice('Running in strict mode')\n        STRICT_HANDLER.push_application()\n    if len(args) > 0 and args[0] == 'build' and '-q' in args or '--quiet' in args:\n        nullhandler = NullHandler()\n        nullhandler.push_application()\n        quiet = True\n    global config\n\n    root = get_root_dir()\n    if root:\n        os.chdir(root)\n\n    sys.path.append('')\n    try:\n        import conf\n        _reload(conf)\n        config = conf.__dict__\n    except Exception:\n        if os.path.exists('conf.py'):\n            msg = traceback.format_exc(0).splitlines()[1]\n            LOGGER.error('In conf.py line {0}: {1}'.format(sys.exc_info()[2].tb_lineno, msg))\n            sys.exit(1)\n        config = {}\n\n    site = Nikola(**config)\n    return DoitNikola(site, quiet).run(args)\n\n\nclass Help(DoitHelp):\n    \"\"\"show Nikola usage instead of doit \"\"\"\n\n    @staticmethod\n    def print_usage(cmds):\n        \"\"\"print nikola \"usage\" (basic help) instructions\"\"\"\n        print(\"Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com\\n\\n\")\n        print(\"Available commands:\")\n        for cmd in sorted(cmds.values(), key=attrgetter('name')):\n            print(\"  nikola %-*s %s\" % (20, cmd.name, cmd.doc_purpose))\n        print(\"\")\n        print(\"  nikola help                 show help / reference\")\n        print(\"  nikola help <command>       show command usage\")\n        print(\"  nikola help <task-name>     show task usage\")\n\n\nclass Build(DoitRun):\n    \"\"\"expose \"run\" command as \"build\" for backward compatibility\"\"\"\n    def __init__(self, *args, **kw):\n        opts = list(self.cmd_options)\n        opts.append(\n            {\n                'name': 'strict',\n                'long': 'strict',\n                'default': False,\n                'type': bool,\n                'help': \"Fail on things that would normally be warnings.\",\n            }\n        )\n        opts.append(\n            {\n                'name': 'quiet',\n                'long': 'quiet',\n                'short': 'q',\n                'default': False,\n                'type': bool,\n                'help': \"Run quietly.\",\n            }\n        )\n        self.cmd_options = tuple(opts)\n        super(Build, self).__init__(*args, **kw)\n\n\nclass Clean(DoitClean):\n    \"\"\"A clean that removes cache/\"\"\"\n\n    def clean_tasks(self, tasks, dryrun):\n        if not dryrun and config:\n            cache_folder = config.get('CACHE_FOLDER', 'cache')\n            if os.path.exists(cache_folder):\n                shutil.rmtree(cache_folder)\n        return super(Clean, self).clean_tasks(tasks, dryrun)\n\n\nclass NikolaTaskLoader(TaskLoader):\n    \"\"\"custom task loader to get tasks from Nikola instead of dodo.py file\"\"\"\n    def __init__(self, nikola, quiet=False):\n        self.nikola = nikola\n        self.quiet = quiet\n\n    def load_tasks(self, cmd, opt_values, pos_args):\n        if self.quiet:\n            DOIT_CONFIG = {\n                'verbosity': 0,\n                'reporter': 'zero',\n            }\n        else:\n            DOIT_CONFIG = {\n                'reporter': ExecutedOnlyReporter,\n            }\n        DOIT_CONFIG['default_tasks'] = ['render_site', 'post_render']\n        tasks = generate_tasks(\n            'render_site',\n            self.nikola.gen_tasks('render_site', \"Task\", 'Group of tasks to render the site.'))\n        latetasks = generate_tasks(\n            'post_render',\n            self.nikola.gen_tasks('post_render', \"LateTask\", 'Group of tasks to be executes after site is rendered.'))\n        return tasks + latetasks, DOIT_CONFIG\n\n\nclass DoitNikola(DoitMain):\n    # overwite help command\n    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean]\n    TASK_LOADER = NikolaTaskLoader\n\n    def __init__(self, nikola, quiet=False):\n        self.nikola = nikola\n        self.task_loader = self.TASK_LOADER(nikola, quiet)\n\n    def get_commands(self):\n        # core doit commands\n        cmds = DoitMain.get_commands(self)\n        # load nikola commands\n        for name, cmd in self.nikola.commands.items():\n            cmds[name] = cmd\n        return cmds\n\n    def run(self, cmd_args):\n        sub_cmds = self.get_commands()\n        args = self.process_args(cmd_args)\n        args = [sys_decode(arg) for arg in args]\n\n        if len(args) == 0 or any(arg in [\"--help\", '-h'] for arg in args):\n            cmd_args = ['help']\n            args = ['help']\n            # Hide run because Nikola uses build\n            sub_cmds.pop('run')\n\n        if len(args) == 0 or args[0] not in sub_cmds.keys() or \\\n                args[0] == 'build':\n            # Check for conf.py before launching run\n            if not self.nikola.configured:\n                LOGGER.error(\"This command needs to run inside an \"\n                             \"existing Nikola site.\")\n                return False\n        return super(DoitNikola, self).run(cmd_args)\n\n    @staticmethod\n    def print_version():\n        print(\"Nikola version \" + __version__)\n", "path": "nikola/main.py"}], "after_files": [{"content": "# -*- coding: utf-8 -*-\n\n# Copyright \u00a9 2012-2013 Roberto Alsina and others.\n\n# Permission is hereby granted, free of charge, to any\n# person obtaining a copy of this software and associated\n# documentation files (the \"Software\"), to deal in the\n# Software without restriction, including without limitation\n# the rights to use, copy, modify, merge, publish,\n# distribute, sublicense, and/or sell copies of the\n# Software, and to permit persons to whom the Software is\n# furnished to do so, subject to the following conditions:\n#\n# The above copyright notice and this permission notice\n# shall be included in all copies or substantial portions of\n# the Software.\n#\n# THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY\n# KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE\n# WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR\n# PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS\n# OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR\n# OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n# OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\n# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nfrom __future__ import print_function, unicode_literals\nfrom operator import attrgetter\nimport os\nimport shutil\nimport sys\nimport traceback\n\nfrom doit.loader import generate_tasks\nfrom doit.cmd_base import TaskLoader\nfrom doit.reporter import ExecutedOnlyReporter\nfrom doit.doit_cmd import DoitMain\nfrom doit.cmd_help import Help as DoitHelp\nfrom doit.cmd_run import Run as DoitRun\nfrom doit.cmd_clean import Clean as DoitClean\nfrom doit.cmd_auto import Auto as DoitAuto\nfrom logbook import NullHandler\n\nfrom . import __version__\nfrom .nikola import Nikola\nfrom .utils import _reload, sys_decode, get_root_dir, LOGGER, STRICT_HANDLER\n\n\nconfig = {}\n\n\ndef main(args):\n    quiet = False\n    if len(args) > 0 and args[0] == 'build' and '--strict' in args:\n        LOGGER.notice('Running in strict mode')\n        STRICT_HANDLER.push_application()\n    if len(args) > 0 and args[0] == 'build' and '-q' in args or '--quiet' in args:\n        nullhandler = NullHandler()\n        nullhandler.push_application()\n        quiet = True\n    global config\n\n    root = get_root_dir()\n    if root:\n        os.chdir(root)\n\n    sys.path.append('')\n    try:\n        import conf\n        _reload(conf)\n        config = conf.__dict__\n    except Exception:\n        if os.path.exists('conf.py'):\n            msg = traceback.format_exc(0).splitlines()[1]\n            LOGGER.error('In conf.py line {0}: {1}'.format(sys.exc_info()[2].tb_lineno, msg))\n            sys.exit(1)\n        config = {}\n\n    site = Nikola(**config)\n    return DoitNikola(site, quiet).run(args)\n\n\nclass Help(DoitHelp):\n    \"\"\"show Nikola usage instead of doit \"\"\"\n\n    @staticmethod\n    def print_usage(cmds):\n        \"\"\"print nikola \"usage\" (basic help) instructions\"\"\"\n        print(\"Nikola is a tool to create static websites and blogs. For full documentation and more information, please visit http://getnikola.com\\n\\n\")\n        print(\"Available commands:\")\n        for cmd in sorted(cmds.values(), key=attrgetter('name')):\n            print(\"  nikola %-*s %s\" % (20, cmd.name, cmd.doc_purpose))\n        print(\"\")\n        print(\"  nikola help                 show help / reference\")\n        print(\"  nikola help <command>       show command usage\")\n        print(\"  nikola help <task-name>     show task usage\")\n\n\nclass Build(DoitRun):\n    \"\"\"expose \"run\" command as \"build\" for backward compatibility\"\"\"\n    def __init__(self, *args, **kw):\n        opts = list(self.cmd_options)\n        opts.append(\n            {\n                'name': 'strict',\n                'long': 'strict',\n                'default': False,\n                'type': bool,\n                'help': \"Fail on things that would normally be warnings.\",\n            }\n        )\n        opts.append(\n            {\n                'name': 'quiet',\n                'long': 'quiet',\n                'short': 'q',\n                'default': False,\n                'type': bool,\n                'help': \"Run quietly.\",\n            }\n        )\n        self.cmd_options = tuple(opts)\n        super(Build, self).__init__(*args, **kw)\n\n\nclass Clean(DoitClean):\n    \"\"\"A clean that removes cache/\"\"\"\n\n    def clean_tasks(self, tasks, dryrun):\n        if not dryrun and config:\n            cache_folder = config.get('CACHE_FOLDER', 'cache')\n            if os.path.exists(cache_folder):\n                shutil.rmtree(cache_folder)\n        return super(Clean, self).clean_tasks(tasks, dryrun)\n\n# Nikola has its own \"auto\" commands that uses livereload.\n# Expose original doit \"auto\" command as \"doit_auto\".\nDoitAuto.name = 'doit_auto'\n\n\nclass NikolaTaskLoader(TaskLoader):\n    \"\"\"custom task loader to get tasks from Nikola instead of dodo.py file\"\"\"\n    def __init__(self, nikola, quiet=False):\n        self.nikola = nikola\n        self.quiet = quiet\n\n    def load_tasks(self, cmd, opt_values, pos_args):\n        if self.quiet:\n            DOIT_CONFIG = {\n                'verbosity': 0,\n                'reporter': 'zero',\n            }\n        else:\n            DOIT_CONFIG = {\n                'reporter': ExecutedOnlyReporter,\n            }\n        DOIT_CONFIG['default_tasks'] = ['render_site', 'post_render']\n        tasks = generate_tasks(\n            'render_site',\n            self.nikola.gen_tasks('render_site', \"Task\", 'Group of tasks to render the site.'))\n        latetasks = generate_tasks(\n            'post_render',\n            self.nikola.gen_tasks('post_render', \"LateTask\", 'Group of tasks to be executes after site is rendered.'))\n        return tasks + latetasks, DOIT_CONFIG\n\n\nclass DoitNikola(DoitMain):\n    # overwite help command\n    DOIT_CMDS = list(DoitMain.DOIT_CMDS) + [Help, Build, Clean, DoitAuto]\n    TASK_LOADER = NikolaTaskLoader\n\n    def __init__(self, nikola, quiet=False):\n        self.nikola = nikola\n        self.task_loader = self.TASK_LOADER(nikola, quiet)\n\n    def get_commands(self):\n        # core doit commands\n        cmds = DoitMain.get_commands(self)\n        # load nikola commands\n        for name, cmd in self.nikola.commands.items():\n            cmds[name] = cmd\n        return cmds\n\n    def run(self, cmd_args):\n        sub_cmds = self.get_commands()\n        args = self.process_args(cmd_args)\n        args = [sys_decode(arg) for arg in args]\n\n        if len(args) == 0 or any(arg in [\"--help\", '-h'] for arg in args):\n            cmd_args = ['help']\n            args = ['help']\n            # Hide run because Nikola uses build\n            sub_cmds.pop('run')\n\n        if len(args) == 0 or args[0] not in sub_cmds.keys() or \\\n                args[0] == 'build':\n            # Check for conf.py before launching run\n            if not self.nikola.configured:\n                LOGGER.error(\"This command needs to run inside an \"\n                             \"existing Nikola site.\")\n                return False\n        return super(DoitNikola, self).run(cmd_args)\n\n    @staticmethod\n    def print_version():\n        print(\"Nikola version \" + __version__)\n", "path": "nikola/main.py"}]}