Permalink
Browse files

Merge pull request #7 from waldir/patch-1

Use semantic linebreaks in README; mention dependencies; add spaces after commas
  • Loading branch information...
ttencate committed Feb 18, 2013
2 parents d5b4b50 + 454e6ae commit aa4bfe2498c7726b02cdbbda6b794af9113219d3
Showing with 41 additions and 15 deletions.
  1. +39 −13 README.md
  2. +2 −2 issues.py
View
@@ -1,11 +1,18 @@
sf2github README
================
-`sf2github` is a Python program that reads an XML export from a SourceForge project and pushes this data to GitHub via its REST API.
+`sf2github` is a Python program
+that reads an XML export from a SourceForge project
+and pushes this data to GitHub via its REST API.
-The script is currently very incomplete and barely tested. If it works for you, great; if not, fix it up and send me a pull request! Currently, only migration of tracker issues is partly implemented, and there's little error handling.
+The script is currently very incomplete and barely tested.
+If it works for you, great; if not, fix it up and send me a pull request!
+Currently, only migration of tracker issues is partly implemented,
+and there's little error handling.
-Also note that the GitHub API is quite slow, taking about 5 seconds per request on my machine and internet connection. Migration of a large project will take a while.
+Also note that the GitHub API is quite slow,
+taking about 5 seconds per request on my machine and internet connection.
+Migration of a large project will take a while.
Issue migration
---------------
@@ -15,31 +22,50 @@ What works (for me):
* SF tracker issues become GitHub tracker issues.
* Comments on SF become comments in GitHub.
* Groups and categories on SF both become labels on GitHub.
-* Issues with a status that is exactly the text "Closed" or "Deleted" will be closed on GitHub.
-* Items from trackers with the default names "Bug", "Feature Request", "Patch" and "Tech Support" will receive default prefixes in their title (see the code). For trackers with other names, the user will be prompted.
+* Issues with a status that is exactly the text "Closed" or "Deleted"
+ will be closed on GitHub.
+* Items from trackers with the default names
+ "Bug", "Feature Request", "Patch" and "Tech Support"
+ will receive default prefixes in their title (see the code).
+ For trackers with other names, the user will be prompted.
Limitations:
-* All issues and comments will be owned by the project's owner on GitHub, but mention the SF username of the original submitter.
-* Creation times will be the date of the import, not the creation time from SourceForge.
-* There's some rubbish in the comment text sometimes (Logged In, user_id, Originator) but this is in the SF XML export.
+* All issues and comments will be owned by the project's owner on GitHub,
+ but mention the SF username of the original submitter.
+* Creation times will be the date of the import,
+ not the creation time from SourceForge.
+* There's some rubbish in the comment text sometimes
+ (Logged In, user_id, Originator)
+ but this is in the SF XML export.
Code migration
--------------
-This script doesn't help you to migrate code from SF's Subversion to GitHub. However, I found the following page helpful in doing that: http://help.github.com/svn-importing/
+This script doesn't help you to migrate code from SF's Subversion to GitHub.
+However, I found the following page helpful in doing that:
+http://help.github.com/svn-importing/
Usage
-----
-From SourceForge, you need to export the tracker data in XML. Read [here](https://sourceforge.net/apps/trac/sourceforge/wiki/XML%20export) for instructions.
+sf2github depends on the [BeautifulSoup](http://www.crummy.com/software/BeautifulSoup/)
+and the [requests](http://docs.python-requests.org/en/latest/) modules.
+If you don't have them, install them first.
-Run the `issues.py` script and it will print further instructions. Basically, if your SF XML export is in `foo.xml`, your GitHub username is `john` and your repository is `bar`:
+From SourceForge, you need to export the tracker data in XML.
+Read [here](https://sourceforge.net/apps/trac/sourceforge/wiki/XML export) for instructions.
+
+Run the `issues.py` script and it will print further instructions.
+Basically, if your SF XML export is in `foo.xml`,
+your GitHub username is `john`
+and your repository is `bar`:
./issues.py foo.xml john/bar
License
-------
-This software is in the public domain. I accept no responsibility for any damage resulting from it. Use at your own risk.
-
+This software is in the public domain.
+I accept no responsibility for any damage resulting from it.
+Use at your own risk.
View
@@ -199,7 +199,7 @@ def getIssueTitlePrefix(trackername):
return prefixes[trackername]
prefix = "[" + trackername + "]"
- if not userVerify("Tracker '" + trackername + "' is unknown,"
+ if not userVerify("Tracker '" + trackername + "' is unknown, "
+ "I would use the prefix '" + prefix + "', ok?", False):
while True:
@@ -214,7 +214,7 @@ def getIssueTitlePrefix(trackername):
for tracker in trackers:
trackeritems = tracker.tracker_items('tracker_item', recursive=False)
trackername = tracker.description.string
- print "Found tracker:", trackername, ",", len(trackeritems), "items"
+ print "Found tracker:", trackername, ", ", len(trackeritems), "items"
trackername = trackername.replace("Tracking System", "")
trackername = trackername.strip()

0 comments on commit aa4bfe2

Please sign in to comment.