de-linted source
This commit is contained in:
parent
96b611880c
commit
ab2b775e3a
|
@ -1 +1 @@
|
|||
from .dragonglass import main
|
||||
from .dragonglass import main as main
|
||||
|
|
|
@ -1,7 +1,6 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
import argparse
|
||||
import sys
|
||||
import yaml
|
||||
from pathlib import Path
|
||||
from tree import SourceNode, SourceIndex
|
||||
|
|
|
@ -50,13 +50,13 @@ class SourceNode:
|
|||
def load_metadata(self, source_dir):
|
||||
if self._is_md and not self._is_dir:
|
||||
with open(source_dir / self._path, "r", encoding="utf-8") as f:
|
||||
l = f.readline()
|
||||
if l == '---\n':
|
||||
cur_line = f.readline()
|
||||
if cur_line == '---\n':
|
||||
metalines = []
|
||||
l = f.readline()
|
||||
while l != '---\n':
|
||||
metalines.append(l)
|
||||
l = f.readline()
|
||||
cur_line = f.readline()
|
||||
while cur_line != '---\n':
|
||||
metalines.append(cur_line)
|
||||
cur_line = f.readline()
|
||||
self.metadata = yaml.full_load(''.join(metalines))
|
||||
|
||||
def parse_markdown(self, source_dir, markdown_parser):
|
||||
|
|
Loading…
Reference in New Issue
Block a user