This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
/* | |
pdf2jpg v.0.0.1 | |
--------------------------------------- | |
MODX snippet to create a jpg thumbnail from a pdf file | |
AUTHOR: | |
--------------------------------------- | |
[email protected] | |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import eyed3 | |
import re | |
import glob | |
def get_lyric(lrc): | |
text = open(lrc).read() | |
text = re.sub(r'(?:\[.*\])+', '', text).strip() | |
text = map(lambda l: l.strip(), text.split('\n')) | |
ans = [] | |
for l in text: |