Thread: [Rest2web-develop] Recent Issues
Brought to you by:
mjfoord
From: Michael F. <mi...@pc...> - 2006-08-03 22:19:37
|
Also posted to the rest2web -develop list on the off chance that the mailing list actually works... Discussion on bugfixes prior to new release and *possible* (probable ?) packaging as a debian package. If this happens there will be a bug tracker at : http://bugs.debian.org/rest2web Which does not yet exist, but : http://bugs.debian.org/rest2web;pend-exc=done;include=upstream;exclude=wontfix > -------- Original Message -------- > Subject: Re: Issue Tracking > Date: Thu, 3 Aug 2006 15:15:14 +0100 > From: martin f krafft <ma...@ma...> > To: Michael Foord <fuz...@vo...> > > also sprach Michael Foord <fuz...@vo...> [2006.08.03.1456 > +0100]: >> Are you able to set it up ? It sounds like a good idea. If you >> need me to 'make the first step' (or second, or third...) let me >> know. > > It will be set up automatically once I make the first upload. Right > now, the package fails to build because of the > reference/uservalues.txt error I sent to you yesterday. But once it > builds without interruption, I will upload an SVN snapshot. > > Note that I have to > > sed -e 's,pause = .*,pause = False,' make_dist.py > > make_dist_nopause.py; > python make_dist_nopause.py; > rm -f make_dist_nopause.py; > > during build. Maybe make_dist.py could be made to not pause, or > could get a command line argument to prevent the pause? make_dist.py now takes a 'nopause' option as a command line argument. Breadcrumbs patch applied. SVN access granted. Please don't use it until *after* the release. Whilst I'm preparing a release I'd rather apply patches manually. Perhaps you could confirm that it works though (or at least tell me if it doesn't). By the way, in the absence of a working mailing list, I'm happy (and grateful) to receive bug reports directly. Fixed bug when ``final_encoding`` is ``None``. I don't think I'm going to be able to setup an svn commit' mailing list on the current repository. I've asked 'webfaction' and am awaiting confirmation. If they say no I'll have to consider what to do. Default config file is now ``r2w.ini``. ``rest2web.ini`` is still supported for backwards compatibility. (To be removed in a future version). Fixed bug with ``standerr`` where no logfile is used. Looks like their is a bug in 'thispage' (i.e. it doesn't work). I'm fixing this now (I hope). All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml |
From: martin f k. <ma...@ma...> - 2006-08-04 09:29:05
|
also sprach Michael Foord <mi...@pc...> [2006.08.03.2322 +0100]: > If this happens there will be a bug tracker at : >=20 > http://bugs.debian.org/rest2web >=20 > Which does not yet exist, but : >=20 > http://bugs.debian.org/rest2web;pend-exc=3Ddone;include=3Dupstream;exclud= e=3Dwontfix Clarification: I will upload the Debian package RSN now, then the above links will work. The second one is intended for Michael as it lists only those bugs I/we mark as upstream-relevant, and which have not been closed or marked wontfix. http://bugs.debian.org has the details. --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "ah, but a man's reach should exceed his grasp, or what's a heaven for?" -- robert browning |
From: martin f k. <ma...@ma...> - 2006-08-07 21:23:52
|
also sprach martin f krafft <ma...@ma...> [2006.08.04.1029 +0100]: > > If this happens there will be a bug tracker at : > >=20 > > http://bugs.debian.org/rest2web > >=20 > > Which does not yet exist, but : > >=20 > > http://bugs.debian.org/rest2web;pend-exc=3Ddone;include=3Dupstream;excl= ude=3Dwontfix >=20 > Clarification: I will upload the Debian package RSN now, then the > above links will work. The second one is intended for Michael as it > lists only those bugs I/we mark as upstream-relevant, and which have > not been closed or marked wontfix. >=20 > http://bugs.debian.org has the details. The page is now in place. There will also be http://packages.qa.debian.org/r/rest2web.html sometime soon to allow people to keep track. I am also going to subscribe this mailing list to receive all bug reports, so expect a confirmation mail. :) Oh, and 0.5.0~beta~svn-r201-1 should be in unstable now. Cheers, --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "women love us for our defects. if we have enough of them, they will forgive us everything, even our gigantic intellects." -- oscar wilde |
From: Michael F. <mic...@re...> - 2006-08-04 13:43:56
|
Michael Foord wrote: > make_dist.py now takes a 'nopause' option as a command line argument. > > Breadcrumbs patch applied. (More readable HTML and '>' default > separator) > > Fixed bug when ``final_encoding`` is ``None``. > > Default config file is now ``r2w.ini``. ``rest2web.ini`` is still > supported for backwards compatibility. (To be removed in a future > version). > > Fixed bug with ``standerr`` where no logfile is used. > Above changes (plus some minor doc updates) now applied to SVN, repository was down again last night. As this was the first interruption in the otherwise good (and free) service from Python-hosting, I'm inclined to trust them for a while. Still further doc changes to do, bug to fix with 'thispage', and possible changes to 'include' before release will be done. Fuzzyman http://www.voidspace.org.uk/python/index.shtml |
From: martin f k. <ma...@ma...> - 2006-08-05 12:58:20
|
Michael, here's another question for you... take a look at http://ailab.ch.org and take note of the section tabs on the left hand side... if you click on one, it gets you to the subsection and then stays highlighted. The way I did this was with CSS, setting the "selected" class based on the current URL and the name of the section. So, for instance, if the URL was /projects/adapt, then the entry for /projects would get the selected class. How would I do this with rest2web? There are sections and while it would be trivial to figure out the current page's section and set the class accordingly, I cannot iterate through the sections to generate the list and get a single target URL for each section, there is no "main page" of a section. I basically want/need a navigation method that's not like the sidebar and not like minibar, but site-wide. Cheers, --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "with sufficient thrust, pigs fly just fine. however, this is not necessarily a good idea. it is hard to be sure where they are going to land, and it could be dangerous sitting under them as they fly overhead." -- rfc 1925 |
From: Gael V. <gae...@no...> - 2006-08-05 13:06:40
|
On Fri, Aug 04, 2006 at 02:54:43PM +0100, martin f krafft wrote: > here's another question for you... take a look at > http://ailab.ch.org and take note of the section tabs on the left > hand side... if you click on one, it gets you to the subsection and > then stays highlighted. I cannot find http://ailab.ch.org but would something like http://gael-varoquaux.info satisfy you ? --=20 Ga=EBl |
From: martin f k. <ma...@ma...> - 2006-08-05 21:42:30
|
also sprach martin f krafft <ma...@ma...> [2006.08.04.1454 +0100]: > here's another question for you... take a look at > http://ailab.ch.org and take note of the section tabs on the left > hand side... if you click on one, it gets you to the subsection and > then stays highlighted. FWIW, I got it working the way I want it (I think), see http://martin-krafft.net/phd/ . The CSS that makes it look good (IMHO at least) is http://martin-krafft.net/phd/css/screen.css . The code I use for template.txt is below. The system works with uservalues to be defined in the base page of a category: uservalues category_name: Contact category_prio: 99 /uservalues Both values are optional, but at least one has to exist, or else the system does not recognise the page as a category definition. If the name is left out, the link_title (or page_title) is used. If the priority is left out, 50 is used. Tabs are sorted according to priority, then category name. This can probable be improved, and added to functions.py at one point. Thanks, Michael, for your help! <div id=3D"nav"> <# def category_list(indextree): l =3D [] uv =3D indextree.get('uservalues', {}) if uv.has_key('category_name') \ or uv.has_key('category_prio'): prio =3D uv.get('category_prio', 'default') if prio =3D=3D 'default': prio =3D 50 l.append((int(prio),=20 uv.get('category_name', indextree['link-title']), indextree['target'], indextree['thispage'])) if indextree['pages'] is not None: for p in indextree['pages']: l +=3D category_list(p) l.sort() return l def is_current_category(page, category): p =3D page while p is not None: uv =3D p.get('uservalues', {}) cat_name =3D uv.get('category_name', p['link-title']) if cat_name =3D=3D category: # only return true for the site root if the current page is the s= ite # root. if we ended up at the site root because no matching categ= ory # was found, return false return p['target'] =3D=3D page['target'] or p.get('parent') is no= t None p =3D p.get('parent', None) return False l =3D category_list(indextree) if len(l) > 0: print '<ul id=3D"global-links">' from sys import stdout for i in l: print '<li' if is_current_category(thispage, i[1]): print ' class=3D"current"' print '><a href=3D"%s">%s</a></li>' % (i[2], i[1]) #> </div> --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "they that can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety." -- benjamin franklin |
From: martin f k. <ma...@ma...> - 2006-08-05 22:22:18
|
also sprach martin f krafft <ma...@ma...> [2006.08.05.2234 +0100]: > The code I use for template.txt is below. as I keep developing it... http://svn.madduck.net/phd/web/ --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 i must confess, I was born at a very early age. -- groucho marx |
From: martin f k. <ma...@ma...> - 2006-08-06 01:25:18
|
also sprach Michael Foord <mi...@pc...> [2006.08.03.2322 +0100]: > make_dist.py now takes a 'nopause' option as a command line argument. Can r2w also get an option like this, to override the r2w.ini setting? The following patch implements -n/--nopause Index: rest2web/command_line.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- rest2web/command_line.py (revision 194) +++ rest2web/command_line.py (working copy) @@ -49,6 +49,7 @@ 'template': None, 'uservalues': [], 'force': False, + 'nopause': False, } =20 usage =3D "%prog [options] config_file" @@ -88,6 +89,10 @@ parser.add_option("-f", '--force', action=3D"store_true", dest=3D"forc= e", help=3D"Force site without indexes, restindexes or template.") # + # No pause + parser.add_option("-n", '--nopause', action=3D"store_true", dest=3D"no= pause", + help=3D"Do not pause after processing (overrides setting in config= file).") + # parser.set_defaults(**DEFAULTS) # (option_obj, args) =3D parser.parse_args() @@ -107,6 +112,7 @@ # options['uservalues'] =3D get_uservalues(option_obj.uservalues, enc) options['force'] =3D option_obj.force + options['nopause'] =3D option_obj.nopause # # Sort the arguments if args: Index: r2w.py =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D --- r2w.py (revision 194) +++ r2w.py (working copy) @@ -134,6 +134,7 @@ pass # options, config =3D get_config() + print options if os.path.isfile('__dist__'): print 'Won\'t run from distribution directory.' print "Run 'make_dist.py' and use the distribution it creates." @@ -202,7 +203,8 @@ if standerr: standerr.close() # - if istrue(config.get('pause', 'False')): + if not options.get('nopause', False) \ + and istrue(config.get('pause', 'False')): raw_input('Hit return to continue >>> ') =20 """ Thanks, --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 "violence is the last refuge of the incompetent" -- isaac asimov |
From: martin f k. <ma...@ma...> - 2006-08-06 01:27:57
|
also sprach martin f krafft <ma...@ma...> [2006.08.06.0225 +0100]: > Index: r2w.py > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > --- r2w.py (revision 194) > +++ r2w.py (working copy) > @@ -134,6 +134,7 @@ > pass > # > options, config =3D get_config() > + print options > if os.path.isfile('__dist__'): > print 'Won\'t run from distribution directory.' > print "Run 'make_dist.py' and use the distribution it creates." mh, i hope you'll ignore this chunk. :) --=20 martin; (greetings from the heart of the sun.) \____ echo mailto: !#^."<*>"|tr "<*> mailto:" net@madduck =20 spamtraps: mad...@ma... =20 perl -e 'print "The earth is a disk!\n" if ( "earth" =3D=3D "flat" );' |
From: Michael F. <fuz...@vo...> - 2006-08-06 15:20:12
|
martin f krafft wrote: > also sprach Michael Foord <mi...@pc...> [2006.08.03.2322 +0100]: > >> make_dist.py now takes a 'nopause' option as a command line argument. >> > > Can r2w also get an option like this, to override the r2w.ini > setting? The following patch implements -n/--nopause > This patch is applied, but not yet committed. I will fix the unicode bug first. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Index: rest2web/command_line.py > =================================================================== > --- rest2web/command_line.py (revision 194) > +++ rest2web/command_line.py (working copy) > @@ -49,6 +49,7 @@ > 'template': None, > 'uservalues': [], > 'force': False, > + 'nopause': False, > } > > usage = "%prog [options] config_file" > @@ -88,6 +89,10 @@ > parser.add_option("-f", '--force', action="store_true", dest="force", > help="Force site without indexes, restindexes or template.") > # > + # No pause > + parser.add_option("-n", '--nopause', action="store_true", dest="nopause", > + help="Do not pause after processing (overrides setting in config file).") > + # > parser.set_defaults(**DEFAULTS) > # > (option_obj, args) = parser.parse_args() > @@ -107,6 +112,7 @@ > # > options['uservalues'] = get_uservalues(option_obj.uservalues, enc) > options['force'] = option_obj.force > + options['nopause'] = option_obj.nopause > # > # Sort the arguments > if args: > Index: r2w.py > =================================================================== > --- r2w.py (revision 194) > +++ r2w.py (working copy) > @@ -134,6 +134,7 @@ > pass > # > options, config = get_config() > + print options > if os.path.isfile('__dist__'): > print 'Won\'t run from distribution directory.' > print "Run 'make_dist.py' and use the distribution it creates." > @@ -202,7 +203,8 @@ > if standerr: > standerr.close() > # > - if istrue(config.get('pause', 'False')): > + if not options.get('nopause', False) \ > + and istrue(config.get('pause', 'False')): > raw_input('Hit return to continue >>> ') > > """ > > > > > Thanks, > > > ------------------------------------------------------------------------ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > ------------------------------------------------------------------------ > > _______________________________________________ > Rest2web-develop mailing list > Res...@li... > https://lists.sourceforge.net/lists/listinfo/rest2web-develop > |