only show orphan nodes

This commit is contained in:
sejo 2022-01-06 14:36:49 -06:00
parent fff887aec2
commit 2eda4e6934
1 changed files with 3 additions and 3 deletions

View File

@ -51,20 +51,20 @@ incoming.pop('{home}')
for key,links in incoming.items():
# get filename for key
filename = wikilink2Filename(key,'.gmo')
print(key)
# print(key)
# open file in append mode
file = open(filename, 'a')
if len(links):
# write incoming links
print( '{} incoming links\n'.format( len(links) ) )
# print( '{} incoming links\n'.format( len(links) ) )
file.write("\n\n# incoming links\n")
for link in links:
gemlink = '=> ./{} {}'.format(wikilink2Filename(link), link)
# print(gemlink)
file.write(gemlink+"\n")
else:
print( 'orphan\n' )
print( '{}: orphan\n'.format(key) )
file.write("\n\nno incoming links\n")
file.close()