Skip to content

Commit

Permalink
Stub for autots lists
Browse files Browse the repository at this point in the history
  • Loading branch information
Chris McKinney committed Jun 14, 2018
1 parent cf7be02 commit aee79c0
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 1 deletion.
2 changes: 1 addition & 1 deletion common/config.ini
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@

[TachibanaSite]
; TachibanaSite version number.
version = "1.8.7"
version = "1.8.7b"
; Title for the site (to use in <title>).
site_title = ""
; Path on disk corresponding to the URL `/`.
Expand Down
5 changes: 5 additions & 0 deletions modules/autots/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,7 @@ def main():
from .delete import delete
from .edit import create, edit
from .install import install, upgrade
from .lists import navlist, sidebar
from .overrides import copyright, header
# Parse and Execute
args = ARG_PARSER.parse_args()
Expand All @@ -60,8 +61,12 @@ def main():
status = header(args)
elif args.subcommand == 'install':
status = install(args)
elif args.subcommand == 'navlist':
status = navlist(args)
elif args.subcommand == 'upgrade':
status = upgrade(args)
elif args.subcommand == 'sidebar':
status = sidebar(args)
else:
print 'Unknown subcommand.'
status = 1
Expand Down
10 changes: 10 additions & 0 deletions modules/autots/arg_parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,11 +129,21 @@ def _create_parser():
help='Install TachibanaSite.')
install_parser.add_argument('-m', '--no-deps', action='store_false',
dest='deps', help="Don't attempt to install dependencies.")
# Navlist Subcommand
navlist_parser = subparsers.add_parser('navlist',
help='Set the items in the nav list.')
navlist_parser.add_argument('-e', '--editor',
help='The editor to use (e.g. nano, vim, emacs).')
# Upgrade Subcommand
upgrade_parser = subparsers.add_parser('upgrade',
help='Upgrade TachibanaSite.')
upgrade_parser.add_argument('-m', '--no-deps', action='store_false',
dest='deps', help="Don't attempt to install dependencies.")
# Sidebar Subcommand
sidebar_parser = subparsers.add_parser('sidebar',
help='Set the items in the sidebar.')
sidebar_parser.add_argument('-e', '--editor',
help='The editor to use (e.g. nano, vim, emacs).')
return parser

ARG_PARSER = _create_parser()
38 changes: 38 additions & 0 deletions modules/autots/lists.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
'''
File: ./modules/autots/lists.py
Author: Chris McKinney
Edited: Jun 14 2018
Editor: Chris McKinney
Description:
Script for managing a TachibanaSite install.
Edit History:
1.9.0 - Created module.
License:
Copyright 2018 Chris McKinney
Licensed under the Apache License, Version 2.0 (the "License"); you may not
use this file except in compliance with the License. You may obtain a copy
of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
'''

from .utils import *

def navlist(args):
pass

def sidebar(args):
pass

0 comments on commit aee79c0

Please sign in to comment.