summaryrefslogtreecommitdiff
path: root/bin/wired-dedup-h4-items.py
blob: 77858fb26a36e439b4ae399a5e1088d69c9deea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
import sys, collections

filename = '%s' %(sys.argv[1])
with open(filename, newline='') as f:
    content = f.readlines()
    new_list = []
    for line in content:
        if line.startswith('####'):
            title = line.strip().split('####')[1].split(' for ')[0]
            new_list.append(title)
            print(title)
    print([item for item, count in collections.Counter(new_list).items() if count > 1])