]>
Commit | Line | Data |
---|---|---|
cc52de43 | 1 | #!/usr/bin/env python3 |
54007a45 | 2 | |
3 | # Allow direct execution | |
416c7fcb PH |
4 | import os |
5 | import sys | |
6 | ||
0f06bcd7 | 7 | sys.path.insert(0, os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) |
8 | ||
54007a45 | 9 | |
10 | import optparse | |
11 | ||
82d02080 | 12 | from yt_dlp.extractor import list_extractor_classes |
416c7fcb PH |
13 | |
14 | ||
15 | def main(): | |
16 | parser = optparse.OptionParser(usage='%prog OUTFILE.md') | |
8dcce6a8 | 17 | _, args = parser.parse_args() |
416c7fcb PH |
18 | if len(args) != 1: |
19 | parser.error('Expected an output filename') | |
20 | ||
82d02080 | 21 | out = '\n'.join(ie.description() for ie in list_extractor_classes() if ie.IE_DESC is not False) |
8dcce6a8 | 22 | |
23 | with open(args[0], 'w', encoding='utf-8') as outf: | |
24 | outf.write(f'# Supported sites\n{out}\n') | |
416c7fcb | 25 | |
582be358 | 26 | |
416c7fcb PH |
27 | if __name__ == '__main__': |
28 | main() |