StartPad.org » Blog » mckoss's blog » Web Applications: Two Steps Forward, One Step Back

Web Applications: Two Steps Forward, One Step Back

I love web-based applications; they have so many nice attributes, like being accessible from anywhere, not requiring software installation, etc.  Yet they can be amazingly under-featured.  We forget that our desktop client applications have evolved over many decades, to the point that most operations we need to perform have been optimized by the successful application developers.

Take, for example, basic file operations.  We take for granted that we can open a window on our computer, and copy and paste a whole batch of files to move them from one directory to another (or even on a file share on another computer on the network).

Yet this very basic operations is incredibly tedious with most web applications.  The whole notion of copy and paste of just about any "object" we deal with is a mature feature of desktop operating systems, yet nearly non-existant on the web, or even in custom mobile applictions (on iPhone or Andriod, say).

Today I had the task of moving files that were stored in a SharePoint server to a new location.  In the version of SharePoint I have, the web interface does not allow for bulk copy and paste (webdav might have been a possibility, but that has always been very buggy when I've tried it).

Since I'm a developer, I decided it was a much better use of my time to write a program to scrape a SharePoint web site and download the documents, than to manually click on and download each of the several hundred files I needed to copy (isn't is inhumane to make ANYONE go through this kind of mindless operation?).

I've attached this Python program in case there are others that want to do this.  Unfortunately, it's not as easy to run as a stand-alone application.  Here are the steps you need:

  1. Download Python (I use Python version 2.5).
  2. Dowload the BeautifulSoup library (use version 3.0.7a - future version seems to croak on the sharepoint html - unfortunatly Python's built-in HTML parsing libararies are also not that reslient to unexpected or mal-formed html tags).  You'll need to run 'setup.py install' to install the library for use by Python.
  3. Download download_sp.py (see attachment below).

To do a bulk download from a SharePoint document library execute this command:

download_sp.py -d <url_of_sharepoint_doc_lib> -t <local_directory>

The program will prompt you for a password if needed, and then crawl the web page to find all the embedded document links, and download them to your local directory.

 

AttachmentSize
download_sp.py_.txt4.73 KB

I hear your pain. At Smartsheet we've been trying hard to incorporate standard desktop features like copy and paste into our web app. While we haven’t solved copy and paste of attachments, we do support the ability to copy and paste from Excel into a Smartsheet, drag and drop support in our UI, right-click context menus, and many of the common things folks expect from a desktop app. One of the biggest challenges is getting users to even understand that a web app can support those things.