diff --git a/README.md b/README.md index ff4b9bd..8b504a5 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ Comprehensive Python Cheatsheet =============================== -[Download text file](https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md), [PDF](https://gto76.github.io/python-cheatsheet/web/python-cheatsheet-4e31793.pdf), [Fork me on GitHub](https://github.com/gto76/python-cheatsheet) or [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions). +[Download text file](https://raw.githubusercontent.com/gto76/python-cheatsheet/master/README.md), [Fork me on GitHub](https://github.com/gto76/python-cheatsheet) or [Check out FAQ](https://github.com/gto76/python-cheatsheet/wiki/Frequently-Asked-Questions). ![Monty Python](web/image_888.jpeg) diff --git a/index.html b/index.html index d7f1384..75263ff 100644 --- a/index.html +++ b/index.html @@ -208,8 +208,8 @@ pre.prettyprint { -

Comprehensive Python Cheatsheet


#Contents

ToC = {
+   

Comprehensive Python Cheatsheet

Monty Python


#Contents

ToC = {
     '1. Collections': [List, Dictionary, Set, Tuple, Range, Enumerate, Iterator, Generator],
     '2. Types':       [Type, String, Regular_Exp, Format, Numbers, Combinatorics, Datetime],
     '3. Syntax':      [Args, Inline, Closure, Decorator, Class, Duck_Types, Enum, Exceptions],
@@ -226,6 +226,7 @@ pre.prettyprint {
 
 
 
+
 

#Main

if __name__ == '__main__':     # Runs main() if file wasn't imported.
     main()
 
@@ -2458,5 +2459,6 @@ simpleaudio.play_buffer(samples_b, 1, + diff --git a/parse.js b/parse.js index 48fc861..eb762e3 100755 --- a/parse.js +++ b/parse.js @@ -15,6 +15,9 @@ const showdown = require('showdown'); const hljs = require('highlightjs'); +const PDF_BUTTON = + '\n'; + const TOC = '
' + '

Contents

\n' + @@ -92,6 +95,7 @@ function getMd() { } function modifyPage() { + addPdfButton() removeOrigToc(); addToc(); insertLinks(); @@ -99,6 +103,11 @@ function modifyPage() { highlightCode(); } +function addPdfButton() { + const nodes = $.parseHTML(PDF_BUTTON); + $('img').first().parent().before(nodes); +} + function removeOrigToc() { const headerContents = $('#contents'); const contentsList = headerContents.next(); diff --git a/web/button.png b/web/button.png new file mode 100644 index 0000000..82c5184 Binary files /dev/null and b/web/button.png differ diff --git a/web/index_for_pdf.html b/web/index_for_pdf.html index 506900e..ec67c48 100644 --- a/web/index_for_pdf.html +++ b/web/index_for_pdf.html @@ -63,7 +63,7 @@ hexadecimal representation, 8

I

image, 39
-inline, 11-12
+inline, 11-12
input function, 22
introspection, 31
ints, 4, 7, 8
diff --git a/web/python-cheatsheet-4e31793.pdf b/web/python-cheatsheet-4e31793.pdf deleted file mode 100644 index 4b8bd5e..0000000 Binary files a/web/python-cheatsheet-4e31793.pdf and /dev/null differ diff --git a/web/python-cheatsheet-for-print.pdf b/web/python-cheatsheet-for-print.pdf deleted file mode 100644 index 751919f..0000000 Binary files a/web/python-cheatsheet-for-print.pdf and /dev/null differ diff --git a/web/template.html b/web/template.html index 68fb416..5d8af37 100644 --- a/web/template.html +++ b/web/template.html @@ -220,5 +220,6 @@ pre.prettyprint {
+