Skip to content

Commit 8b28fab

Browse files
author
Richard Jones
committed
*** empty log message ***
1 parent 8f32535 commit 8b28fab

File tree

4 files changed

+28
-88
lines changed

4 files changed

+28
-88
lines changed

I18N_PROGRESS.txt

Lines changed: 0 additions & 84 deletions
This file was deleted.

doc/announcement.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,10 @@ To give Roundup a try, just download (see below), unpack and run::
2121

2222
python demo.py
2323

24+
Release info and download page:
25+
http://cheeseshop.python.org/roundup
2426
Source and documentation is available at the website:
2527
http://roundup.sourceforge.net/
26-
Release Info (via download page):
27-
http://sourceforge.net/projects/roundup
2828
Mailing lists - the place to ask questions:
2929
http://sourceforge.net/mail/?group_id=31577
3030

scripts/hyperdb_example.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
from roundup.hyperdb import String, Number, Multilink
2+
from roundup.backends.back_bsddb import Database, Class
3+
4+
class config:
5+
DATABASE='/tmp/hyperdb_example'
6+
7+
db = Database(config, 'admin')
8+
spam = Class(db, 'spam', name=String(), size=Number())
9+
widget = Class(db, 'widget', title=String(), spam=Multilink('spam'))
10+
11+
oneid = spam.create(name='one', size=1)
12+
twoid = spam.create(name='two', size=2)
13+
14+
widgetid = widget.create(title='a widget', spam=[oneid, twoid])
15+
16+
# dumb, simple query
17+
print widget.find(spam=oneid)
18+
print widget.history(widgetid)
19+
print widget.search_text(

scripts/import_sf.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,13 @@
2121
And you're done!
2222
'''
2323

24-
import sys, sets, os, csv, time, urllib2, httplib, mimetypes
24+
import sys, sets, os, csv, time, urllib2, httplib, mimetypes, urlparse
2525
from elementtree import ElementTree
2626

2727
from roundup import instance, hyperdb, date, support, password
2828

29+
DL_URL = 'http://sourceforge.net/tracker/download.php?group_id=%(group_id)s&atid=%(atid)s&aid=%(aid)s'
30+
2931
def get_url(aid):
3032
""" so basically we have to jump through hoops, given an artifact id, to
3133
figure what the URL should be to access that artifact, and hence any
@@ -34,7 +36,10 @@ def get_url(aid):
3436
conn.request("GET", "/support/tracker.php?aid=%s"%aid)
3537
response = conn.getresponse()
3638
assert response.status == 302, 'response code was %s'%response.status
37-
return 'http://sourceforge.net' + response.getheader('location')
39+
location = response.getheader('location')
40+
query = urlparse.urlparse(response.getheader('location'))[-2]
41+
info = dict([param.split('=') for param in query.split('&')])
42+
return DOWNLOAD_TEMPLATE%info
3843

3944
def fetch_files(xml_file, file_dir):
4045
""" Fetch files referenced in the xml_file into the dir file_dir. """

0 commit comments

Comments
 (0)