| Conditions | 4 | 
| Total Lines | 492 | 
| Code Lines | 410 | 
| Lines | 0 | 
| Ratio | 0 % | 
| Changes | 0 | ||
Small methods make your code easier to understand, in particular if combined with a good name. Besides, if your method is small, finding a good name is usually much easier.
For example, if you find yourself adding comments to a method's body, this is usually a good sign to extract the commented part to a new method, and use the comment as a starting point when coming up with a good name for this new method.
Commonly applied refactorings include:
If many parameters/temporary variables are present:
| 1 | #  | 
            ||
| 177 | def init_args(self):  | 
            ||
| 178 | """Init all the command line arguments."""  | 
            ||
| 179 | parser = argparse.ArgumentParser(  | 
            ||
| 180 | prog='glances',  | 
            ||
| 181 | conflict_handler='resolve',  | 
            ||
| 182 | formatter_class=argparse.RawDescriptionHelpFormatter,  | 
            ||
| 183 | epilog=self.example_of_use,  | 
            ||
| 184 | )  | 
            ||
| 185 | if shtab_tag:  | 
            ||
| 186 | shtab.add_argument_to(parser, ["--print-completion"])  | 
            ||
| 187 |         parser.add_argument('-V', '--version', action='version', version=self.version_msg()) | 
            ||
| 188 |         parser.add_argument('-d', '--debug', action='store_true', default=False, dest='debug', help='enable debug mode') | 
            ||
| 189 | if shtab_tag:  | 
            ||
| 190 | parser.add_argument(  | 
            ||
| 191 | '-C', '--config', dest='conf_file', help='path to the configuration file'  | 
            ||
| 192 | ).complete = shtab.FILE  | 
            ||
| 193 | else:  | 
            ||
| 194 |             parser.add_argument('-C', '--config', dest='conf_file', help='path to the configuration file') | 
            ||
| 195 |         parser.add_argument('-P', '--plugins', dest='plugin_dir', help='path to additional plugin directory') | 
            ||
| 196 | # Disable plugin  | 
            ||
| 197 | parser.add_argument(  | 
            ||
| 198 | '--modules-list',  | 
            ||
| 199 | '--module-list',  | 
            ||
| 200 | action='store_true',  | 
            ||
| 201 | default=False,  | 
            ||
| 202 | dest='modules_list',  | 
            ||
| 203 | help='display modules (plugins & exports) list and exit',  | 
            ||
| 204 | )  | 
            ||
| 205 | parser.add_argument(  | 
            ||
| 206 | '--disable-plugin',  | 
            ||
| 207 | '--disable-plugins',  | 
            ||
| 208 | '--disable',  | 
            ||
| 209 | dest='disable_plugin',  | 
            ||
| 210 | help='disable plugin (comma-separated list or all). If all is used, \  | 
            ||
| 211 | then you need to configure --enable-plugin.',  | 
            ||
| 212 | )  | 
            ||
| 213 | parser.add_argument(  | 
            ||
| 214 | '--enable-plugin',  | 
            ||
| 215 | '--enable-plugins',  | 
            ||
| 216 | '--enable',  | 
            ||
| 217 | dest='enable_plugin',  | 
            ||
| 218 | help='enable plugin (comma-separated list)',  | 
            ||
| 219 | )  | 
            ||
| 220 | parser.add_argument(  | 
            ||
| 221 | '--disable-process',  | 
            ||
| 222 | action='store_true',  | 
            ||
| 223 | default=False,  | 
            ||
| 224 | dest='disable_process',  | 
            ||
| 225 | help='disable process module',  | 
            ||
| 226 | )  | 
            ||
| 227 | # Enable or disable option  | 
            ||
| 228 | parser.add_argument(  | 
            ||
| 229 | '--disable-webui',  | 
            ||
| 230 | action='store_true',  | 
            ||
| 231 | default=False,  | 
            ||
| 232 | dest='disable_webui',  | 
            ||
| 233 | help='disable the Web Interface',  | 
            ||
| 234 | )  | 
            ||
