-
Notifications
You must be signed in to change notification settings - Fork 167
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Importing a script to download the text from the wiki, and also impor…
…ting the SVG source of the logo (use Inkscape to view)
- Loading branch information
1 parent
51fb3d7
commit 9f4a462
Showing
2 changed files
with
526 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
import urllib | ||
from BeautifulSoup import BeautifulSoup | ||
|
||
wiki = "http://cclib.sourceforge.net/wiki" | ||
# http://openbabel.sourceforge.net/w/index.php?title=Special:Export&action=submit&pages=FAQ | ||
allpages = urllib.urlopen(wiki + "/index.php/Special:Allpages") | ||
|
||
soup = BeautifulSoup(allpages) | ||
|
||
hrefs = [] | ||
for anchor in soup('table')[2]('a'): | ||
hrefs.append(anchor['href'].split("/")[-1]) | ||
print hrefs | ||
|
||
params = urllib.urlencode({"action":"submit", | ||
"pages":"\n".join(hrefs)}) | ||
|
||
query = urllib.urlopen(wiki + "/index.php/Special:Export", params) | ||
outputfile = open("backup.xml","w") | ||
print >> outputfile, query.read() | ||
outputfile.close() |
Oops, something went wrong.