diff --git a/src/release/release.py b/src/release/release.py index 93962a2..94cd6ed 100755 --- a/src/release/release.py +++ b/src/release/release.py @@ -13,6 +13,6 @@ metadata, content = loadBook('rc-5') # txtRelease(metadata, content) # jsonRelease(metadata, content) -# htmlRelease(metadata, content) -staticRelease(metadata, content) +htmlRelease(metadata, content) +# staticRelease(metadata, content) # gitbookRelease(metadata, content) diff --git a/src/release/utils/sequence.py b/src/release/utils/sequence.py index 0b7094b..688f787 100644 --- a/src/release/utils/sequence.py +++ b/src/release/utils/sequence.py @@ -40,21 +40,20 @@ def txtSerialize(metadata: dict, content: dict) -> str: return '\n\n\n'.join(result) + '\n' -def htmlMetadata(metadata: dict) -> str: # html metadata - return '
%s
' % x for x in metadata['desc']] - ) - - def htmlSerialize(metadata: dict, content: dict) -> str: - result = [htmlMetadata(metadata)] - for (title, chapter) in content.items(): - result.append( - '%s
' % x for x in chapter] - ) - ) - return '\n\n'.join(result) + '\n' + htmlContent = [ + '', + '', + '', '%s
' % x for x in metadata['desc']] + for (caption, chapter) in content.items(): + htmlContent.append('%s
' % x for x in chapter])) + htmlContent += ['', ''] + return '\n'.join(htmlContent) + '\n' def gitbookMetadata(metadata: dict) -> str: