Replace FSF's mailing address with FSF website
[mw] / src / mw / clicommands.py
index 77148934227b3f0167dace94254edb04b1113399..f1b0ce81661afda67ab94b613944ec33f784c9b1 100644 (file)
@@ -13,8 +13,7 @@
 # GNU General Public License for more details.
 #
 # You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
+# with this program.  If not, see <http://www.gnu.org/licenses/>.
 ###
 
 import getpass
@@ -38,6 +37,7 @@ class CommandBase(object):
                                   dest='use_auth', help='force authentication '
                                   'even if not required')
         self.parser.add_option_group(global_options)
+        self.shortcuts = []
 
     def main(self):
         (self.options, self.args) = self.parser.parse_args()
@@ -75,6 +75,7 @@ class FetchCommand(CommandBase):
     def __init__(self):
         usage = '%prog fetch [options] PAGENAME ...'
         CommandBase.__init__(self, 'fetch', 'fetch remote pages', usage)
+        self.shortcuts.append('ft')
 
     def _do_command(self):
         self._die_if_no_init()
@@ -95,7 +96,8 @@ class FetchCommand(CommandBase):
                                            response[pageid]['title'],
                                            revid)
                 self.metadir.add_rv_info(response[pageid]['revisions'][0])
-                fd = file(os.path.join(self.metadir.root, \
-                        response[pageid]['title'].replace(' ', '_') + \
-                        '.wiki'), 'w')
+                filename = response[pageid]['title'].replace(' ', '_')
+                filename = filename.replace('/', '!')
+                fd = file(os.path.join(self.metadir.root, filename + '.wiki'),
+                          'w')
                 fd.write(response[pageid]['revisions'][0]['*'].encode('utf-8'))

Benjamin Mako Hill || Want to submit a patch?