(args=None)
| 842 | |
| 843 | |
| 844 | def main(args=None): |
| 845 | import argparse |
| 846 | parser = argparse.ArgumentParser(color=True) |
| 847 | textgroup = parser.add_argument_group('text only arguments') |
| 848 | htmlgroup = parser.add_argument_group('html only arguments') |
| 849 | textgroup.add_argument( |
| 850 | "-w", "--width", |
| 851 | type=int, default=2, |
| 852 | help="width of date column (default 2)" |
| 853 | ) |
| 854 | textgroup.add_argument( |
| 855 | "-l", "--lines", |
| 856 | type=int, default=1, |
| 857 | help="number of lines for each week (default 1)" |
| 858 | ) |
| 859 | textgroup.add_argument( |
| 860 | "-s", "--spacing", |
| 861 | type=int, default=6, |
| 862 | help="spacing between months (default 6)" |
| 863 | ) |
| 864 | textgroup.add_argument( |
| 865 | "-m", "--months", |
| 866 | type=int, default=3, |
| 867 | help="months per row (default 3)" |
| 868 | ) |
| 869 | htmlgroup.add_argument( |
| 870 | "-c", "--css", |
| 871 | default="calendar.css", |
| 872 | help="CSS to use for page" |
| 873 | ) |
| 874 | parser.add_argument( |
| 875 | "-L", "--locale", |
| 876 | default=None, |
| 877 | help="locale to use for month and weekday names" |
| 878 | ) |
| 879 | parser.add_argument( |
| 880 | "-e", "--encoding", |
| 881 | default=None, |
| 882 | help="encoding to use for output (default utf-8)" |
| 883 | ) |
| 884 | parser.add_argument( |
| 885 | "-t", "--type", |
| 886 | default="text", |
| 887 | choices=("text", "html"), |
| 888 | help="output type (text or html)" |
| 889 | ) |
| 890 | parser.add_argument( |
| 891 | "-f", "--first-weekday", |
| 892 | type=int, default=0, |
| 893 | help="weekday (0 is Monday, 6 is Sunday) to start each week (default 0)" |
| 894 | ) |
| 895 | parser.add_argument( |
| 896 | "year", |
| 897 | nargs='?', type=int, |
| 898 | help="year number" |
| 899 | ) |
| 900 | parser.add_argument( |
| 901 | "month", |
no test coverage detected
searching dependent graphs…