Changeset View
Changeset View
Standalone View
Standalone View
scap/main.py
Show First 20 Lines • Show All 822 Lines • ▼ Show 20 Lines | def main(self, *extra_args): | ||||
if use_cores < 1: | if use_cores < 1: | ||||
use_cores = max(multiprocessing.cpu_count() - 2, 1) | use_cores = max(multiprocessing.cpu_count() - 2, 1) | ||||
if not os.path.isdir(upstream_dir): | if not os.path.isdir(upstream_dir): | ||||
os.mkdir(upstream_dir) | os.mkdir(upstream_dir) | ||||
tasks.refresh_cdb_json_files(cdb_dir, use_cores, self.verbose) | tasks.refresh_cdb_json_files(cdb_dir, use_cores, self.verbose) | ||||
@cli.command('say') | |||||
class Say(cli.Application): | |||||
"""Scap propogranda of the lowest order.""" | |||||
@cli.argument('-w', '--width', type=int, | |||||
help='Column width for message box') | |||||
@cli.argument('message', nargs='*', help='message to print') | |||||
def main(self, *extra_args): | |||||
print utils.scap_say( | |||||
' '.join(self.arguments.message), width=self.arguments.width) | |||||
return 0 |
Content licensed under Creative Commons Attribution-ShareAlike 3.0 (CC-BY-SA) unless otherwise noted; code licensed under GNU General Public License (GPL) or other open source licenses. By using this site, you agree to the Terms of Use, Privacy Policy, and Code of Conduct. · Wikimedia Foundation · Privacy Policy · Code of Conduct · Terms of Use · Disclaimer · CC-BY-SA · GPL