mirror of
https://github.com/xonsh/xonsh.git
synced 2025-03-04 08:24:40 +01:00
more changes
This commit is contained in:
parent
8e4ab188a7
commit
52cb06e033
1 changed files with 11 additions and 11 deletions
22
release.xsh
22
release.xsh
|
@ -30,22 +30,22 @@ def merge_news():
|
|||
"""Reads news files and merges them."""
|
||||
cats = {c: '' for c in NEWS_CATEGORIES}
|
||||
for news in NEWS:
|
||||
with open(f) as f:
|
||||
with open(news) as f:
|
||||
raw = f.read()
|
||||
raw = raw.strip()
|
||||
parts = NEWS_RE.split(raw)
|
||||
while len(parts) > 0 and parts[0] not in NEWS_CATEGORIES:
|
||||
parts = parts[1:]
|
||||
for key, val = zip(parts[::2], parts[1::2]):
|
||||
val = val.strip()
|
||||
if val == 'None':
|
||||
continue
|
||||
cats[key] += val + '\n'
|
||||
raw = raw.strip()
|
||||
parts = NEWS_RE.split(raw)
|
||||
while len(parts) > 0 and parts[0] not in NEWS_CATEGORIES:
|
||||
parts = parts[1:]
|
||||
for key, val in zip(parts[::2], parts[1::2]):
|
||||
val = val.strip()
|
||||
if val == 'None':
|
||||
continue
|
||||
cats[key] += val + '\n'
|
||||
for news in NEWS:
|
||||
os.remove(news)
|
||||
s = ''
|
||||
for c in NEWS_CATEGORIES:
|
||||
val = cats[c]:
|
||||
val = cats[c]
|
||||
if len(val) == 0:
|
||||
continue
|
||||
s += '**' + c + '**:\n\n' + val + '\n\n'
|
||||
|
|
Loading…
Add table
Reference in a new issue