Check-in [14be328ff7]
Overview
Comment: | More details to overview, extract some flags, add dirname. List feature plugins in separate table. |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
14be328ff7fc2589518c35a7fe3f44c2 |
User & Date: | mario on 2016-12-18 14:03:46 |
Other Links: | manifest | tags |
Context
2016-12-18
| ||
14:04 | Add more .progress() indication check-in: 0c7040e314 user: mario tags: trunk | |
14:03 | More details to overview, extract some flags, add dirname. List feature plugins in separate table. check-in: 14be328ff7 user: mario tags: trunk | |
2016-12-17
| ||
11:28 | Remove obsolete windows theme plugin. check-in: 5c5b1b29cf user: mario tags: trunk | |
Changes
Modified dev/lsplug.py from [6ef61b0997] to [3d16a9cbc5].
1 2 3 4 5 6 7 8 | # description: list available plugins for wiki from config import * from base64 import b64decode import pluginconf pluginconf.module_base = "config" pluginconf.plugin_base = ["channels", "contrib"]#, conf.share+"/channels", conf.dir+"/plugins"] | > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > | > | > > > > > > > > > | > > > | > > > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 | # encoding: UTF-8 # description: list available plugins for wiki import os, re from config import * from base64 import b64decode import pluginconf pluginconf.module_base = "config" pluginconf.plugin_base = ["channels", "contrib"]#, conf.share+"/channels", conf.dir+"/plugins"] txt_p = """ ### Channels | Title | Ver | Type | Category | Subdir | Priority | Feat. | Description | | ----- | --- | ---- | -------- | ------ | -------- | ----- | ----------- | """ txt_f = """ ### Features | Title | Ver | Type | Category | Subdir | Priority | Description | | ----- | --- | ---- | -------- | ------ | -------- | ----------- | """ # read out additional plugin info def get_flags(e, fn): flags = "" with open(fn, "r") as f: src = f.read() if re.search("^\s*has_search = True", src, re.M): flags += "🔍 " mth = e.get("extraction-method", "") if re.search("regex", mth): flags += "®" if re.search("dom|xml", mth): flags += "¶" if re.search("json", mth): flags += "{" if re.search("-handler|-hook", mth): flags += " ⏳" return flags all_meta = pluginconf.all_plugin_meta() for name,e in [(name, all_meta[name]) for name in sorted(all_meta)]: # print table if "title" in e: fn = "./channels/%s.py" % e["fn"] if os.path.exists(fn): e["dir"] = "[**dist** ✔](wiki/channels)" else: fn = "./contrib/%s.py" % e["fn"] e["dir"] = "[contrib/](wiki/contrib)" try: if e["type"] == "channel": e["flags"] = get_flags(e, fn) txt_p = txt_p + "| [{title}]({url}) | **{version}** | {type} | {category} | {dir} | *{priority}* | {flags} | {description} |\n".format(**e) else: txt_f = txt_f + "| {title} | **{version}** | {type} | {category} | {dir} | *{priority}* | {description} |\n".format(**e) except Exception, e: print "ERROR*** ", name, e pass # extract icon if False and "png" in e: with open("help/img/%s_%s.png" % (e["type"], name), "wb") as f: f.write(b64decode(e["png"])) print txt_p print "Features: 🔍 search / ® regex / ¶ dom / { json / ⏳ double extraction delay" print txt_f |