added newline feature plugin readme
This commit is contained in:
parent
4ac2ae518d
commit
5177d94776
|
|
@ -3,6 +3,7 @@
|
||||||
|
|
||||||
import git, shutil, os, imp
|
import git, shutil, os, imp
|
||||||
import security
|
import security
|
||||||
|
import re
|
||||||
|
|
||||||
indexes = {}
|
indexes = {}
|
||||||
|
|
||||||
|
|
@ -28,11 +29,11 @@ def setPluginDict(d):
|
||||||
indexes = d
|
indexes = d
|
||||||
|
|
||||||
def getPluginVersion(loc):
|
def getPluginVersion(loc):
|
||||||
f = open(loc, 'r').read().split('\n')
|
f = open(loc, 'r').read().split('@')
|
||||||
v = None
|
v = None
|
||||||
for l in f:
|
for l in f:
|
||||||
t = l.split('=')
|
t = l.split('=')
|
||||||
if t[0] == '@version':
|
if t[0].lower() == 'version':
|
||||||
_tmp_v = t[1].split('.')
|
_tmp_v = t[1].split('.')
|
||||||
c = 1
|
c = 1
|
||||||
_version = _tmp_v[0] + '.'
|
_version = _tmp_v[0] + '.'
|
||||||
|
|
@ -81,12 +82,17 @@ def indexPlugins(params={}):
|
||||||
else:
|
else:
|
||||||
fol['update'] = 'no'
|
fol['update'] = 'no'
|
||||||
fol['status'] = 'remove'
|
fol['status'] = 'remove'
|
||||||
readme = open(indexFolderPath + i + '/' + docsFolderPath + 'readme.md', 'r').read().split('\n')
|
readme = re.split('@', open(indexFolderPath + i + '/' + docsFolderPath + 'readme.md', 'r').read())#.split('@')
|
||||||
|
|
||||||
sumList = {}
|
sumList = {}
|
||||||
for s in readme:
|
for s in readme:
|
||||||
t = s.split('=')
|
if re.search('\w+=', str(s)):
|
||||||
if len(t) > 1:
|
_check = re.search('\w+=', str(s)).group().replace('=', '')
|
||||||
fol[t[0].replace('@', '')] = t[1]
|
_text = re.sub('\w+=', '', s)
|
||||||
|
if _check == 'summary' or _check == 'description':
|
||||||
|
_text = re.sub('\n', '<br>', _text)
|
||||||
|
fol[_check] = _text
|
||||||
|
|
||||||
if not i in (f['folder'] for f in indexes.itervalues()):
|
if not i in (f['folder'] for f in indexes.itervalues()):
|
||||||
indexes[len(indexes)] = fol
|
indexes[len(indexes)] = fol
|
||||||
else:
|
else:
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue