Procházet zdrojové kódy

Update Category split logic

pull/569/head
Dave Machado před 6 roky
rodič
revize
0184842ee8
V databázi nebyl nalezen žádný známý klíč pro tento podpis ID GPG klíče: 948D4778D01A7B3F
1 změnil soubory, kde provedl 6 přidání a 2 odebrání
  1. +6
    -2
      build/md2json.py

+ 6
- 2
build/md2json.py Zobrazit soubor

@@ -14,7 +14,7 @@ def markdown_to_json(filename, anchor):
and line.startswith(anchor) or line.startswith('| '))
for line in lines:
if line.startswith(anchor):
category = line.split()[1]
category = line.split(anchor)[1].strip()
continue
chunks = [x.strip() for x in line.split('|')[1:-1]]
entry = {
@@ -26,7 +26,11 @@ def markdown_to_json(filename, anchor):
'Category': category,
}
entries.append(entry)
return json.dumps(entries)
final = {
'count': len(entries),
'entries': entries,
}
return json.dumps(final)


def main():


Načítá se…
Zrušit
Uložit