#!/usr/bin/env python # Copyright (C) 2020 Copter Express Technologies # # Author: Oleg Kalachev # # Distributed under MIT License (available at https://opensource.org/licenses/MIT). # The above copyright notice and this permission notice shall be included in all # copies or substantial portions of the Software. # TODO: add custom header, footer # TODO: symlinks or copy param import os import shutil import rospkg rospack = rospkg.RosPack() www = rospkg.get_ros_home() + '/www' index_file = os.environ.get('ROSWWW_INDEX') default_package = os.environ.get('ROSWWW_DEFAULT') print('using www dir: ' + www) shutil.rmtree(www, ignore_errors=True) # reset www directory content os.mkdir(www) packages = rospack.list() index = '

Packages list

\n