Forráskód Böngészése

Adding front page

Swaroop C H 12 éve
szülő
commit
ba225927e5
3 módosított fájl, 128 hozzáadás és 13 törlés
  1. 122 2
      01-frontpage.md
  2. 0 5
      02-table-of-contents.md
  3. 6 6
      fabfile.py

A különbségek nem kerülnek megjelenítésre, a fájl túl nagy
+ 122 - 2
01-frontpage.md


+ 0 - 5
02-table-of-contents.md

@@ -1,5 +0,0 @@
-## Table of Contents
-
-1. Translations
-2. Preface
-3. Introduction

+ 6 - 6
fabfile.py

@@ -17,11 +17,6 @@ MARKDOWN_FILES = [
         'slug': "python",
         'title': "Python",
     },
-    {
-        'file': '02-table-of-contents.md',
-        'slug': "python_en-table_of_contents",
-        'title': "Table of Contents of A Byte of Python",
-    },
 ]
 
 
@@ -221,6 +216,7 @@ def wp():
         for chapter in MARKDOWN_FILES:
             html = markdown_to_html(open(chapter['file']).read(),
                                     upload_assets_to_s3=True)
+            # TODO Add previous and next links at end of html
 
             if chapter['slug'] in existing_page_slugs:
                 page_id = page_slug_to_id(chapter['slug'])
@@ -251,7 +247,8 @@ def html():
             '-t', 'html5',
             '-o', '{}.html'.format(FULL_PROJECT_NAME),
             '-S',
-            '-s'] + [i['file'] for i in MARKDOWN_FILES]
+            '-s',
+            '--toc'] + [i['file'] for i in MARKDOWN_FILES]
     local(' '.join(args))
     local('open {}.html'.format(FULL_PROJECT_NAME))
 
@@ -264,6 +261,9 @@ def epub():
             '-t', 'epub',
             '-o', '{}.epub'.format(FULL_PROJECT_NAME),
             '-S'] + [i['file'] for i in MARKDOWN_FILES]
+    # TODO --epub-cover-image
+    # TODO --epub-metadata
+    # TODO --epub-stylesheet
     local(' '.join(args))
     if AWS_ENABLED:
         upload_output_to_s3('{}.epub'.format(FULL_PROJECT_NAME))