We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 34bb2a3 commit 6a3a63eCopy full SHA for 6a3a63e
1 file changed
register.py
@@ -1,10 +1,14 @@
1
-import pandoc
+import pypandoc
2
import os
3
4
-pandoc.core.PANDOC_PATH = '/usr/local/bin/pandoc'
5
-
6
-doc = pandoc.Document()
7
-doc.markdown = open('README.md').read()
+output = pypandoc.convert('README.md', 'rst')
8
f = open('README.txt','w+')
9
-f.write(doc.rst)
10
-f.close()
+f.write(output)
+f.close()
+
+readme_rst = open('./README.txt').read()
+replace = '[SendGrid Logo]\n(https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png)'
11
+replacement = '|SendGrid Logo|\n\n.. |SendGrid Logo| image:: https://uiux.s3.amazonaws.com/2016-logos/email-logo%402x.png\n :target: https://www.sendgrid.com'
12
+final_text = readme_rst.replace(replace,replacement)
13
+with open('./README.txt', 'w') as f:
14
+ f.write(final_text)
0 commit comments