Thread: [Rest2web-develop] Re: rest2web
Brought to you by:
mjfoord
From: <mi...@pc...> - 2005-07-14 10:24:22
|
Hello Dirk, I need to test the 'thispage' stuff - looks like a bug to me=2E Sticking to the order of 'section-list' seems like a no-brainer to me=2E I'll consider adding a 'page-order' variable=2E On principle I'm *against* adding extra variables - in the name of simplicity(I already have too many !)=2E *But* - I see your use case and i= t is something I'd wondered if someone would want=2E I'll be back in action on Monday and will think about it then=2E How would= you reference pages =3F (by filename is the only reasonable way I guess=2E= =2E=2E=2E=2E) Feel free to move this to the rest2web-develop mailing list (link on the sourceforge page http://sourceforge=2Enet/projects/rest2web ) if you *want= *=2E Currently most discussion is about the specification for ConfigObj 4- the *fantastic* new config system that is nearly finished=2E=2E=2E ;-) Best Regards, Fuzzyman http://www=2Evoidspace=2Eorg=2Euk/python Original Message: ----------------- From: Dirk Steenpass steenpaz@sdf-eu=2Eorg Date: Wed, 13 Jul 2005 16:47:21 +0200 To: root@voidspace=2Eorg=2Euk Subject: Re: rest2web Dear Fuzzyman, thanks for your quick reply and apologies for my late answer=2E I see the point of not specifying everything because pages are generated dynamically=2E I could use templates for pages when I want an ordered sidebar menue=2E However, I'm a lazy guy and I would like to get away using as few templates as possible=2E I am thinking about introducing an additional restindex variable 'page-order', that get's evaluated if present=2E Similar to 'section-list' 'page-order' has a meaning on index pages only=2E I will probably take a look into this tomorrow =2E=2E=2E The 'thispage' question: I tried to say the following: root=5Fdir/ index=5Fpage <- thispage !=3D None subdir/ index=5Fpage <- thispage !=3D None page=5F1 page=5F2 subdir/ index=5Fpage <- thispage =3D=3D None In words: the 'thispage' variable is None for index pages that are leaves of the indextree=2E As index pages are treated special several times I was= wondering whether this is a bug or a feature=2E best regards, dirk On Sun, Jul 10, 2005 at 08:26:15AM -0700, root wrote: > >On Sun, 10 Jul 2005 01:20:43 0200 Dirk Steenpass <steenpaz@sdf-eu=2Eor= g> > wrote=2E > >Dear Mr=2E Foord, > > > >I have recently discovered rest2web (via ReStructuredText > >documentation)=2E I really like the rest2web idea, as I am sick of > >writing plain html and a full blown content managment is an overkill fo= r > >my needs=2E > > > >I would like to bother you with a few questions about rest2web 0=2E3=2E= 0 > >hoping that your answers save me from code diving ;-)=2E > > > > >=20 > Hello Dirk, >=20 > I'm glad that you might find rest2web helpful - and I'd be very pleased = to > answer your questions about it=2E=20 >=20 > I'm away in Romania for the next week - so some of your questions I migh= t > have to investigate when I return=2E >=20 > > > > > >When using minibar, is there a way to control the order of pages within= > >a section=3F > > > > > >When using minibar, is there a way to control the order of sections=3F = It > >seems that the order of section specifications is not honored=3F > > >=20 > Not currently - although honouring the order they are specified in seems= a > very sensible idea=2E You can see the code in the minibar function in (I= > think) the file ``functions=2Epy``=2E >=20 > The reason I didn't add too much code to specify the position of everything > is that it's supposed to be dynamic - you're supposed to be able to add > whole sections *without* having to specify where they go=2E Otherwise yo= u > might as well just put the links in the template yourself ! =20 >=20 > However - your idea is a good one=2E When I can look at implementing it=2E= It > should be quite easy=2E >=20 > > > > > >The 'thispage' value is not None for every page that is build, with the= > >exception of index pages that are leafs of the indextree=2E Is this is = a > >bug or a feature=3F > > >=20 > I don't fully understand the question - and I'm not able to test=2E 'thispage' > *shouldn't* be None as it's a pointer to the current page in the 'indextree' > structure=2E=20 >=20 > Are you saying that I document it as being None - or that *sometimes* it= is > None =3F >=20 > Best Regards, >=20 > Fuzzyman >=20 >=20 >=20 >=20 > > > > > > > >bis denn, dirk > > > > >=20 -------------------------------------------------------------------- mail2web - Check your email from the web at http://mail2web=2Ecom/ =2E |
From: Michael F. <fuz...@vo...> - 2006-04-22 22:57:15
|
Robert Brewer wrote: > Fuzzyman, > > Sorry it's taken me a while to get back, I got swamped for a bit > and felt I should take a peek before replying. > No problem. I'd be happier having this conversation on the rest2web-develop mailing list (you can sign up via sourceforge). It's quite low traffic, but then the discussion gets archived and other users can chip in if they want to. > I am definitely willing to discuss how to get rest2web a little > more toward my bent... :) I got your second email on the subject > about the uservalues. I think that is on the right track, though I'd > hope to go even further as I'll explain below. > > At the time I put the first cut of my website up I found that a couple > tweaks to docutils and a makefile were enough to get me started. > Obviously rest2web has plenty more features that I'd > rather not even try to duplicate. > > Just for grins, I'll lay out a few things I would like to see in the > "ultimate reST to website tool". I'm not sure how these may fit > with your vision of rest2web, but it can give us some start for discussion. :) > > 1. Super simple on the low end. It'd be great to just put reST files > in a directory hierarchy, press go, and have a website created > with nice breadcrumbs, navbars, and all that stuff. The tool > would have defaults in this case, such as making the breadcrumbs > follow directory names and page names or something like that. > I've done a first cut of this - see rest2web-0.5.0alpha : http://www.voidspace.org.uk/rest2web-0.5.0alpha.zip There are rough notes on some of the changes at : http://www.voidspace.org.uk/python/weblog/arch_d7_2006_04_22.shtml#e309 The thing to do is just give it a source directory of rest files and run ``r2w.py --force`` at the command line. :-) Please give me feedback. Currently you can't specify template files, but can modify the default ones supplied in the rest2web directory. I'd like feedback on : Page crumbs Index crumbs Index titles There should be a simple test directory included in the new zipfile which illustrates the source and output... > This may or may not work well in practice, but maybe it could even notice a > directory full of .jpg files and create a simple gallery for that > directory. That's harder but not impossible. Again I'd need to supply a default template for the gallery pages *and* the gallery index page, and it would need to copy all the jpgs into the target directory. The part that makes it fiddly is that the user might want control over any individual step in that process (supply an index page source file, but no page template - or the other way round) so it gets fiddly to allow full customisation. It also means proper communication with the gallery plugin. At the moment the plugin system is very rough as the gallery is basically the only plugin. I'm happy to get there (would be even happier if someone else was working on it to), but it may take a while to get right... > In another case, if there is no index.txt or index.html > in a directory, it may take it upon itself to create an index.txt (in reST, > I'd rather just generate default HTML than generate a rest file as an intermediate step. Effectively all index pages will use the same source file, as there are standard functions for generating links to every page in a directory. > subsequently translated to HTML) with a bulleted > list of links to all files and subdirectories in that directory. The user > may specify some CSS and reST/HTML header/footer files that > have global applicability for the generated website. > Ok, something like this needs to be worked in. You're effectively describing a template page though - one that looks like : <html> <head><title><% title %></title> ... CSS links etc ... </head> <body> <% body %> </body> </html> You can now pass in a template file at the command line, or in force mode use the default one. I don't see any need to split this up into header/footer chunks etc. > 2. Customizable for the more advanced stuff. The user can > make config files to tweak these defaults, such as making > a more user-friendly breadcrumb name than the directory name, > or a page description for the index pages, etc. Basically the > tweaks you have in the restindex. > > Ok - we can work on this, maybe configure the defaults. Or are you asking for an external config file to specify crumb names for individual pages ? > Number 1 basically says that I don't have to maintain any metadata > if I don't want to. For most of my website that would be fine. Well - we've got something that behaves like that now. I think it will take some work to get the auto-generated index pages looking good. > In my > website directory I could create some symlinks to the documentation > directories of the projects I want to publish. Interesting - do you know if ``os.path.isdir(pathname)`` returns ``True`` for a symbolic link ? I wonder if I'd need to include any code to handle it ? It could be a useful feature... I'll only add this if you promise to use it though. ;-) > When I press go their latest > reST files get converted and added into the main site with a seamless navbar > and breadcrumb system. I could easily add some pictures by adding > symlinks to some of my photo directories. This lets me add, rearrange, > and remove stuff from the website with almost no effort. As mentioned before - certainly possible, details to sort. Lets see where this takes us. All the best, Fuzzyman http://www.voidspace.org.uk/python/index.shtml > Just a few > filesystem commands and then I press go to regenerate. > As an example, the "projects" page on my site > http://brewer123.home.comcast.net/projects/ > could be autogenerated as a bulleted list of links > to each subdirectory. Sure, it wouldn't have the text about > "Here are some projects I've done and am releasing publicly" > and it wouldn't have the little descriptions of some of the projects. > But I might not even care about those things if it was autogenerated > with "zero effort". :) > > Some front pages of the website I may want to look a little nicer > and be a little friendlier, so I use the config files to create some > better metadata. And if I have time and inclination, I can do that > for the projects with the symlinks too, but I don't have to. > > So that's why I wasn't liking the having the restindex be part of > the file, or even required at all for generating a page. It's because > I want to just plop a directory of reST files in my website directory and have > it become part of my website. > > Well, this got a little longer and possibly more confusing than > I expected. Ask away if I'm not being clear. I guess my personal > desire is for a way to turn a directory hierarchy into a useful > website with as little effort as possible. Even with a hodge-podge > of file types in the hierarchy. And once the "zero-effort" website > is created, it should be possible to spruce it up a bit by manually > providing metadata to the tool and regenerating. > > By the way, the new look to your rest2web pages is very nice. > I like it a lot. > > Thanks for opening the discussion, I'm looking forward to your > thoughts... > > -Rob > > On 3/31/06, Michael Foord <fuz...@vo...> wrote: > >> Hello Rob, >> >> I saw on your website that you considered rest2web, but couldn't use it >> because of the restindex metadata stored in each page. >> >> I wondered if you wanted to explore a way round that with me ? >> >> If you are still interested we can bandy around a few ideas to come up >> with something that works for you. >> >> Fuzzyman >> (Michael Foord) >> http://www.voidspace.org.uk/python/index.shtml >> >> > > > -- > Robert W. Brewer > > |