Hello World

Welcome to Hexo! This is your very first post. Check documentation for more info. If you get any problems when using Hexo, you can find the answer in troubleshooting or you can ask me on GitHub.

Quick Start

Create a new post

$ hexo new "My New Post"

More info: Writing

Run server

$ hexo server

More info: Server

Generate static files

$ hexo generate

More info: Generating

Deploy to remote sites

$ hexo deploy

More info: Deployment

def query(data, key):
"""docstring for query"""
pattern = re.compile(key, re.IGNORECASE)
records = {}
for k, v in data.items():
match = False
if pattern.match(k):
match = True
for x, y in v.items():
if isinstance(y, list):
for i in y:
if pattern.match(i):
match = True
else:
if pattern.match(x):
match = True
if match:
if records.get(k):
records[k] = v
else:
records.setdefault(k, v)
return records