Tuesday, June 30, 2009

How can I create a local copy of a Sharepoint wiki?

I asked this one on Microsoft TechNet (seems to have replaced their usenet groups):

How can I create a local copy of a Sharepoint wiki

I'd like to have a local copy of the wiki pages on my hard drive so it's available when I'm offline. The links and editor don't need to work, I just need to be able to feed it to Windows Search so I can find the wiki material.

I've tried a couple of offline browser products to see if I could havest the page, but so far the results have been mediocre. I also tried accessing the wiki list using Access 2007 to see if I could get at the files (documents) attached in the list. No luck.

I'm a SP administrator, but I have no server access.

Is there any way to get a local copy of the wiki?

I think the answer is “no”, unfortunately. For me this is the biggest drawback of Microsoft’s Wiki implementation. (Number 2, curiously, is the absence of a “paste as text” option. The rich text editor gets hopelessly confused by formatted text.)

Update 7/6/09: The Colligo suite of products provides offline access to a lot of SP content. Unfortunately, they’re just starting to look at support for the wiki content. Their application architecture is not ideal for this purpose however.

The Colligo application suite is designed to support offline editing and synchronization of SP content. That’s a very ambitious goal, and it’s easy to see why they need to use a proprietary database to store content and to hide the data from ‘backdoor’ manipulation in ‘…. Local Settings\Application Data\ColligoOfflineClient\Storage5…’.

Sadly, this doesn’t fit that well with Microsoft’s oddball Wiki implementation. I’d like to be able to view the Wiki pages in IE, to have local links become ‘relative links’ (so they work against the local store), and expose the data to Windows Search. None of that works with the proprietary store. (I don’t care about offline editing as much as having an offline store, so the main value of the Colligo architecture doesn’t apply to me.)

Lastly their HTML viewer is just a placeholder for future work, it’s keyhole view of the Wiki data. Of course they’ll improve this, but the other challenges are tougher.

There’s not a lot of alternatives however. I’d go for it if Colligo were to add an export feature that would create a static HTML view of the wiki data on demand.

Update 11/2/09: There's still no answer.

8 comments:

DoDoLurker said...

If you have Admin/Owner access (i.e., you can alter templates with SharePoint Designer), and there is a Document Library associated with the Wiki (or an image library), you should be able to open up the Library as a folder using a file:// link.

Once you open up the library as a folder, you can go up a folder level and have access to a folder called something like "Wiki Pages", which has all of the .aspx files (best-case) in the wiki that you can copy to a local drive and view off-line.

John Gordon said...

It's not hard to get at the .aspx files. Problem is, they don't actually hold content information. They specify layout, rendering, etc. Sharepoint pulls the actual markup/content from a different repository -- I'm not sure where it keeps it.

Michelle said...

I've been pulling down my wiki for archiving purposes since my wiki lives on the corporate server and I want to have a personal copy of all the information I've collected in case I'm laid off. I created a view that showed all the important content that I wanted to archive (the wiki content is a column). From there I can export the whole wiki to a spreadsheet. Pretty barebones, but it does the job...

John Gordon said...

Michelle, the spreadsheet your downloading doesn't contain the information you think it contains. It really only has the titles.

dg said...

You can edit the view to include a 'wiki content' column in which case the exported spreadsheet does include the page content. Still pretty far from an acceptable export solution, imo.

John Gordon said...

dg - I think that's new to me. I'll try with a big wiki and report back.

Christian said...

Hi,

just some days ago I had a similar problem and was pretty disappointed that such an export is not offered by SP right out of the box.

I tried the mentioned Excel export but formatting was not preserved as well as referenced images were gone.

Here is a solution that worked for me (preserved formatting + inline images + working wiki links).
- I started with Firefox
- Firefox had problems with authentication, but here is the solution: http://blog.rafelo.com/2008/06/firefox-and-integrated-authentication.html
- I installed the Scrapbook add-on.
- I downloaded all wiki pages with Scrapbook. One way to do it
-- I navigated to the SP view, where all wiki files are shown
-- I selected/highlighted all the file names
-- Told Scrapbook to download the selection (what a cool feature)
-- Then I used the export to have all pages in a specific place on my disk
- I checked the index.html in each folder and hey: It looked great

BUT: THe wiki links to other wiki pages were still refering to my sp url.

So the only thing to do was replacing the url with some relative filenames. A very basic python script did this it for me (pages with fixed links are indexlocal.html). I attached the script for reference (it shows the idea, there is a lot of room for improvement)


HTH

Christian

--- the script ---
import os
import sys
import glob

room="MySite"
roomurl="https://server/whatever/mysite"
delim="_-_"

for dir in glob.glob(room+"*"):
wikiname = dir[len(room+delim):]
print dir, ": ", wikiname
oldpage= file(dir + "\\index.html").readlines()
newpage = file(dir + "\\indexlocal.html", "w")
for line in oldpage:
line=line.replace(roomurl+"/Wiki%20Pages/", "../"+room+delim)
line=line.replace(".aspx", "/indexlocal.html")
newpage.write(line)
newpage.close()

Anonymous said...

Can you give Url of the SharePoint Wiki that you're trying to download?

FYI, you can post it on our forum
http://maximumsoft.com/forums/forum_topics.asp?FID=1

Kirill K.
WebCopier Support Team