* Docstring for `tool_option` is copied from another method, should be its own.
* Minor style nitpick: `import git` is a 3rd-party lib so should be in the 2nd 
section of imports, not the 1st section
* the `forgewiki/templates/wiki/page_history.html` change doesn't seem right.  
It previously showed the revision date and now it shows the previous revision 
date, it seems.
* the github project name needs to allow uppercase characters (e.g. 
OpenRefine/OpenRefine)

## formatting

* `render_any_markup` returns an HTML string.  If we're handling Markdown 
input, we should keep the Markdown and not render it at all (just special 
conversions later in [#6622]).  For all others, we might want to run it through 
html2text so that it can be markdown instead of HTML, but so far things are 
looking pretty good just saving HTML in the wiki markdown content, and staying 
free from the html2text dependency is nice.
* I tested with https://github.com/mxcl/homebrew/wiki/_pages and found a few 
issues:
* there's a mediawiki page which isn't supported by pypeline at all: 
http://pypeline.sourceforge.net/tour.html#getting-started
    * for all the formats supported by github and not by pypeline, can you 
evaluate adding support to pypeline?  Actually, for mediawiki, we already have 
a `mediawiki2markdown` function which we might want to use as a special case.  
http://pypeline.sourceforge.net/tour.html#extending-pypeline shows how to 
extend pypeline and we can do that in Allura, but I'd rather see the support 
added to pypeline itself, so if there are good conversion methods we can 
create, lets go ahead and add it to pypeline directly.
* textile pages end up displaying as plain text because they have a tab in 
front of each line of HTML, and that indentation triggers markdown's 
preformatted mode.  Can you figure out where that's coming from and make sure 
we don't get leading whitespace on lines?

## page links

* links go back to github still.  We should rewrite all links that match the 
wiki URL prefix.  I think you've done this for the trac import already, so that 
technique can be re-used (perhaps factored out into a helper).
* many page names have dashes instead of spaces in them.  I haven't 
investigated this fully to know how we want to handle.


---

** [tickets:#6534] Wiki importer for github**

**Status:** in-progress
**Labels:** import github 42cc 
**Created:** Wed Aug 07, 2013 09:54 PM UTC by Dave Brondsema
**Last Updated:** Fri Sep 13, 2013 06:46 PM UTC
**Owner:** nobody

Wikis are git repositories and can be accessed like `git clone 
https://github.com/OpenRefine/OpenRefine.wiki` for example.  Check the main 
repo API first to see if the repo has wiki enabled.  You can see 
https://sourceforge.net/p/googlecodewikiimporter/git/ for reference as an 
example of another wiki importer.  It is a separate repo because it needs the 
"html2text" package to convert html to markdown, and that is a GPL library.

Github supports many markup types.  Find a full list and determine what the 
best way to convert them to markdown is.  My guess is that few formats will 
have tools available to convert them directly to markdown, so my likely 
recommendation would be to render them as HTML (using 
[pypeline](http://pypeline.sourceforge.net/) as a generic way to handle many of 
those formats) and then html2text to get it into markdown.

If html2text or any other GPL library is needed, this will have to be a 
separate repo from the main Allura repo.  So please evaluate & test the 
conversion options first, before putting code into place.

A second phase to all this (i.e. do it separately, after the basic import is 
all working) would be to handle revision history.  This would mean going 
through each commit in the wiki git repo, and converting & updating every file 
that changes.  This may be very time consuming, so when we get to it, we may 
want it to be a checkbox option, so users only do it if they want it.


---

Sent from sourceforge.net because allura-dev@incubator.apache.org is subscribed 
to https://sourceforge.net/p/allura/tickets/

To unsubscribe from further messages, a project admin can change settings at 
https://sourceforge.net/p/allura/admin/tickets/options.  Or, if this is a 
mailing list, you can unsubscribe from the mailing list.

Reply via email to