summaryrefslogtreecommitdiff
path: root/qface/utils.py
blob: f816b580287628c5b41c96f302ac13d516a831d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
from .generator import FileSystem
from .helper import doc


def module_info(text):
    system = FileSystem.parse_text(text)
    module = list(system.modules)[0]
    return {
        'title': module.name,
        'brief': " ".join(doc.parse_doc(module.comment).brief)
    }