| OLD | NEW |
| 1 # -*- coding: utf-8 -*- |
| 1 # Copyright 2012 Google Inc. All Rights Reserved. | 2 # Copyright 2012 Google Inc. All Rights Reserved. |
| 2 # | 3 # |
| 3 # Licensed under the Apache License, Version 2.0 (the "License"); | 4 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 # you may not use this file except in compliance with the License. | 5 # you may not use this file except in compliance with the License. |
| 5 # You may obtain a copy of the License at | 6 # You may obtain a copy of the License at |
| 6 # | 7 # |
| 7 # http://www.apache.org/licenses/LICENSE-2.0 | 8 # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 # | 9 # |
| 9 # Unless required by applicable law or agreed to in writing, software | 10 # Unless required by applicable law or agreed to in writing, software |
| 10 # distributed under the License is distributed on an "AS IS" BASIS, | 11 # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 12 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 # See the License for the specific language governing permissions and | 13 # See the License for the specific language governing permissions and |
| 13 # limitations under the License. | 14 # limitations under the License. |
| 15 """Additional help about wildcards.""" |
| 14 | 16 |
| 15 from gslib.help_provider import HELP_NAME | 17 from __future__ import absolute_import |
| 16 from gslib.help_provider import HELP_NAME_ALIASES | 18 |
| 17 from gslib.help_provider import HELP_ONE_LINE_SUMMARY | |
| 18 from gslib.help_provider import HelpProvider | 19 from gslib.help_provider import HelpProvider |
| 19 from gslib.help_provider import HELP_TEXT | |
| 20 from gslib.help_provider import HelpType | |
| 21 from gslib.help_provider import HELP_TYPE | |
| 22 | 20 |
| 23 _detailed_help_text = (""" | 21 _DETAILED_HELP_TEXT = (""" |
| 24 <B>DESCRIPTION</B> | 22 <B>DESCRIPTION</B> |
| 25 gsutil supports URI wildcards. For example, the command: | 23 gsutil supports URI wildcards. For example, the command: |
| 26 | 24 |
| 27 gsutil cp gs://bucket/data/abc* . | 25 gsutil cp gs://bucket/data/abc* . |
| 28 | 26 |
| 29 will copy all objects that start with gs://bucket/data/abc followed by any | 27 will copy all objects that start with gs://bucket/data/abc followed by any |
| 30 number of characters within that subdirectory. | 28 number of characters within that subdirectory. |
| 31 | 29 |
| 32 | 30 |
| 33 <B>DIRECTORY BY DIRECTORY VS RECURSIVE WILDCARDS</B> | 31 <B>DIRECTORY BY DIRECTORY VS RECURSIVE WILDCARDS</B> |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 158 directories), but is implemented using a delimiter-less bucket listing | 156 directories), but is implemented using a delimiter-less bucket listing |
| 159 request (which means fewer bucket requests, though it will list the entire | 157 request (which means fewer bucket requests, though it will list the entire |
| 160 bucket and filter locally, so that could require a non-trivial amount of | 158 bucket and filter locally, so that could require a non-trivial amount of |
| 161 network traffic). | 159 network traffic). |
| 162 """) | 160 """) |
| 163 | 161 |
| 164 | 162 |
| 165 class CommandOptions(HelpProvider): | 163 class CommandOptions(HelpProvider): |
| 166 """Additional help about wildcards.""" | 164 """Additional help about wildcards.""" |
| 167 | 165 |
| 168 help_spec = { | 166 # Help specification. See help_provider.py for documentation. |
| 169 # Name of command or auxiliary help info for which this help applies. | 167 help_spec = HelpProvider.HelpSpec( |
| 170 HELP_NAME : 'wildcards', | 168 help_name='wildcards', |
| 171 # List of help name aliases. | 169 help_name_aliases=['wildcard', '*', '**'], |
| 172 HELP_NAME_ALIASES : ['wildcard', '*', '**'], | 170 help_type='additional_help', |
| 173 # Type of help: | 171 help_one_line_summary='Wildcard Names', |
| 174 HELP_TYPE : HelpType.ADDITIONAL_HELP, | 172 help_text=_DETAILED_HELP_TEXT, |
| 175 # One line summary of this help. | 173 subcommand_help_text={}, |
| 176 HELP_ONE_LINE_SUMMARY : 'Wildcard Names', | 174 ) |
| 177 # The full help text. | |
| 178 HELP_TEXT : _detailed_help_text, | |
| 179 } | |
| OLD | NEW |