| 235 | parser.add_argument(  | 
            ||
| 236 | '--light',  | 
            ||
| 237 | '--enable-light',  | 
            ||
| 238 | action='store_true',  | 
            ||
| 239 | default=False,  | 
            ||
| 240 | dest='enable_light',  | 
            ||
| 241 | help='light mode for Curses UI (disable all but the top menu)',  | 
            ||
| 242 | )  | 
            ||
| 243 | parser.add_argument(  | 
            ||
| 244 | '-0',  | 
            ||
| 245 | '--disable-irix',  | 
            ||
| 246 | action='store_true',  | 
            ||
| 247 | default=False,  | 
            ||
| 248 | dest='disable_irix',  | 
            ||
| 249 | help='task\'s cpu usage will be divided by the total number of CPUs',  | 
            ||
| 250 | )  | 
            ||
| 251 | parser.add_argument(  | 
            ||
| 252 | '-1',  | 
            ||
| 253 | '--percpu',  | 
            ||
| 254 | '--per-cpu',  | 
            ||
| 255 | action='store_true',  | 
            ||
| 256 | default=False,  | 
            ||
| 257 | dest='percpu',  | 
            ||
| 258 | help='start Glances in per CPU mode',  | 
            ||
| 259 | )  | 
            ||
| 260 | parser.add_argument(  | 
            ||
| 261 | '-2',  | 
            ||
| 262 | '--disable-left-sidebar',  | 
            ||
| 263 | action='store_true',  | 
            ||
| 264 | default=False,  | 
            ||
| 265 | dest='disable_left_sidebar',  | 
            ||
| 266 | help='disable network, disk I/O, FS and sensors modules',  | 
            ||
| 267 | )  | 
            ||
| 268 | parser.add_argument(  | 
            ||
| 269 | '-3',  | 
            ||
| 270 | '--disable-quicklook',  | 
            ||
| 271 | action='store_true',  | 
            ||
| 272 | default=False,  | 
            ||
| 273 | dest='disable_quicklook',  | 
            ||
| 274 | help='disable quick look module',  | 
            ||
| 275 | )  | 
            ||
| 276 | parser.add_argument(  | 
            ||
| 277 | '-4',  | 
            ||
| 278 | '--full-quicklook',  | 
            ||
| 279 | action='store_true',  | 
            ||
| 280 | default=False,  | 
            ||
| 281 | dest='full_quicklook',  | 
            ||
| 282 | help='disable all but quick look and load',  | 
            ||
| 283 | )  | 
            ||
| 284 | parser.add_argument(  | 
            ||
| 285 | '-5',  | 
            ||
| 286 | '--disable-top',  | 
            ||
| 287 | action='store_true',  | 
            ||
| 288 | default=False,  | 
            ||
| 289 | dest='disable_top',  | 
            ||
| 290 | help='disable top menu (QL, CPU, MEM, SWAP and LOAD)',  | 
            ||
| 291 | )  | 
            ||
| 292 | parser.add_argument(  | 
            ||
| 293 | '-6', '--meangpu', action='store_true', default=False, dest='meangpu', help='start Glances in mean GPU mode'  | 
            ||
| 294 | )  | 
            ||
| 295 | parser.add_argument(  | 
            ||
| 296 | '--disable-history',  | 
            ||
| 297 | action='store_true',  | 
            ||
| 298 | default=False,  | 
            ||
| 299 | dest='disable_history',  | 
            ||
| 300 | help='disable stats history',  | 
            ||
| 301 | )  | 
            ||
| 302 | parser.add_argument(  | 
            ||
| 303 | '--disable-bold',  | 
            ||
| 304 | action='store_true',  | 
            ||
| 305 | default=False,  | 
            ||
| 306 | dest='disable_bold',  | 
            ||
| 307 | help='disable bold mode in the terminal',  | 
            ||
| 308 | )  | 
            ||
