MoinLight

Annotated moinformat/output/standalone.py

176:47af441b48bf
2018-11-26 Paul Boddie Support linking to stylesheets based on the collection of available files.
paul@104 1
#!/usr/bin/env python
paul@104 2
paul@104 3
"""
paul@104 4
Stand-alone output context.
paul@104 5
paul@104 6
Copyright (C) 2018 Paul Boddie <paul@boddie.org.uk>
paul@104 7
paul@104 8
This program is free software; you can redistribute it and/or modify it under
paul@104 9
the terms of the GNU General Public License as published by the Free Software
paul@104 10
Foundation; either version 3 of the License, or (at your option) any later
paul@104 11
version.
paul@104 12
paul@104 13
This program is distributed in the hope that it will be useful, but WITHOUT
paul@104 14
ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
paul@104 15
FOR A PARTICULAR PURPOSE.  See the GNU General Public License for more
paul@104 16
details.
paul@104 17
paul@104 18
You should have received a copy of the GNU General Public License along with
paul@104 19
this program.  If not, see <http://www.gnu.org/licenses/>.
paul@104 20
"""
paul@104 21
paul@104 22
from moinformat.output.common import Output
paul@104 23
paul@104 24
class StandaloneOutput(Output):
paul@104 25
paul@104 26
    "A stand-alone output context."
paul@104 27
paul@104 28
    name = "standalone"
paul@104 29
paul@144 30
    # Convenience methods.
paul@144 31
paul@144 32
    def ensure(self, pagename):
paul@144 33
paul@144 34
        "Ensure that the given 'pagename' exists."
paul@144 35
paul@144 36
        pass
paul@144 37
paul@144 38
    def ensure_attachments(self, pagename):
paul@144 39
paul@144 40
        "Ensure that attachment storage for the given 'pagename' exists."
paul@144 41
paul@144 42
        pass
paul@144 43
paul@144 44
    def get_attachment_filename(self, pagename, filename):
paul@144 45
paul@144 46
        """
paul@144 47
        Prevent independent output by returning a filename of None corresponding
paul@144 48
        to the given 'pagename' and any specified 'filename'.
paul@144 49
        """
paul@144 50
paul@144 51
        return None
paul@144 52
paul@104 53
    def get_filename(self, filename):
paul@104 54
paul@104 55
        """
paul@104 56
        Prevent independent output by returning a filename of None corresponding
paul@104 57
        to any specified 'filename'.
paul@104 58
        """
paul@104 59
paul@104 60
        return None
paul@104 61
paul@104 62
output = StandaloneOutput
paul@104 63
paul@104 64
# vim: tabstop=4 expandtab shiftwidth=4