Skip to content

Instantly share code, notes, and snippets.

@sophana
sophana / sample_dominate.py
Last active Sep 12, 2018
sample single file templateless flask application that demonstrates flask_bootstrap, flask_wtform, flask_nav, flask_login, and dominate
View sample_dominate.py
'''
sample single file templateless flask application that demonstrates flask_bootstrap, flask_wtform, flask_nav, flask_login
uses dominate instead of templates
to use: (in virtual env)
pip install dominate Flask Flask-Bootstrap Flask-WTF flask-nav Flask-Login
python sample_dominate.py
'''
@sophana
sophana / lrc2srt.py
Last active Apr 17, 2022
Convert all lrc files to srt. With SRT files, you can display lyrics in most media players.
View lrc2srt.py
#!/usr/bin/python
import sys
import os
#usage: lrc2srt.py [directory]
# will recusively convert all lrc files to srt in directory
def conv(lrcPath,srtPath):
lrc=file(lrcPath)