Skip to content

Commit 341e116

Browse files
committed
added get_markdown
1 parent bda097f commit 341e116

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

bin/loklak

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ parser.add_argument('-p', '--peers', action='store_true', help='Loklak API for p
1616
parser.add_argument('-pg', '--pushgeojson', action='store_true', help='Public API to push geojson objects to the loklak server.')
1717
parser.add_argument('-u', '--user', help='User API to show twitter user information.')
1818
parser.add_argument('-m', '--map', help='Map Visualization render using Loklak service.')
19-
parser.add_argument('-md', '--markdown', action='store_true', help='Markdown conversion API to render markdown as image using Loklak.')
19+
parser.add_argument('-md', '--markdown', help='Markdown conversion API to render markdown as image using Loklak.')
2020
args = parser.parse_args()
2121

2222
loklak = loklak.Loklak()
@@ -45,6 +45,8 @@ elif args.map:
4545
with open(os.path.join(os.getcwd(), 'map.png'), 'wb') as f:
4646
f.write(data)
4747
elif args.markdown:
48-
pass
48+
data = loklak.get_markdown(args.markdown)
49+
with open(os.path.join(os.getcwd(), 'markdown.png'), 'wb') as f:
50+
f.write(data)
4951
else:
5052
print('Choose API method.')

0 commit comments

Comments
 (0)