|
|
|
@ -60,7 +60,7 @@ See this pandoc documentation to explore more possibilities with Markdown: https
|
|
|
|
|
### Def Glossary content
|
|
|
|
|
* Convert the markdown file into html file using pypandoc
|
|
|
|
|
|
|
|
|
|
*Via API using etherpad*
|
|
|
|
|
*Via API using etherpad
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
import json, pypandoc
|
|
|
|
@ -84,9 +84,9 @@ glossary = ep("getText", api_url, api_key, padID="camilo_glossary")
|
|
|
|
|
text = glossary["data"]["text"]
|
|
|
|
|
|
|
|
|
|
words = pypandoc.convert_text(text, 'html', format='md')
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
*Via Local Markdown File*
|
|
|
|
|
```
|
|
|
|
|
*Via Local Markdown File
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
import pypandoc
|
|
|
|
@ -138,6 +138,7 @@ for title, symbol, color in properties:
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* Adding property symbols in front of each word generating a Java script code:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
script = ''
|
|
|
|
|
|
|
|
|
@ -168,8 +169,8 @@ for title, symbol, color in properties:
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* Writing the Body
|
|
|
|
|
*note that here you are using the previous variables *style*, *legend*, and *script*
|
|
|
|
|
* Writing the Body. Note that here you are using the previous variables **style**, **legend**, and **script**
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
body = f'''<!DOCTYPE html>
|
|
|
|
@ -216,13 +217,15 @@ body = f'''<!DOCTYPE html>
|
|
|
|
|
```
|
|
|
|
|
|
|
|
|
|
* Writing the `indel.html` file
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
website = open('index.html','w')
|
|
|
|
|
|
|
|
|
|
website.write(body)
|
|
|
|
|
website.close()
|
|
|
|
|
|
|
|
|
|
```
|
|
|
|
|
* Open the index.html file in your browser
|
|
|
|
|
* Open the index.html file in your browser and enjoy
|
|
|
|
|
|
|
|
|
|
###
|
|
|
|
|
....
|