From mathieu.chappuis.lists at gmail.com Mon Feb 4 03:16:36 2008 From: mathieu.chappuis.lists at gmail.com (Mathieu Chappuis) Date: Mon, 4 Feb 2008 09:16:36 +0100 Subject: [webgen-users] Error processing any source Message-ID: <935eeb180802040016h271eaa4ag84ec9a925b5b2129@mail.gmail.com> Dears, Got this error with webgen (GEM) 0.4.1, 0.4.2, 0.4.7 when processing sample source or personal example. This error was submited on the rubyforge help forum without follow-up. http://rubyforge.org/forum/forum.php?thread_id=18507&forum_id=1268 Got ruby 1.8.6 (2007-03-13 patchlevel 0) [i386-mswin32] webgen/plugins/tags/block.rb:43:in `process_tag': undefined method `blocks' for nil:NilClass (NoMethodError) from webgen/plugins/tags/tag_processor.rb:63:in `process' from webgen/plugins/tags/tag_processor.rb:103:in `replace_tags' from webgen/plugins/tags/tag_processor.rb:52:in `process' from webgen/plugins/filehandlers/page.rb:169:in `render_node' from webgen/plugins/filehandlers/page.rb:179:in `write_node' from C:/ruby186/lib/ruby/gems/1.8/gems/webgen-0.4.1/lib/webgen/node.rb:262:in `send' from C:/ruby186/lib/ruby/gems/1.8/gems/webgen-0.4.1/lib/webgen/node.rb:262:in `method_missing' from webgen/plugins/filehandlers/filehandler.rb:254:in `write_node' ... 12 levels... from C:/ruby186/lib/ruby/gems/1.8/gems/webgen-0.4.1/lib/webgen/cli.rb:424:in `cli_main' from C:/ruby186/lib/ruby/gems/1.8/gems/webgen-0.4.1/bin/webgen:4 from C:/ruby186/bin/webgen:16:in `load' from C:/ruby186/bin/webgen:16 Any solution please ? Thanks From t_leitner at gmx.at Tue Feb 5 04:03:09 2008 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 5 Feb 2008 10:03:09 +0100 Subject: [webgen-users] Error processing any source In-Reply-To: <935eeb180802040016h271eaa4ag84ec9a925b5b2129@mail.gmail.com> References: <935eeb180802040016h271eaa4ag84ec9a925b5b2129@mail.gmail.com> Message-ID: <20080205100309.652a0dfa@noeato.mat.univie.ac.at> > Got this error with webgen (GEM) 0.4.1, 0.4.2, 0.4.7 when processing > sample source or personal example. Tried with webgen 0.4.7 under Mac OSX with ruby 1.8.6 and it works. Tried it with latest One-Click-Installer on Windows (ruby 1.8.6 (2007-09-24 patchlevel 111) [i386-mswin32]) and it works there, too. > This error was submited on the rubyforge help forum without follow-up. > > http://rubyforge.org/forum/forum.php?thread_id=18507&forum_id=1268 This must have slipped by, I normally try to answer within a reasonable timeframe. Please update to the latest version of the One-Click-Installer since the version you are using has a known other bug that prevents webgen from working correctly. Regards, Thomas From nicolas.delsaux at gmail.com Tue Feb 5 04:49:21 2008 From: nicolas.delsaux at gmail.com (Nicolas Delsaux) Date: Tue, 5 Feb 2008 10:49:21 +0100 Subject: [webgen-users] overriding ContentConverter Message-ID: <418361960802050149pb83ccc0ic9505332dbaba75b@mail.gmail.com> Hi, For my own legacy plugins (, and , see in archvies for more info), I've written a ContentConverter to handle them in 0.4. This content converter contains, for now, the following code class NdxConverter < ContentConverters::DefaultContentConverter infos( :name => 'ContentConverter/NdxConverter', :author => "Nicolas Delsaux", :summary => "Just a hack to allow me to use my old-style tags in modern Webgen" ) HandlerPlugin.register_handler 'ndx' def call( _content ) puts "some content found" ""+_content+"" end end When calling webgen show config with 0.4, it well display my NdxConverter as an existing converter, but without any associated format : ContentConverter/NdxConverter Summary Just a hack to allow me to use my old-style tags in modern Webgen Author Nicolas Delsaux Notice there is no "handler for" info. However, when specifying in a page --- content, ndx I've got the following error : ERROR -- Invalid page file : Invalid conten t format specified: ndx I think my issue come from the unspecified 'handler for' info. How can I specify it ? Furthermore, how is the order of the various content converters defined ? -- Nicolas Delsaux N'imprimez ce mail que si vous ne savez pas le lire sur l'?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. From t_leitner at gmx.at Fri Feb 8 01:33:33 2008 From: t_leitner at gmx.at (Thomas Leitner) Date: Fri, 8 Feb 2008 07:33:33 +0100 Subject: [webgen-users] overriding ContentConverter In-Reply-To: <418361960802050149pb83ccc0ic9505332dbaba75b@mail.gmail.com> References: <418361960802050149pb83ccc0ic9505332dbaba75b@mail.gmail.com> Message-ID: <20080208073333.1a4a3d92@noeato.local> Am Tue, 5 Feb 2008 10:49:21 +0100 schrieb "Nicolas Delsaux" : > Hi, > For my own legacy plugins (, and , see in > archvies for more info), I've written a ContentConverter to handle > them in 0.4. > This content converter contains, for now, the following code > > class NdxConverter < ContentConverters::DefaultContentConverter > infos( :name => 'ContentConverter/NdxConverter', > :author => "Nicolas Delsaux", > :summary => "Just a hack to allow me to use my > old-style tags in modern Webgen" > ) > > HandlerPlugin.register_handler 'ndx' Just call register_handler 'ndx' without the HandlerPlugin! This will do the trick! Regards, Thomas From nicolas.delsaux at gmail.com Sat Feb 23 10:00:53 2008 From: nicolas.delsaux at gmail.com (Nicolas Delsaux) Date: Sat, 23 Feb 2008 16:00:53 +0100 Subject: [webgen-users] build a multi-document page file Message-ID: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> Hi, Working like never on my ISBN importer, I've reached the step where i can produce a document containing both a content and infos from ISBVN providers, here is an example : ###################################### --- title: 2-07-042684-X --- | !>http://ecx.images-amazon.com/images/I/21V1XY3XJYL.jpg!:http://www.amazon.fr/gp/product/207042684X%3ftag=leblo-20%26link_code=xm2%26camp=2025%26dev-t=0KBJ59SK0VR923NMVKR2 h3. Parade nuptiale h4. Book authors # Donald Kingsbury # Michel Lederer edited by Gallimard published on 06/03/2003 --- :name: Parade nuptiale :editor: Gallimard :src: "#::AmazonAsin" :authors: - Donald Kingsbury - Michel Lederer :image: http://ecx.images-amazon.com/images/I/21V1XY3XJYL.jpg :url: http://www.amazon.fr/gp/product/207042684X%3ftag=leblo-20%26link_code=xm2%26camp=2025%26dev-t=0KBJ59SK0VR923NMVKR2 :release_date: 2003-03-06 :main_category: Book ###################################### You'll obviously tell me that there is a problem, since there are more than one content document. And I'll completely agree with you. Unfortunatly, I'm unable to create a compliant document, since the ruby YAML library does not seems to provide a way to add the required "options" or the things that should do the trick in document header, in order to tell webgen the last document should not be the content one, but rather a kind of AmazonAsin content block. So, do you know any solution to solve that issue ? For your information, I add section using http://www.ruby-doc.org/core/classes/YAML/Stream.src/M007467.html YAML::Stream.add(doc) -- Nicolas Delsaux N'imprimez ce mail que si vous ne savez pas le lire sur l'?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. From nicolas.delsaux at gmail.com Sun Feb 24 02:26:12 2008 From: nicolas.delsaux at gmail.com (Nicolas Delsaux) Date: Sun, 24 Feb 2008 08:26:12 +0100 Subject: [webgen-users] Fwd: build a multi-document page file In-Reply-To: <418361960802232324o5ef25451k2684c958dc2c5023@mail.gmail.com> References: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> <418361960802232324o5ef25451k2684c958dc2c5023@mail.gmail.com> Message-ID: <418361960802232326w3221a10ag85a53a95713a1712@mail.gmail.com> On 2/23/08, Andrea Censi wrote: > > Hi, > I can't help you on your YAML problem, but I'd be interested in > knowing more about your ISBN importer. Is it already available > somewhere? > I'll make it available maybe today on my website. But remember it can't be considered as a working plugin, since pages contains more than one document starting with "--- \n". So never consider it as a stable plugin. It's for now only a development version, but I have high goals for this little dev. For now, you can take a look at http://nicolas.delsaux.free.fr/webgen/informatique/web/webgen/pseudo-tags.en.html http://nicolas.delsaux.free.fr/webgen/informatique/web/webgen/isbn.en.html And you should obtain a quasi-working system (but no displayabled ISBN). Also, take car e I may change the megastore folder in a near future. And finally notice that this code should be LGPL-licensed. -- Nicolas Delsaux N'imprimez ce mail que si vous ne savez pas le lire sur l'?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. From t_leitner at gmx.at Sun Feb 24 14:50:33 2008 From: t_leitner at gmx.at (Thomas Leitner) Date: Sun, 24 Feb 2008 20:50:33 +0100 Subject: [webgen-users] build a multi-document page file In-Reply-To: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> References: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> Message-ID: <20080224205033.282fa30f@noeato.local> Am Sat, 23 Feb 2008 16:00:53 +0100 schrieb "Nicolas Delsaux" : > Hi, > > > > published on 06/03/2003 > > --- Just escape the three dashes with a backslash like in the following line: \--- > :name: Parade nuptiale > If I understand your problem correctly, this should solve your problem. -- Thomas From nicolas.delsaux at gmail.com Mon Feb 25 04:18:36 2008 From: nicolas.delsaux at gmail.com (Nicolas Delsaux) Date: Mon, 25 Feb 2008 10:18:36 +0100 Subject: [webgen-users] Fwd: build a multi-document page file In-Reply-To: <418361960802250057q6b587dc8r782b49236bc6ebd@mail.gmail.com> References: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> <20080224205033.282fa30f@noeato.local> <418361960802250057q6b587dc8r782b49236bc6ebd@mail.gmail.com> Message-ID: <418361960802250118w33dda7f3k4a3c009b013bc7f6@mail.gmail.com> On 2/24/08, Thomas Leitner wrote: > > > > Just escape the three dashes with a backslash like in the following > line: > \--- > > If I understand your problem correctly, this should solve your > problem. > > MMh This could be a solution. However, what I want is each data grabbed from a provider in its own document. So your solution, although promising, seems to be not so appliable. What I would really would like to have is a document name per document. I was thinking, since you're able to read from YAML the document/parser, would be to be able to write them, like, say ... --- content blablabla --- AmazonIsan # AmazonIsan content -- Nicolas Delsaux N'imprimez ce mail que si vous ne savez pas le lire sur l'?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. From t_leitner at gmx.at Mon Feb 25 05:47:23 2008 From: t_leitner at gmx.at (Thomas Leitner) Date: Mon, 25 Feb 2008 11:47:23 +0100 Subject: [webgen-users] Fwd: build a multi-document page file In-Reply-To: <418361960802250118w33dda7f3k4a3c009b013bc7f6@mail.gmail.com> References: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> <20080224205033.282fa30f@noeato.local> <418361960802250057q6b587dc8r782b49236bc6ebd@mail.gmail.com> <418361960802250118w33dda7f3k4a3c009b013bc7f6@mail.gmail.com> Message-ID: <20080225114723.5cc3ac90@noeato.mat.univie.ac.at> Am Mon, 25 Feb 2008 10:18:36 +0100 schrieb "Nicolas Delsaux" : > > If I understand your problem correctly, this should solve your > > problem. > > MMh > > This could be a solution. However, what I want is each data grabbed > from a provider in its own document. > So your solution, although promising, seems to be not so appliable. > What I would really would like to have is a document name per > document. I was thinking, since you're able to read from YAML the > document/parser, would be to be able to write them, like, say ... > > --- content > blablabla > --- AmazonIsan > # AmazonIsan content Ah, okay, I misunderstood your problem. You want to generate a file in WebPage Format with a metadata section, a content section and an AmazonIsan section by using YAML. Since WebPage Format is *not* a series of Yaml documents, this won't work this way. Since I have not written a class for creating pages in WebPage Format, you will need to do that manually, but this isn't too hard. Just dump the meta information with hash.to_yaml, then add three dashes on a separate line, then the content, then three dashes followed by 'AmazonIsan' and then the AmazonIsan content. Best regards, Thomas From nicolas.delsaux at gmail.com Mon Feb 25 05:58:53 2008 From: nicolas.delsaux at gmail.com (Nicolas Delsaux) Date: Mon, 25 Feb 2008 11:58:53 +0100 Subject: [webgen-users] Fwd: build a multi-document page file In-Reply-To: <20080225114723.5cc3ac90@noeato.mat.univie.ac.at> References: <418361960802230700n56bdbb76n966d40f98a137573@mail.gmail.com> <20080224205033.282fa30f@noeato.local> <418361960802250057q6b587dc8r782b49236bc6ebd@mail.gmail.com> <418361960802250118w33dda7f3k4a3c009b013bc7f6@mail.gmail.com> <20080225114723.5cc3ac90@noeato.mat.univie.ac.at> Message-ID: <418361960802250258q221fcff2vd26f21a135709f48@mail.gmail.com> On 2/25/08, Thomas Leitner wrote: > > Ah, okay, I misunderstood your problem. You want to generate a file in > WebPage Format with a metadata section, a content section and an > AmazonIsan section by using YAML. Exactly, yes. > Since WebPage Format is *not* a > series of Yaml documents, this won't work this way. Damn, that's plain weird :-O (notice I do not critcize your choice, i only express here my astonishment) > Since I have not > written a class for creating pages in WebPage Format, you will need to > do that manually, but this isn't too hard. This sentence reminds me not-so-good job memories ;-) > Just dump the meta > information with hash.to_yaml, then add three dashes on a separate > line, then the content, then three dashes followed by 'AmazonIsan' and > then the AmazonIsan content. Well, ... here come the drawback. Take a look at my isbn_processor.rb (http://nicolas.delsaux.free.fr/webgen/informatique/web/webgen/isbn.en.html). Here is in short what it does. For each isbn number in the isbn cache (this is a temporary step) For each grabber Grab content from the web (for Amazon, do a webservice query and put result in a big has) Then put request result in our kind of hash Create a YAML document containing this Hash and push it inot YAML stream (line 177) Once that's done For each non-header and non-content YAML document, load data and choose best to populate content. The goal is to maintain a cache of web result in a file nearby real page (and what is more nearby than the file itself ?). Obviously, i can think about a turnaround : create a isbn.page.cache auxiliary file that would contain my YAML documents, then create the isbn.page file with only relevant data. Interesting, but a little more complciated, since I now have two files ... However, i think I'll use this solution, to preserve the isbn.page usability as webgen page (since my ultimate goal is to include it in files using tyhe tag) Thanks for our lights. -- Nicolas Delsaux N'imprimez ce mail que si vous ne savez pas le lire sur l'?cran : les ?lectrons se recyclent bien, le papier, beaucoup moins bien. From marc.argent at queens.ox.ac.uk Tue Feb 26 06:04:19 2008 From: marc.argent at queens.ox.ac.uk (Marc Argent) Date: Tue, 26 Feb 2008 11:04:19 +0000 Subject: [webgen-users] Nested Templates Message-ID: <4d6854f30802260304p40d96314qb1c241eb68f42508@mail.gmail.com> I am producing my new website with webgen and have happened upon something that I can't quite understand. I have a template for the content pages of my website, but would like the home page to have a different one. Is there any way of have a template just for this page without it nesting? Best wishes, Marc Argent From t_leitner at gmx.at Tue Feb 26 13:44:45 2008 From: t_leitner at gmx.at (Thomas Leitner) Date: Tue, 26 Feb 2008 19:44:45 +0100 Subject: [webgen-users] Nested Templates In-Reply-To: <4d6854f30802260304p40d96314qb1c241eb68f42508@mail.gmail.com> References: <4d6854f30802260304p40d96314qb1c241eb68f42508@mail.gmail.com> Message-ID: <20080226194445.10d73eea@noeato.local> Am Tue, 26 Feb 2008 11:04:19 +0000 schrieb "Marc Argent" : > I am producing my new website with webgen and have happened upon > something that I can't quite understand. > > I have a template for the content pages of my website, but would like > the home page to have a different one. Is there any way of have a > template just for this page without it nesting? Yes, that's definitely possible. Just use the template meta information in your home page. If your home page is called home.page, it should look something like this: --- title: Home Page template: homepage.template inMenu: true --- This is my homepage. And the template 'homepage.template' would need to look like this: --- template: ~ --- Here goes the template content. Notice the two 'template' metainfo keys: the one in home.page is used to tell webgen that this page is rendered in the template 'homepage.template'. A the one in 'homepage.template' says that the default.template file should not be used - meaning that the template chain stops here. So webgen would see the following rendering chain for 'home.page': homepage.template -> home.page *hth*, regards, Thomas From marc.argent at queens.ox.ac.uk Wed Feb 27 05:12:45 2008 From: marc.argent at queens.ox.ac.uk (Marc Argent) Date: Wed, 27 Feb 2008 10:12:45 +0000 Subject: [webgen-users] Nested Templates In-Reply-To: <20080226194445.10d73eea@noeato.local> References: <4d6854f30802260304p40d96314qb1c241eb68f42508@mail.gmail.com> <20080226194445.10d73eea@noeato.local> Message-ID: <4d6854f30802270212x3c6375c2xaa65795275a5839b@mail.gmail.com> On Tue, Feb 26, 2008 at 6:44 PM, Thomas Leitner wrote: > Am Tue, 26 Feb 2008 11:04:19 +0000 > schrieb "Marc Argent" : > > > > > I am producing my new website with webgen and have happened upon > > something that I can't quite understand. > > > > I have a template for the content pages of my website, but would like > > the home page to have a different one. Is there any way of have a > > template just for this page without it nesting? > > Yes, that's definitely possible. Just use the template meta information > in your home page. If your home page is called home.page, it should > look something like this: > > --- > title: Home Page > template: homepage.template > inMenu: true > --- > This is my homepage. > > > And the template 'homepage.template' would need to look like this: > > --- > template: ~ > --- > Here goes the template content. > > > Notice the two 'template' metainfo keys: the one in home.page is used > to tell webgen that this page is rendered in the template > 'homepage.template'. A the one in 'homepage.template' says that the > default.template file should not be used - meaning that the template > chain stops here. > > So webgen would see the following rendering chain for 'home.page': > > homepage.template -> home.page > > *hth*, regards, > Thomas > _______________________________________________ > webgen-users mailing list > webgen-users at rubyforge.org > http://rubyforge.org/mailman/listinfo/webgen-users > Dear Thomas, Many thanks, this is exactly what I've been looking for. Look out for our new webgen produced website (http://www.queens.ox.ac.uk) in the next few weeks. Thanks for the great software. Best wishes, Marc Argent