Filter out the whitepapers I have in my libary
This commit is contained in:
parent
153aa434d5
commit
65e8948202
10
caliGraph.py
10
caliGraph.py
@ -119,6 +119,13 @@ def removePriv(G):
|
||||
if 'priv' in node['tags']:
|
||||
G.remove_node(n)
|
||||
|
||||
def removeWhitepapers(G):
|
||||
for n in list(G.nodes):
|
||||
node = G.nodes[n]
|
||||
if node['t'] == 'book':
|
||||
if 'whitepaper' in node['tags']:
|
||||
G.remove_node(n)
|
||||
|
||||
|
||||
def removeDangling(G, alsoBooks=False):
|
||||
for n in list(G.nodes):
|
||||
@ -895,6 +902,7 @@ def cliInterface():
|
||||
|
||||
parser = argparse.ArgumentParser(description='TODO: Write Description.')
|
||||
parser.add_argument('--keep-priv', action="store_true")
|
||||
parser.add_argument('--keep-whitepaper', action="store_true")
|
||||
parser.add_argument('--remove-read', action="store_true")
|
||||
parser.add_argument('--remove-unread', action="store_true")
|
||||
parser.add_argument('--no-web', action="store_true")
|
||||
@ -964,6 +972,8 @@ def cliInterface():
|
||||
removeRead(G)
|
||||
elif args.remove_unread:
|
||||
removeUnread(G)
|
||||
if not args.keep_whitepapers:
|
||||
removeWhitepapers(G)
|
||||
|
||||
removeDangling(G, alsoBooks=True)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user