| 309 | parser.add_argument(  | 
            ||
| 310 | '--disable-bg',  | 
            ||
| 311 | action='store_true',  | 
            ||
| 312 | default=False,  | 
            ||
| 313 | dest='disable_bg',  | 
            ||
| 314 | help='disable background colors in the terminal',  | 
            ||
| 315 | )  | 
            ||
| 316 | parser.add_argument(  | 
            ||
| 317 | '--enable-irq', action='store_true', default=False, dest='enable_irq', help='enable IRQ module'  | 
            ||
| 318 | )  | 
            ||
| 319 | parser.add_argument(  | 
            ||
| 320 | '--enable-process-extended',  | 
            ||
| 321 | action='store_true',  | 
            ||
| 322 | default=False,  | 
            ||
| 323 | dest='enable_process_extended',  | 
            ||
| 324 | help='enable extended stats on top process',  | 
            ||
| 325 | )  | 
            ||
| 326 | parser.add_argument(  | 
            ||
| 327 | '--disable-separator',  | 
            ||
| 328 | action='store_false',  | 
            ||
| 329 | default=True,  | 
            ||
| 330 | dest='enable_separator',  | 
            ||
| 331 | help='disable separator in the UI (between top and others modules)',  | 
            ||
| 332 | )  | 
            ||
| 333 | parser.add_argument(  | 
            ||
| 334 | '--disable-cursor',  | 
            ||
| 335 | action='store_true',  | 
            ||
| 336 | default=False,  | 
            ||
| 337 | dest='disable_cursor',  | 
            ||
| 338 | help='disable cursor (process selection) in the UI',  | 
            ||
| 339 | )  | 
            ||
| 340 | # Sort processes list  | 
            ||
| 341 | parser.add_argument(  | 
            ||
| 342 | '--sort-processes',  | 
            ||
| 343 | dest='sort_processes_key',  | 
            ||
| 344 | choices=sort_processes_stats_list,  | 
            ||
| 345 |             help='Sort processes by: {}'.format(', '.join(sort_processes_stats_list)), | 
            ||
| 346 | )  | 
            ||
| 347 | # Display processes list by program name and not by thread  | 
            ||
| 348 | parser.add_argument(  | 
            ||
| 349 | '--programs',  | 
            ||
| 350 | '--program',  | 
            ||
| 351 | action='store_true',  | 
            ||
| 352 | default=False,  | 
            ||
| 353 | dest='programs',  | 
            ||
| 354 | help='Accumulate processes by program',  | 
            ||
| 355 | )  | 
            ||
| 356 | # Export modules feature  | 
            ||
| 357 |         parser.add_argument('--export', dest='export', help='enable export module (comma-separated list)') | 
            ||
| 358 | parser.add_argument(  | 
            ||
| 359 | '--export-csv-file', default='./glances.csv', dest='export_csv_file', help='file path for CSV exporter'  | 
            ||
| 360 | )  | 
            ||
| 361 | parser.add_argument(  | 
            ||
| 362 | '--export-csv-overwrite',  | 
            ||
| 363 | action='store_true',  | 
            ||
| 364 | default=False,  | 
            ||
| 365 | dest='export_csv_overwrite',  | 
            ||
| 366 | help='overwrite existing CSV file',  | 
            ||
| 367 | )  | 
            ||
| 368 | parser.add_argument(  | 
            ||
| 369 | '--export-json-file', default='./glances.json', dest='export_json_file', help='file path for JSON exporter'  | 
            ||
| 370 | )  | 
            ||
| 371 | parser.add_argument(  | 
            ||
| 372 | '--export-graph-path',  | 
            ||
| 373 | default=tempfile.gettempdir(),  | 
            ||
| 374 | dest='export_graph_path',  | 
            ||
| 375 | help='Folder for Graph exporter',  | 
            ||
| 376 | )  | 
            ||
