Commit 4c056e06 authored by Emanuele Aina's avatar Emanuele Aina

Drop the dist/ folder and the apertis hotdoc extension

The dist/ folder and the apertis hotdoc extension contained there are not being
used nowadays and their purpose is lost in time.

Given that nobody complained, let's remove them to reduce the amount of cruft
we carry.
Signed-off-by: Emanuele Aina's avatarEmanuele Aina <emanuele.aina@collabora.com>
parent 45f5741c
......@@ -122,18 +122,6 @@ For contributors to the application developer portal (backworth), the steps to b
pip install hotdoc hotdoc-search-extension
```
* Navigate to the dist subdirectory:
```
cd dist
```
* Create an egg_info for the apertis extension:
```
python setup.py egg_info
```
* You can now build the documentation with the provided Makefile:
```
......
/node_modules
/dist_theme
all:
touch hotdoc.json && PYTHONPATH=${PWD}:${PYTHONPATH} hotdoc run
{
"output_format": "html",
"index": "../docs/index.md",
"output": "build",
"project_name": "AppDevDoc",
"extra_assets": ["../media"],
"sitemap": "../sitemap.txt",
"project_version": "0.1"
}
# -*- coding: utf-8 -*-
#
# Copyright © 2016 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
# Copyright © 2016 Collabora Ltd
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import os
import io
from hotdoc.core.base_extension import BaseExtension
from hotdoc.core.base_formatter import Formatter
DESCRIPTION=\
"""
Implements a formatter that outputs files more easily
usable in apertis SDK portal.
"""
class ApertisExtension(BaseExtension):
EXTENSION_NAME = 'apertis-extension'
argument_prefix = 'apertis'
def __init__(self, doc_repo):
BaseExtension.__init__(self, doc_repo)
def setup(self):
Formatter.writing_page_signal.connect(self.__writing_page_cb)
for ext in self.doc_repo.extensions.values():
formatter = ext.formatters.get('html')
here = os.path.dirname(__file__)
template_path = os.path.join(here, 'templates')
formatter.engine.loader.searchpath.insert(0, template_path)
def __writing_page_cb(self, formatter, page, path):
stripped = os.path.splitext(path)[0]
scripts = page.output_attrs['html']['scripts']
stylesheets = page.output_attrs['html']['stylesheets']
with io.open(stripped + '.scripts', 'w', encoding='utf-8') as _:
for script in scripts:
_.write(u'%s\n' % os.path.basename(script))
_.write(u'typeahead.jquery.js\n')
_.write(u'utils.js\n')
_.write(u'navigation.js\n')
_.write(u'search.js\n')
with io.open(stripped + '.stylesheets', 'w', encoding='utf-8') as _:
for stylesheet in stylesheets:
_.write(u'%s\n' % os.path.basename(stylesheet))
_.write(u'sidenav.css\n')
_.write(u'search.css\n')
_.write(u'tables.css\n')
def get_extension_classes():
return [ApertisExtension]
@require(page, assets_path, scripts, stylesheets)
<div id="main">
@def content():
@end
@content()
</div>
# -*- coding: utf-8 -*-
#
# Copyright © 2016 Mathieu Duponchelle <mathieu.duponchelle@opencreed.com>
# Copyright © 2016 Collabora Ltd
#
# This library is free software; you can redistribute it and/or modify it under
# the terms of the GNU Lesser General Public License as published by the Free
# Software Foundation; either version 2.1 of the License, or (at your option)
# any later version.
#
# This library is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
# FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more
# details.
#
# You should have received a copy of the GNU Lesser General Public License
# along with this library. If not, see <http://www.gnu.org/licenses/>.
import os
from setuptools import setup, find_packages
with open(os.path.join('hotdoc_apertis_extension', 'VERSION.txt'), 'r') as _:
VERSION = _.read().strip()
setup(
name = "hotdoc_apertis_extension",
version = VERSION,
keywords = "apertis hotdoc",
author_email = 'mathieu.duponchelle@opencreed.com',
license = 'LGPLv2.1+',
description = ("An extension to integrate hotdoc and apertis developer portal"),
author = "Mathieu Duponchelle",
packages = find_packages(),
package_data = {
'hotdoc_apertis_extension': ['VERSION.txt'],
},
entry_points = {'hotdoc.extensions': 'get_extension_classes = hotdoc_apertis_extension.apertis_extension:get_extension_classes'},
install_requires = [
]
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment