Creating the html documentation
There is some very nice documentation in the docs directory, but I found the generate_html_pages.py wouldn't work. I created the documentation with very little tweaking. If anyone is interested, I'd be glad to tell them how.
I believe these docs are available on http://mrjbq7.github.io/ta-lib/, particularly this part:
http://mrjbq7.github.io/ta-lib/doc_index.html
Can you provide some information about how the generate_html_pages.py wasn't working for you? Although not really intended for users to run, maybe we can make it easier if they want to.
This is the error I receive (and I have ran "sudo pip install grip")
$ python generate_html_pages.py
/usr/local/lib/python2.7/dist-packages/grip/__init__.pyc
Traceback (most recent call last):
File "generate_html_pages.py", line 7, in <module>
from grip import render_page
ImportError: cannot import name render_page
@mahrens917 looks like there have been some BC breaks upstream; you'll need to limit grip to version 1.2 or less
That was a quick response! OK, thanks.
This seems to make it work:
diff --git a/docs/generate_html_pages.py b/docs/generate_html_pages.py
index 6db07c9..9f51e0a 100644
--- a/docs/generate_html_pages.py
+++ b/docs/generate_html_pages.py
@@ -2,7 +2,7 @@ import os
import sys
import talib
-from grip import render_page
+from grip import render_content
from bs4 import BeautifulSoup
from talib.abstract import Function
@@ -189,7 +189,7 @@ def get_open_save_file_paths():
def run_convert_to_html():
for md_file_path, save_file_path in get_open_save_file_paths():
with open(md_file_path, 'r') as f:
- html = render_page(f.read(), os.path.split(md_file_path)[1])
+ html = render_content(f.read())
html = html.replace('<pre><code>', '<pre>')
html = html.replace('</code></pre>', '</pre>')
To run it:
$ cd ta-lib/docs
$ mkdir -p html/func_groups
$ python generate_html_pages.py
Note: we might want to pass render_offline=True to render_content, but I haven't read their documentation to figure out what changed from render_page behavior.