| 377 | parser.add_argument(  | 
            ||
| 378 | '--export-process-filter',  | 
            ||
| 379 | default=None,  | 
            ||
| 380 | type=str,  | 
            ||
| 381 | dest='export_process_filter',  | 
            ||
| 382 | help='set the export process filter (comma-separated list of regular expression)',  | 
            ||
| 383 | )  | 
            ||
| 384 | # Client/Server option  | 
            ||
| 385 | parser.add_argument(  | 
            ||
| 386 | '-c', '--client', dest='client', help='connect to a Glances server by IPv4/IPv6 address or hostname'  | 
            ||
| 387 | )  | 
            ||
| 388 | parser.add_argument(  | 
            ||
| 389 | '-s', '--server', action='store_true', default=False, dest='server', help='run Glances in server mode'  | 
            ||
| 390 | )  | 
            ||
| 391 | parser.add_argument(  | 
            ||
| 392 | '--browser',  | 
            ||
| 393 | action='store_true',  | 
            ||
| 394 | default=False,  | 
            ||
| 395 | dest='browser',  | 
            ||
| 396 | help='start TUI Central Glances Browser (use --browser -w to start WebUI Central Glances Browser)',  | 
            ||
| 397 | )  | 
            ||
| 398 | parser.add_argument(  | 
            ||
| 399 | '--disable-autodiscover',  | 
            ||
| 400 | action='store_true',  | 
            ||
| 401 | default=False,  | 
            ||
| 402 | dest='disable_autodiscover',  | 
            ||
| 403 | help='disable autodiscover feature',  | 
            ||
| 404 | )  | 
            ||
| 405 | parser.add_argument(  | 
            ||
| 406 | '-p',  | 
            ||
| 407 | '--port',  | 
            ||
| 408 | default=None,  | 
            ||
| 409 | type=int,  | 
            ||
| 410 | dest='port',  | 
            ||
| 411 |             help=f'define the client/server TCP port [default: {self.server_port}]', | 
            ||
| 412 | )  | 
            ||
| 413 | parser.add_argument(  | 
            ||
| 414 | '-B',  | 
            ||
| 415 | '--bind',  | 
            ||
| 416 | default='0.0.0.0',  | 
            ||
| 417 | dest='bind_address',  | 
            ||
| 418 | help='bind server to the given IPv4/IPv6 address or hostname',  | 
            ||
| 419 | )  | 
            ||
| 420 | parser.add_argument(  | 
            ||
| 421 | '--username',  | 
            ||
| 422 | action='store_true',  | 
            ||
| 423 | default=False,  | 
            ||
| 424 | dest='username_prompt',  | 
            ||
| 425 | help='define a client/server username',  | 
            ||
| 426 | )  | 
            ||
| 427 | parser.add_argument(  | 
            ||
| 428 | '--password',  | 
            ||
| 429 | action='store_true',  | 
            ||
| 430 | default=False,  | 
            ||
| 431 | dest='password_prompt',  | 
            ||
| 432 | help='define a client/server password',  | 
            ||
| 433 | )  | 
            ||
| 434 |         parser.add_argument('-u', dest='username_used', help='use the given client/server username') | 
            ||
| 435 |         parser.add_argument('--snmp-community', default='public', dest='snmp_community', help='SNMP community') | 
            ||
| 436 |         parser.add_argument('--snmp-port', default=161, type=int, dest='snmp_port', help='SNMP port') | 
            ||
| 437 |         parser.add_argument('--snmp-version', default='2c', dest='snmp_version', help='SNMP version (1, 2c or 3)') | 
            ||
| 438 |         parser.add_argument('--snmp-user', default='private', dest='snmp_user', help='SNMP username (only for SNMPv3)') | 
            ||
| 439 | parser.add_argument(  | 
            ||
| 440 | '--snmp-auth', default='password', dest='snmp_auth', help='SNMP authentication key (only for SNMPv3)'  | 
            ||
| 441 | )  | 
            ||
| 442 | parser.add_argument(  | 
            ||
| 443 | '--snmp-force', action='store_true', default=False, dest='snmp_force', help='force SNMP mode'  | 
            ||
| 444 | )  | 
            ||
| 445 | parser.add_argument(  | 
            ||
| 446 | '-t',  | 
            ||
| 447 | '--time',  | 
            ||
| 448 | default=self.DEFAULT_REFRESH_TIME,  | 
            ||
| 449 | type=float,  | 
            ||
| 450 | dest='time',  | 
            ||
| 451 |             help=f'set minimum refresh rate in seconds [default: {self.DEFAULT_REFRESH_TIME} sec]', | 
            ||
| 452 | )  | 
            ||
| 453 | parser.add_argument(  | 
            ||
| 454 | '-w',  | 
            ||
| 455 | '--webserver',  | 
            ||
| 456 | action='store_true',  | 
            ||
| 457 | default=False,  | 
            ||
| 458 | dest='webserver',  | 
            ||
| 459 | help='run Glances in web server mode (FastAPI, Uvicorn, Jinja2 libs needed)',  | 
            ||
| 460 | )  | 
            ||
| 461 | parser.add_argument(  | 
            ||
| 462 | '--cached-time',  | 
            ||
| 463 | default=self.cached_time,  | 
            ||
| 464 | type=int,  | 
            ||
| 465 | dest='cached_time',  | 
            ||
| 466 |             help=f'set the server cache time [default: {self.cached_time} sec]', | 
            ||
| 467 | )  | 
            ||
| 468 | parser.add_argument(  | 
            ||
| 469 | '--stop-after',  | 
            ||
| 470 | default=None,  | 
            ||
| 471 | type=int,  | 
            ||
| 472 | dest='stop_after',  | 
            ||
| 473 | help='stop Glances after n refresh',  | 
            ||
| 474 | )  | 
            ||
| 475 | parser.add_argument(  | 
            ||
| 476 | '--open-web-browser',  | 
            ||
| 477 | action='store_true',  | 
            ||
| 478 | default=False,  | 
            ||
| 479 | dest='open_web_browser',  | 
            ||
| 480 | help='try to open the Web UI in the default Web browser',  | 
            ||
| 481 | )  | 
            ||
| 482 | # Display options  | 
            ||
| 483 | parser.add_argument(  | 
            ||
| 484 | '-q',  | 
            ||
| 485 | '--quiet',  | 
            ||
| 486 | default=False,  | 
            ||
| 487 | action='store_true',  | 
            ||
| 488 | dest='quiet',  | 
            ||
| 489 | help='do not display the curses interface',  | 
            ||
| 490 | )  | 
            ||
| 491 | parser.add_argument(  | 
            ||
| 492 | '-f',  | 
            ||
| 493 | '--process-filter',  | 
            ||
| 494 | default=None,  | 
            ||
| 495 | type=str,  | 
            ||
| 496 | dest='process_filter',  | 
            ||
| 497 | help='set the process filter pattern (regular expression)',  | 
            ||
| 498 | )  | 
            ||
| 499 | parser.add_argument(  | 
            ||
| 500 | '--process-short-name',  | 
            ||
| 501 | action='store_true',  | 
            ||
| 502 | default=True,  | 
            ||
| 503 | dest='process_short_name',  | 
            ||
| 504 | help='force short name for processes name',  | 
            ||
| 505 | )  | 
            ||
| 506 | parser.add_argument(  | 
            ||
| 507 | '--process-long-name',  | 
            ||
| 508 | action='store_false',  | 
            ||
| 509 | default=False,  | 
            ||
| 510 | dest='process_short_name',  | 
            ||
| 511 | help='force long name for processes name',  | 
            ||
| 512 | )  | 
            ||
| 513 | parser.add_argument(  | 
            ||
| 514 | '--stdout',  | 
            ||
| 515 | default=None,  | 
            ||
| 516 | dest='stdout',  | 
            ||
| 517 | help='display stats to stdout, one stat per line (comma-separated list of plugins/plugins.attribute)',  | 
            ||
| 518 | )  | 
            ||
| 519 | parser.add_argument(  | 
            ||
| 520 | '--stdout-json',  | 
            ||
| 521 | default=None,  | 
            ||
| 522 | dest='stdout_json',  | 
            ||
| 523 | help='display stats to stdout, JSON format (comma-separated list of plugins/plugins.attribute)',  | 
            ||
| 524 | )  | 
            ||
| 525 | parser.add_argument(  | 
            ||
| 526 | '--stdout-csv',  | 
            ||
| 527 | default=None,  | 
            ||
| 528 | dest='stdout_csv',  | 
            ||
| 529 | help='display stats to stdout, CSV format (comma-separated list of plugins/plugins.attribute)',  | 
            ||
| 530 | )  | 
            ||
| 531 | parser.add_argument(  | 
            ||
| 532 | '--issue',  | 
            ||
| 533 | default=None,  | 
            ||
| 534 | action='store_true',  | 
            ||
| 535 | dest='stdout_issue',  | 
            ||
| 536 | help='test all plugins and exit (please copy/paste the output if you open an issue)',  | 
            ||
| 537 | )  | 
            ||
| 538 | parser.add_argument(  | 
            ||
| 539 | '--trace-malloc',  | 
            ||
| 540 | default=False,  | 
            ||
| 541 | action='store_true',  | 
            ||
| 542 | dest='trace_malloc',  | 
            ||
| 543 | help='trace memory allocation and display it at the end of the process (python 3.4 or higher needed)',  | 
            ||
| 544 | )  | 
            ||
| 545 | parser.add_argument(  | 
            ||
| 546 | '--memory-leak',  | 
            ||
| 547 | default=False,  | 
            ||
| 548 | action='store_true',  | 
            ||
| 549 | dest='memory_leak',  | 
            ||
| 550 | help='test memory leak (python 3.4 or higher needed)',  | 
            ||
| 551 | )  | 
            ||
| 552 | parser.add_argument(  | 
            ||
| 553 | '--api-doc',  | 
            ||
| 554 | default=None,  | 
            ||
| 555 | action='store_true',  | 
            ||
| 556 | dest='stdout_api_doc',  | 
            ||
| 557 | help='display Python API documentation',  | 
            ||
| 558 | )  | 
            ||
| 559 | parser.add_argument(  | 
            ||
| 560 | '--api-restful-doc',  | 
            ||
| 561 | default=None,  | 
            ||
| 562 | action='store_true',  | 
            ||
| 563 | dest='stdout_api_restful_doc',  | 
            ||
| 564 | help='display Restful API documentation',  | 
            ||
| 565 | )  | 
            ||
| 566 | if not WINDOWS:  | 
            ||
| 567 | parser.add_argument(  | 
            ||
| 568 | '--hide-kernel-threads',  | 
            ||
| 569 | action='store_true',  | 
            ||
| 570 | default=False,  | 
            ||
| 571 | dest='no_kernel_threads',  | 
            ||
| 572 | help='hide kernel threads in the process list (not available on Windows)',  | 
            ||
| 573 | )  | 
            ||
| 574 | parser.add_argument(  | 
            ||
| 575 | '-b',  | 
            ||
| 576 | '--byte',  | 
            ||
| 577 | action='store_true',  | 
            ||
| 578 | default=False,  | 
            ||
| 579 | dest='byte',  | 
            ||
| 580 | help='display network rate in bytes per second',  | 
            ||
| 581 | )  | 
            ||
| 582 | parser.add_argument(  | 
            ||
| 583 | '--diskio-show-ramfs',  | 
            ||
| 584 | action='store_true',  | 
            ||
| 585 | default=False,  | 
            ||
| 586 | dest='diskio_show_ramfs',  | 
            ||
| 587 | help='show RAM Fs in the DiskIO plugin',  | 
            ||
| 588 | )  | 
            ||
| 589 | parser.add_argument(  | 
            ||
| 590 | '--diskio-iops',  | 
            ||
| 591 | action='store_true',  | 
            ||
| 592 | default=False,  | 
            ||
| 593 | dest='diskio_iops',  | 
            ||
| 594 | help='show IO per second in the DiskIO plugin',  | 
            ||
| 595 | )  | 
            ||
| 596 | parser.add_argument(  | 
            ||
| 597 | '--diskio-latency',  | 
            ||
| 598 | action='store_true',  | 
            ||
| 599 | default=False,  | 
            ||
| 600 | dest='diskio_latency',  | 
            ||
| 601 | help='show IO latency in the DiskIO plugin',  | 
            ||
| 602 | )  | 
            ||
| 603 | parser.add_argument(  | 
            ||
| 604 | '--fahrenheit',  | 
            ||
| 605 | action='store_true',  | 
            ||
| 606 | default=False,  | 
            ||
| 607 | dest='fahrenheit',  | 
            ||
| 608 | help='display temperature in Fahrenheit (default is Celsius)',  | 
            ||
| 609 | )  | 
            ||
| 610 | parser.add_argument(  | 
            ||
| 611 | '--fs-free-space',  | 
            ||
| 612 | action='store_true',  | 
            ||
| 613 | default=False,  | 
            ||
| 614 | dest='fs_free_space',  | 
            ||
| 615 | help='display FS free space instead of used',  | 
            ||
| 616 | )  | 
            ||
| 617 | parser.add_argument(  | 
            ||
| 618 | '--sparkline',  | 
            ||
| 619 | action='store_true',  | 
            ||
| 620 | default=False,  | 
            ||
| 621 | dest='sparkline',  | 
            ||
| 622 | help='display sparklines instead of bar in the curses interface',  | 
            ||
| 623 | )  | 
            ||
| 624 | parser.add_argument(  | 
            ||
| 625 | '--disable-unicode',  | 
            ||
| 626 | action='store_true',  | 
            ||
| 627 | default=False,  | 
            ||
| 628 | dest='disable_unicode',  | 
            ||
| 629 | help='disable unicode characters in the curses interface',  | 
            ||
| 630 | )  | 
            ||
| 631 | parser.add_argument(  | 
            ||
| 632 | '--hide-public-info',  | 
            ||
| 633 | action='store_true',  | 
            ||
| 634 | default=False,  | 
            ||
| 635 | help='hide public information (like public IP)',  | 
            ||
| 636 | )  | 
            ||
| 637 | # Globals options  | 
            ||
| 638 | parser.add_argument(  | 
            ||
| 639 | '--disable-check-update',  | 
            ||
| 640 | action='store_true',  | 
            ||
| 641 | default=False,  | 
            ||
| 642 | dest='disable_check_update',  | 
            ||
| 643 | help='disable online Glances version ckeck',  | 
            ||
| 644 | )  | 
            ||
| 645 | parser.add_argument(  | 
            ||
| 646 | '--strftime',  | 
            ||
| 647 | dest='strftime_format',  | 
            ||
| 648 | default='',  | 
            ||
| 649 | help='strftime format string for displaying current date in standalone mode',  | 
            ||
| 650 | )  | 
            ||
| 651 | # Fetch  | 
            ||
| 652 | parser.add_argument(  | 
            ||
| 653 | '--fetch',  | 
            ||
| 654 | '--stdout-fetch',  | 
            ||
| 655 | action='store_true',  | 
            ||
| 656 | default=False,  | 
            ||
| 657 | dest='stdout_fetch',  | 
            ||
| 658 | help='display a (neo)fetch like summary and exit',  | 
            ||
| 659 | )  | 
            ||
| 660 | parser.add_argument(  | 
            ||
| 661 | '--fetch-template',  | 
            ||
| 662 | '--stdout-fetch-template',  | 
            ||
| 663 | dest='fetch_template',  | 
            ||
| 664 | default='',  | 
            ||
| 665 | help='overwrite default fetch template file',  | 
            ||
| 666 | )  | 
            ||
| 667 | |||
| 668 | return parser  | 
            ||
| 669 | |||
| 918 |