From bitserf at gmail.com Mon Aug 1 07:23:55 2005 From: bitserf at gmail.com (leon breedt) Date: Mon Aug 1 07:18:06 2005 Subject: [PATCH] Trackbacks In-Reply-To: <20050731160035.GB32460@masanjin.net> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050731160035.GB32460@masanjin.net> Message-ID: <270bd0c405080104232ea3dfcf@mail.gmail.com> On 8/1/05, William Morgan wrote: > I'd like to commit this patch. Anyone else want to test? Any comments? This shouldn't hold up committing if you want, but I want to add in support for RBL lookups as well as poor man's spam protection when I get time: * Limiting the amount of links allowed in the comment/trackback body * Perhaps requiring approval of comments if submitted N days after entry (will probably need the mail notification stuff so you actually know you have to approve it. "hobix approve [all]" ?) I've been burned by comment spam before, want to pre-empt to issue this time :) Leon From wmorgan-hobix-is-the-way at masanjin.net Mon Aug 1 08:33:14 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Mon Aug 1 08:28:04 2005 Subject: [PATCH] Trackbacks In-Reply-To: <270bd0c405080104232ea3dfcf@mail.gmail.com> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050731160035.GB32460@masanjin.net> <270bd0c405080104232ea3dfcf@mail.gmail.com> Message-ID: <20050801123314.GA4790@masanjin.net> Excerpts from leon breedt's mail of 1 Aug 2005 (EDT): > This shouldn't hold up committing if you want, but I want to add in > support for RBL lookups as well as poor man's spam protection when I > get time: Cool. I'd say do this as a separate patch. > I've been burned by comment spam before, want to pre-empt to issue > this time :) As I've said before, I don't think comment spam will be a big issue until Hobix becomes a little more prominent in the blogosphere, but if you want to submit code, well *I* am certainly not going to turn it away. :) -- William From halostatue at gmail.com Mon Aug 1 08:35:52 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Mon Aug 1 08:30:06 2005 Subject: [PATCH] Trackbacks In-Reply-To: <270bd0c405080104232ea3dfcf@mail.gmail.com> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050731160035.GB32460@masanjin.net> <270bd0c405080104232ea3dfcf@mail.gmail.com> Message-ID: <9e7db91105080105357e2daaf@mail.gmail.com> On 8/1/05, leon breedt wrote: > On 8/1/05, William Morgan wrote: > > I'd like to commit this patch. Anyone else want to test? Any comments? > This shouldn't hold up committing if you want, but I want to add in > support for RBL lookups as well as poor man's spam protection when I > get time: Better to add in one of the Bayesian classification tools that have been added for Ruby. (This would also be cool as an external tool to suggest classification tags.) RBLs don't work and are overly political in nature. Ruwiki, when I get back to it, will never support RBLs (either in the core or in contributed code). -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca From why at hobix.com Mon Aug 1 09:17:53 2005 From: why at hobix.com (why the lucky stiff) Date: Mon Aug 1 09:12:49 2005 Subject: [PATCH] Trackbacks In-Reply-To: <9e7db91105080105357e2daaf@mail.gmail.com> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050731160035.GB32460@masanjin.net> <270bd0c405080104232ea3dfcf@mail.gmail.com> <9e7db91105080105357e2daaf@mail.gmail.com> Message-ID: <42EE2101.2050701@hobix.com> Austin Ziegler wrote: > Better to add in one of the Bayesian classification tools that have > >been added for Ruby. (This would also be cool as an external tool to >suggest classification tags.) RBLs don't work and are overly political >in nature. Ruwiki, when I get back to it, will never support RBLs >(either in the core or in contributed code). > > I feel the same way. And the classification code is checked into Hobix right now. It just hasn't been translated into a commandline action yet. _why From sl33p3r at free.fr Tue Aug 2 14:19:04 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Tue Aug 2 13:55:42 2005 Subject: skel prefix naming / Page id changing Message-ID: <20050802181903.GA7709@hal.void.org> Hi all, As I was regenerating my blog, I found that my RSS feeds were no more generated. Looking at recent changes it seems that the version 1.36 of weblog.rb removed the line beginning by full_out_path in the following snippet: txt = output.load( template, vars ) full_out_path = File.join( @output_path, vars[:page].link[1..-1] ) The purpose of this lin ewas to recompute the output path in case the plugin changed it .... which was exactly the way my 'own-rss' plugin does. The reason for this is that I want to generate 2 feeds: index-fr.xml and index-en.xml, but using skel named index-en.xml.newrss does not work as the skel method to call is computed from the prefix, which is in this case index-fr, and thus skel_index is not called ... So I ask myself what is the best solution: 1) Change the way the skel method is computed (for example change - to _ in file name) and add aliases to skel_index in my plugin 2) Re-introduce the full_out_path computation after the call to the plugin Any ideas ? -- Frederick Ros aka Sleeper -- sleeper@jabber.org Use the "telephone test" for readability. - The Elements of Programming Style (Kernighan & Plaugher) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050802/0c0b453a/attachment.bin From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 2 20:33:42 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 2 20:27:51 2005 Subject: [PATCH] Trackbacks In-Reply-To: <270bd0c4050730154542024553@mail.gmail.com> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> Message-ID: <20050803003342.GA8957@masanjin.net> Excerpts from leon breedt's mail of 30 Jul 2005 (EDT): > Okay, I've reworked my patch a little, not quite sure if the > indentation conforms to the desired, but I think so. Ok, I've committed this. Thanks, Leon. I removed the dc:description and some other elements that I couldn't find in the Six Apart spec. I also moved #append_to_attachment to Filesys rather than Weblog. I know Leon was responding to _why's (somewhat cryptic) suggestion as to codeshare, but I think it makes more sense there. Please let me know if I fucked something up. This should hopefully be a seamless transition for most people: just add 'hobix/trackbacks' to your requires section in hobix.yaml to enable trackback support. One exception: if you have a customized entry erb definition, you'll have to tweak two things to make trackbacks work: - add <+ entry_trackback +> somewhere in there; and - <+ entry_comment +> no longer includes the comment form; add <+ entry_comment_form +> explicitly. If you're using the default entry erb, you should be fine. Thanks again to Leon for doing all the hard work. -- William From wmorgan-hobix-is-the-way at masanjin.net Wed Aug 3 23:53:31 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Wed Aug 3 23:47:40 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <20050802181903.GA7709@hal.void.org> References: <20050802181903.GA7709@hal.void.org> Message-ID: <20050804035331.GB11348@masanjin.net> Hi Frederick, Excerpts from Frederick Ros's mail of 2 Aug 2005 (EDT): > So I ask myself what is the best solution: > > 1) Change the way the skel method is computed (for example change - to > _ in file name) and add aliases to skel_index in my plugin I think this is the best (most extensible) solution. How do you structure your dual-language posts? I presume you have 'content-en' and 'content-fr' fields within each entry. So I would add skel_index_fr and skel_index_en methods that looked like this: def skel_index_fr( path_storage ) skel_index( path_storage ) do |page, entries| yield :page => page, :entries => entries.map do |e| f = e.dup f.content = e.content_fr f.summary = e.summary_fr f end end end (maybe the dup'ing is unnecessary) Then you don't need anything else for RSS or for the main page. But you will have to change the name to an underscore, as you mention---or modify build_pages to replace hyphens with underscores as well. (I think that'd be ok.) It's late at night and this is completely untested code, so I might be completely off base. Let me know. -- William From sl33p3r at free.fr Thu Aug 4 03:40:25 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Thu Aug 4 03:34:32 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <20050804035331.GB11348@masanjin.net> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> Message-ID: <1123141225.42f1c6698088b@imp1-q.free.fr> Quoting William Morgan : > I think this is the best (most extensible) solution. Yep .. Thinking about it, this is the most extensible one, and could benefit to others too ;) > How do you structure your dual-language posts? I presume you have > 'content-en' and 'content-fr' fields within each entry. In fact, the yaml layout is the same (title and content entries) but instead of being text, they are hashes, with an entry per language ( en and fr in my case ), with the associated title/content. > So I would add skel_index_fr and skel_index_en methods that looked like this: > > def skel_index_fr( path_storage ) > skel_index( path_storage ) do |page, entries| > yield :page => page, :entries => entries.map do |e| > f = e.dup > f.content = e.content_fr > f.summary = e.summary_fr > f > end > end > end > > (maybe the dup'ing is unnecessary) Yep .. I could do this to generate 2 different blogs ... my current solution is to have 1 single blog with 'dynamic' switch (in fact a simple javascript function changing the display to visible for all item with class 'en' or 'fr') ... But I was thinking about generating 2 different blogs (because for example technorati does not 'validate' my page on ping), and your solution is the simplest one :) > Then you don't need anything else for RSS or for the main page. But you > will have to change the name to an underscore, as you mention---or > modify build_pages to replace hyphens with underscores as well. (I think > that'd be ok.) > I'm going to have a quick look at this tonight or tomorow ;) Thanks a lot ! Frederick Ros aka Sleeper -- sleeper@jabber.fr From wmorgan-hobix-is-the-way at masanjin.net Thu Aug 4 11:45:11 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Thu Aug 4 11:39:21 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <1123141225.42f1c6698088b@imp1-q.free.fr> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> <1123141225.42f1c6698088b@imp1-q.free.fr> Message-ID: <20050804154511.GC14748@masanjin.net> Excerpts from Frederick Ros's mail of 4 Aug 2005 (EDT): > But I was thinking about generating 2 different blogs (because for > example technorati does not 'validate' my page on ping), and your > solution is the simplest one :) I'm very interested to see what you come up with. Having a nice way for Hobix to do multi-lingual blogs would be great. -- William From sl33p3r at free.fr Fri Aug 5 16:26:30 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Fri Aug 5 16:02:23 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <20050804154511.GC14748@masanjin.net> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> <1123141225.42f1c6698088b@imp1-q.free.fr> <20050804154511.GC14748@masanjin.net> Message-ID: <20050805202630.GA7147@hal.void.org> William Morgan wrote : | I'm very interested to see what you come up with. Having a nice way for | Hobix to do multi-lingual blogs would be great. OK. I had a look last night. First of all be indulgent, as I had a couple of beer in me at this time ;) My purpose was the following: from a single entry, holding content for let's say 2 languages en and fr, I want to generate 2 versions of the same blog: one with the en content (located in weblog.link/en) the other one with the fr content. My first attempt was to create my own skel_index, skel_entry and so on. They both return not 1 (Page, entries) couple but 2 (one for each language). However this did not work, as in the load_and_validate_entry load the entry based on the entry id .. which is the same regardless of the content language. Then I look at creating 2 directory in the skel directory : en and fr, each with the index.html.quick, entry.html.quick and so on. However in this case I would have to explicitly write something like <% entry.content_en %> or <% entry.content_fr %> in the templates, which seems not very scalable/nice ;) So I think that to achieve this I will have to have both a new entry class, but also a new output plugin which can choose what language to render based on either the name of the template of the path where it reside ... However as I mentioned it, and as I was not quite *humm* let's say clear , I'd like to know if someone as another better idea on this ... -- Frederick Ros aka Sleeper -- sleeper@jabber.org Treat end of file conditions in a uniform manner. - The Elements of Programming Style (Kernighan & Plaugher) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050805/80f88527/attachment.bin From bitserf at gmail.com Fri Aug 5 20:16:56 2005 From: bitserf at gmail.com (leon breedt) Date: Fri Aug 5 20:11:01 2005 Subject: [PATCH] Trackbacks In-Reply-To: <20050803003342.GA8957@masanjin.net> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050803003342.GA8957@masanjin.net> Message-ID: <270bd0c405080517164a84bc0@mail.gmail.com> On 8/3/05, William Morgan wrote: > Excerpts from leon breedt's mail of 30 Jul 2005 (EDT): > > Okay, I've reworked my patch a little, not quite sure if the > > indentation conforms to the desired, but I think so. > > Ok, I've committed this. Thanks, Leon. Cool :) Merged fine here. > This should hopefully be a seamless transition for most people: just add > 'hobix/trackbacks' to your requires section in hobix.yaml to enable > trackback support. One exception: if you have a customized entry erb > definition, you'll have to tweak two things to make trackbacks work: > - add <+ entry_trackback +> somewhere in there; and > - <+ entry_comment +> no longer includes the comment form; add > <+ entry_comment_form +> explicitly. Folks, you may want to add a line to the start of your +entry_trackback+ template containing the control URL for average users to figure out where to send trackbacks to as well...I doubt people are going to view source on the page to check if there's an RDF comment and then copy & paste into their desktop clients.. Leon From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 9 15:47:10 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 9 15:41:10 2005 Subject: [PATCH] Trackbacks In-Reply-To: <270bd0c405080517164a84bc0@mail.gmail.com> References: <270bd0c405072401174b3f27a7@mail.gmail.com> <20050724150838.GB5351@masanjin.net> <42E403F6.4070205@hobix.com> <20050725235745.GA11892@masanjin.net> <270bd0c4050726005937b841f2@mail.gmail.com> <20050730012158.GB27607@masanjin.net> <270bd0c4050730154542024553@mail.gmail.com> <20050803003342.GA8957@masanjin.net> <270bd0c405080517164a84bc0@mail.gmail.com> Message-ID: <20050809194710.GB32449@masanjin.net> Excerpts from leon breedt's mail of 5 Aug 2005 (EDT): > Folks, you may want to add a line to the start of your > +entry_trackback+ template containing the control URL for average > users to figure out where to send trackbacks to as well...I doubt > people are going to view source on the page to check if there's an RDF > comment and then copy & paste into their desktop clients.. Good point. I think this should be in by default, so I might just apply the following to CVS: diff -u -r1.1 trackbacks.rb --- trackbacks.rb 3 Aug 2005 00:18:14 -0000 1.1 +++ trackbacks.rb 9 Aug 2005 19:38:49 -0000 @@ -31,12 +31,17 @@ --> } end + def trackback_link_erb; %{ + <%= trackback_link_for( weblog, entry ) %> + } end + append_def :entry_erb, %{ <% if entry and not defined? entries %><+ entry_trackback +><% end %> } def entry_trackback_erb; %{ +

You can also leave a trackback.

<% entry_id = entry.id %> <% trackbacks = weblog.storage.load_attached( entry_id, "trackbacks") rescue [] %> @@ -56,8 +61,11 @@ } end private + def trackback_link_for( weblog, entry ) + '%s/control/trackback/%s' % [weblog.link, entry.id] + end + def trackback_rdf_for( weblog, entry ) - trackback_link = '%s/control/trackback/%s' % [weblog.link, entry.id] + trackback_link = trackback_link_for( weblog, entry ) doc = REXML::Document.new rdf = doc.add_element( "rdf:RDF" ) rdf.add_namespace( "rdf", "http://www.w3.org/1999/02/22-rdf-syntax-ns#" ) -- William From sl33p3r at free.fr Fri Aug 12 19:19:36 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Fri Aug 12 18:53:27 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <20050805202630.GA7147@hal.void.org> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> <1123141225.42f1c6698088b@imp1-q.free.fr> <20050804154511.GC14748@masanjin.net> <20050805202630.GA7147@hal.void.org> Message-ID: <20050812231936.GA10613@hal.void.org> Frederick Ros wrote : | So I think that to achieve this I will have to have both a new entry | class, but also a new output plugin which can choose what language to | render based on either the name of the template of the path where it | reside ... OK. Actually I tried that ... but the problem is the following: in the skel directory I create 2 directories fr and en. Each of them contains, for example, index.html.local ... The main problem, is that the list of pages as build by build_pages is something like .. 0, due to : path_storage = storage.path_storage( File.dirname( page_name ) ) in other words, as my page_name is for example fr/index, we're lloking for all the entries present in the fr directory :( Does anyone as an idea on how to fight this ??? The other solution would be to have in the skel directory, 2 files fr_index.html.local and en_index.html.local, but this would mean that the local plugin would be able to change th epath of the pages .. which requires modification of regenerate to allow re-evaluation of full path after plugin processing (which has been removed some time ago) Any thought on this ?? -- Frederick Ros aka Sleeper -- sleeper@jabber.org Don't diddle code to make it faster - find a better algorithm. - The Elements of Programming Style (Kernighan & Plaugher) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050813/59d75fe4/attachment.bin From why at hobix.com Sat Aug 13 20:38:57 2005 From: why at hobix.com (why the lucky stiff) Date: Sat Aug 13 20:33:12 2005 Subject: + The Master Quick Template Message-ID: <42FE92A1.6070704@hobix.com> == Hobix Tip: The Master Quick Template == Thankyou for your patience, OSCON kind of swallowed me up for several weeks there. William, Frederick, Leon, MenTaL -- you guys are handy to have around. At long last, the Quick template is readily accessible. And, for that matter, the general problem has been solved. Plugin config can be saved in their own files. === Plugin Setup === Plugins may now have a `setup' method, which is called only once (when the blog is created.) The Hobix::Out::Quick class, for instance, creates a file called `hobix.out.quick' in the weblog's directory (right next to the hobix.yaml.) If this file exists, the plugin won't create it. This means that those of you who currently lack a master template can create it by doing: >> require 'hobix/weblog' >> weblog = Hobix::Weblog.load( '/path/to/hobix.yaml' ) >> weblog.setup Plugins can optionally store their configuration in files named similarly to their path. Slashes are replaced by dots. So the `hobix/publish/ping' settings can be stored in `hobix.publish.ping'. Just a YAML file. Or you can split up settings between the hobix.yaml and the plugin's config file. === The Quick Master === The `hobix.out.quick' contains the master template, but it can be deleted safely, it's not required. If can be safely modified as well. You can have it contain only your specific overrides. Basically, Quick templates overlay the master. Here's the overlay order: Hobix::Out::Quick Hobix::Out::Quick *_erb methods => redefinitions in lib/local.rb => hobix.out.quick => skel/*.quick So, ultimately, the master lies in the Hobix::Out::Quick class. But you can override it in lib/local.rb, if that suits your style. Since the default `hobix.out.quick' contains a full template, it masks any of those settings and acts as a master, unless you delete it or portions of it. From there, individual pages can be customized in skel. I like this change. You now have easy access to the master. And there's no danger of Hobix affecting your blog's appearance when upgrades happen. _why From why at hobix.com Sun Aug 14 00:02:04 2005 From: why at hobix.com (why the lucky stiff) Date: Sat Aug 13 23:56:23 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <20050812231936.GA10613@hal.void.org> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> <1123141225.42f1c6698088b@imp1-q.free.fr> <20050804154511.GC14748@masanjin.net> <20050805202630.GA7147@hal.void.org> <20050812231936.GA10613@hal.void.org> Message-ID: <42FEC23C.6020605@hobix.com> Frederick Ros wrote: >OK. Actually I tried that ... but the problem is the following: in the >skel directory I create 2 directories fr and en. Each of them contains, >for example, index.html.local ... >The main problem, is that the list of pages as build by build_pages is >something like .. 0, due to : > > path_storage = storage.path_storage( File.dirname( page_name ) ) > > > Yeah, skel's directory structure is guided by the `entries' directory structure. A few questions: * Do you allow comments? Per-entry? Or per-language-entry? * If an entry has multiple languages, is it more convenient to edit these translations as a single file? Or separate files, side-by-side? (i.e. entries/hobixTips.en.yaml, entries/hobixTips.fr.yaml.) * Do you want these entries to share metadata? I mean if hobixTips.en.yaml and hobixTips.fr.yaml share a `created' date, then you really can't tell when you added translations of an entry. But perhaps that doesn't matter. William's suggestion is along the lines I'd suggest. The skel_* methods are where transformations are supposed to happen. I would also recommend storing the language types in the IndexEntry. That sucks that you're having trouble with technorati. The JavaScript switch between english and french is really cool. _why From sl33p3r at free.fr Mon Aug 15 07:24:44 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Mon Aug 15 06:57:51 2005 Subject: skel prefix naming / Page id changing In-Reply-To: <42FEC23C.6020605@hobix.com> References: <20050802181903.GA7709@hal.void.org> <20050804035331.GB11348@masanjin.net> <1123141225.42f1c6698088b@imp1-q.free.fr> <20050804154511.GC14748@masanjin.net> <20050805202630.GA7147@hal.void.org> <20050812231936.GA10613@hal.void.org> <42FEC23C.6020605@hobix.com> Message-ID: <20050815112444.GA7887@hal.void.org> why the lucky stiff wrote : | A few questions: | | * Do you allow comments? Per-entry? Or per-language-entry? As I'm stuck with a static blog (my ISP does not yet allow me to run ruby on my account :(), I didn't look at the comment stuff ... In fact I think that the best would be to have per-language entry comments ... | * If an entry has multiple languages, is it more convenient to edit | these translations as a single file? Or separate files, side-by-side? | (i.e. entries/hobixTips.en.yaml, entries/hobixTips.fr.yaml.) Currently I do have only one file for english and french entries, and I think it would make sense to keep this ... Lazy as I am, I know that if I create an entry for the french version, I will be too lazy to add the enlish one after ... Moreover it also allow me to add content to both version easily .... | * Do you want these entries to share metadata? I mean if | hobixTips.en.yaml and hobixTips.fr.yaml share a `created' date, then you | really can't tell when you added translations of an entry. But perhaps | that doesn't matter. If the entries are different, I think it's better if they have different created time ;) | William's suggestion is along the lines I'd suggest. The skel_* methods | are where transformations are supposed to happen. I would also | recommend storing the language types in the IndexEntry. Yup ... I'm going to have a look long this line ... | That sucks that you're having trouble with technorati. The JavaScript | switch between english and french is really cool. I'm thinking about contact technorati support to see with thme if it's normal behavior ... On the other side I've been told my Javascript was not working using Safari ... -- Frederick Ros aka Sleeper -- sleeper@jabber.org How do I type "for i in *.dvi do xdvi i done" in a GUI? (Discussion in comp.os.linux.misc on the intuitiveness of interfaces.) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050815/30f113de/attachment-0001.bin From bg-hobix at infofiend.com Mon Aug 15 23:12:32 2005 From: bg-hobix at infofiend.com (Ben Giddings) Date: Mon Aug 15 23:05:46 2005 Subject: How do you enter properly formatted code? Message-ID: <200508152312.32385.bg-hobix@infofiend.com> Hi Why (or anybody else who can answer), How do I post an entry that contains copy-and-pasted code? Say it's even (ick) Python code, where I have to keep the indentation exactly as-is? How do I work the combination of YAML and Textile to enable me to paste something exactly as-is, and have it appear that way in the web page? Also, how do I make sure that the text *stays* that way when I want to edit that entry? In other words, if the solution involves content: | do something here... How do I make sure that the pipe character appears after the content, rather than being translated to say: content: > do something here... Danke! Ben From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 16 08:36:36 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 16 08:30:20 2005 Subject: How do you enter properly formatted code? In-Reply-To: <200508152312.32385.bg-hobix@infofiend.com> References: <200508152312.32385.bg-hobix@infofiend.com> Message-ID: <20050816123635.GA22318@masanjin.net> Excerpts from Ben Giddings's mail of 15 Aug 2005 (EDT): > How do I post an entry that contains copy-and-pasted code? Say it's > even (ick) Python code, where I have to keep the indentation exactly > as-is? How do I work the combination of YAML and Textile to enable me > to paste something exactly as-is, and have it appear that way in the > web page? You can either wrap it in a
 or you can simply indent the entire
codeblock with a few spaces.

(Another neat trick I just learned is that RedCloth turns @hello@ into
hello.)

> Also, how do I make sure that the text *stays* that way when I want to edit 
> that entry?  In other words, if the solution involves
> 
> content: |
>   do something here...
> 
> How do I make sure that the pipe character appears after the content, rather 
> than being translated to say:
> 
> content: >
>   do something here...

I can't really speak to this as I've never used |. I've seen YAML
rewrite >'s as quoted strings when they're really small, which is kinda
irritating. Maybe it's a similar thing---under what circumstances does
this happen?

-- 
William 
From bg-hobix at infofiend.com  Tue Aug 16 10:28:10 2005
From: bg-hobix at infofiend.com (Ben Giddings)
Date: Tue Aug 16 10:21:56 2005
Subject: How do you enter properly formatted code?
In-Reply-To: <20050816123635.GA22318@masanjin.net>
References: <200508152312.32385.bg-hobix@infofiend.com>
	<20050816123635.GA22318@masanjin.net>
Message-ID: <200508161028.11107.bg-hobix@infofiend.com>

On Tuesday 16 August 2005 08:36, William Morgan wrote:
> You can either wrap it in a 
 or you can simply indent the entire
> codeblock with a few spaces.

That's why I used Python (ugh) as an example.  If I indent everything a few 
spaces, I'll probably end up destroying Python's indentation, right?

And I've tried wrapping things in 
, it didn't seem to do the trick.  I 
can't remember what the issue was, but it didn't look like code.

If I could figure this out, I'd be much happier with Hobix.

Ben
From mental at rydia.net  Tue Aug 16 12:32:49 2005
From: mental at rydia.net (mental@rydia.net)
Date: Tue Aug 16 12:26:38 2005
Subject: How do you enter properly formatted code?
In-Reply-To: <20050816123635.GA22318@masanjin.net>
References: <200508152312.32385.bg-hobix@infofiend.com>
	<20050816123635.GA22318@masanjin.net>
Message-ID: <1124209969.430215318f7c9@www.rydia.net>

Quoting William Morgan :

> Excerpts from Ben Giddings's mail of 15 Aug 2005 (EDT):
> > How do I post an entry that contains copy-and-pasted code?

It'll need to be indented at least as far in as the YAML text block
itself, but aside from that you should be able to paste verbatim
and simply surround it with 
.  Example:

content: >
  Gibbons love the creamy taste of Dr. Peel's Seltzer Beverage.


  
if zorg < muggle or pramulon == zoot:
      you_can_eat(SOME_BERRIES) or knaw(CASABA_ROOT)
  elif you_just_want(A_GOOD_TIME):
      drink(SELTZER_BEVERAGE, WITH_FRUIT)
Drink Dr. Peel's! Occasionally something in the code will confuse Textile and you'll have to add an extra blank line to force a line break (some trial and error may be required), but otherwise the above approach should work fine. If you don't want to have to mess with YAML formatting at all, a custom editor is really what's called for. I believe Hobix has a very alpha one built in, but I've not played with it yet. > I can't really speak to this as I've never used |. I've seen YAML > rewrite >'s as quoted strings when they're really small, which is > kinda irritating. Maybe it's a similar thing---under what > circumstances does this happen? It's hardcoded in Hobix on a field-by-field basis. Some fields get plain strings when possible, but for others it requests that YAML.rb always serialize with >. Sadly, I don't think Syck provides a way to force | or I would prefer that option. But I could be wrong. _why? -mental From mental at rydia.net Tue Aug 16 12:36:17 2005 From: mental at rydia.net (mental@rydia.net) Date: Tue Aug 16 12:30:09 2005 Subject: How do you enter properly formatted code? In-Reply-To: <200508161028.11107.bg-hobix@infofiend.com> References: <200508152312.32385.bg-hobix@infofiend.com> <20050816123635.GA22318@masanjin.net> <200508161028.11107.bg-hobix@infofiend.com> Message-ID: <1124210177.43021601ebc73@www.rydia.net> Quoting Ben Giddings : > That's why I used Python (ugh) as an example. If I indent > everything a few spaces, I'll probably end up destroying Python's > indentation, right? That is nature's way of telling you to use Ruby. ^_- But, no, seriously, as long as you add the same amount of indentation to every pasted line, I don't see what problem you could possibly have. See my other post. -mental --- DRINK DR. PEEL'S! From why at hobix.com Tue Aug 16 15:43:49 2005 From: why at hobix.com (why the lucky stiff) Date: Tue Aug 16 15:37:33 2005 Subject: How do you enter properly formatted code? In-Reply-To: <1124209969.430215318f7c9@www.rydia.net> References: <200508152312.32385.bg-hobix@infofiend.com> <20050816123635.GA22318@masanjin.net> <1124209969.430215318f7c9@www.rydia.net> Message-ID: <430241F5.2060200@hobix.com> mental@rydia.net wrote: > Sadly, I don't think Syck provides a way to force | or I would prefer that option. But I could be wrong. _why? > You can override the String class, preferrably in singleton classes. $ irb -r yaml >> ary = ['normal', '"quoted"', 'force literal'] >> class << ary[2] >> def to_yaml_fold; '|'; end >> end >> y ary --- - normal - "\"quoted\"" - | force literal _why From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 16 15:54:12 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 16 15:47:58 2005 Subject: How do you enter properly formatted code? In-Reply-To: <430241F5.2060200@hobix.com> References: <200508152312.32385.bg-hobix@infofiend.com> <20050816123635.GA22318@masanjin.net> <1124209969.430215318f7c9@www.rydia.net> <430241F5.2060200@hobix.com> Message-ID: <20050816195411.GB23349@masanjin.net> Excerpts from why the lucky stiff's mail of 16 Aug 2005 (EDT): > You can override the String class, preferrably in singleton classes. Good to know. My short posts typically at least have a RedCloth-encoded URL, which turns into a mess of backslashes in quoted-string form. -- William From mental at rydia.net Tue Aug 16 23:47:10 2005 From: mental at rydia.net (MenTaLguY) Date: Tue Aug 16 23:40:58 2005 Subject: How do you enter properly formatted code? In-Reply-To: <430241F5.2060200@hobix.com> References: <200508152312.32385.bg-hobix@infofiend.com> <20050816123635.GA22318@masanjin.net> <1124209969.430215318f7c9@www.rydia.net> <430241F5.2060200@hobix.com> Message-ID: <1124250430.12677.51.camel@localhost.localdomain> On Tue, 2005-08-16 at 13:43 -0600, why the lucky stiff wrote: > You can override the String class, preferrably in singleton classes. > > $ irb -r yaml > >> ary = ['normal', '"quoted"', 'force literal'] > >> class << ary[2] > >> def to_yaml_fold; '|'; end > >> end > >> y ary > --- > - normal > - "\"quoted\"" > - | > force literal So, can we do that (or equivalent) for content by default? I think it would address many people's biggest Hobix pet peeve. |-folding is so much nicer than >-folding... -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050816/77ee878d/attachment.bin From mental at rydia.net Tue Aug 23 14:38:50 2005 From: mental at rydia.net (MenTaLguY) Date: Tue Aug 23 14:32:12 2005 Subject: bug or feature? Message-ID: <1124822330.1039.54.camel@localhost.localdomain> ...I can't decide. Since the RSS output bits consult the file timestamps to select the N most recent entries, editing an old entry will shoot it back to the top of your RSS feed. Good or bad? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050823/dff196e8/attachment.bin From tilman at code-monkey.de Tue Aug 23 14:50:18 2005 From: tilman at code-monkey.de (Tilman Sauerbeck) Date: Tue Aug 23 14:43:48 2005 Subject: bug or feature? In-Reply-To: <1124822330.1039.54.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> Message-ID: <20050823205018.154878b6.tilman@code-monkey.de> On Tue, 23 Aug 2005 14:38:50 -0400 MenTaLguY wrote: > Since the RSS output bits consult the file timestamps to select the N > most recent entries, editing an old entry will shoot it back to the top > of your RSS feed. > > Good or bad? Bad, IMHO. Maybe make it configurable? -- learn to quote: http://www.netmeister.org/news/learn2quote.html From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 23 14:59:48 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 23 14:53:22 2005 Subject: bug or feature? In-Reply-To: <1124822330.1039.54.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> Message-ID: <20050823185948.GC20644@masanjin.net> Excerpts from MenTaLguY's mail of 23 Aug 2005 (EDT): > Since the RSS output bits consult the file timestamps to select the N > most recent entries, editing an old entry will shoot it back to the > top of your RSS feed. FWIW, that's also the behavior I see from other blog software. I think ideally it would be configurable on a per-edit basis. Minor edits shouldn't be moved to the top of the list, but major ones should. -- William From mental at rydia.net Tue Aug 23 15:06:47 2005 From: mental at rydia.net (MenTaLguY) Date: Tue Aug 23 15:00:11 2005 Subject: bug or feature? In-Reply-To: <20050823185948.GC20644@masanjin.net> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> Message-ID: <1124824007.1039.56.camel@localhost.localdomain> On Tue, 2005-08-23 at 14:59 -0400, William Morgan wrote: > I think ideally it would be configurable on a per-edit basis. Minor > edits shouldn't be moved to the top of the list, but major ones should. That doesn't sound like a bad idea, but I'm not sure how it could be implemented easily (or what the commandline interface should look like). Suggestions? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050823/20acf939/attachment-0001.bin From why at hobix.com Tue Aug 23 15:32:54 2005 From: why at hobix.com (why the lucky stiff) Date: Tue Aug 23 15:26:32 2005 Subject: bug or feature? In-Reply-To: <1124822330.1039.54.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> Message-ID: <430B79E6.9010303@hobix.com> MenTaLguY wrote: > ...I can't decide. > > Since the RSS output bits consult the file timestamps to select the N > most recent entries, editing an old entry will shoot it back to the top > of your RSS feed. > > Good or bad? > Hey, feature! (Aggregators hang on to old stuff and readers are then notified of updates to old posts.) I like what William has said. _why From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 23 15:36:12 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 23 15:29:52 2005 Subject: bug or feature? In-Reply-To: <1124824007.1039.56.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> Message-ID: <20050823193612.GE20644@masanjin.net> Excerpts from MenTaLguY's mail of 23 Aug 2005 (EDT): > That doesn't sound like a bad idea, but I'm not sure how it could be > implemented easily (or what the commandline interface should look > like). Suggestions? Entries can already have a 'modified' timestamp field. I'm not entirely sure how this is used now---I see it sporadically in my entries. If we coopt this field and have 'hobix post' insert it, set to the current time, in the YAML before opening any pre-existing entry, we can use this to determine whether to push it up the list or not. Quick-summaries order by the value of this field || the Storage timestamp, and the author removes this field from the YAML at re-edit time if he doesn't want the post pushed up to the top of the list. Some portions of this behavior may already be the case. I forget. Do we want the same behavior across all quick-summaries, not just "syndication" ones? (Fuzzy distinction IMO.) -- William From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 23 15:45:31 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 23 15:39:03 2005 Subject: bug or feature? In-Reply-To: <20050823193612.GE20644@masanjin.net> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> <20050823193612.GE20644@masanjin.net> Message-ID: <20050823194531.GF20644@masanjin.net> Excerpts from William Morgan's mail of 23 Aug 2005 (EDT): > If we coopt this field and have 'hobix post' insert it, set to the > current time, in the YAML before opening any pre-existing entry, we > can use this to determine whether to push it up the list or not. Oh yeah, and the default behavior is unchanged: any change pushes it back up to the top of the queue. Really, though, this should be solved with the aggregator---they have more than enough information to make the distinction between fresh post an update. If I were writing one, I'd steal some MediaWiki code and just show a diff for updates. -- William From mental at rydia.net Tue Aug 23 16:53:40 2005 From: mental at rydia.net (MenTaLguY) Date: Tue Aug 23 16:47:32 2005 Subject: bug or feature? In-Reply-To: <20050823194531.GF20644@masanjin.net> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> <20050823193612.GE20644@masanjin.net> <20050823194531.GF20644@masanjin.net> Message-ID: <1124830420.1039.59.camel@localhost.localdomain> On Tue, 2005-08-23 at 15:45 -0400, William Morgan wrote: > Really, though, this should be solved with the aggregator---they have > more than enough information to make the distinction between fresh post > an update. If I were writing one, I'd steal some MediaWiki code and just > show a diff for updates. Sadly, most don't seem to do this. Certainly Planet doesn't seem to, which is what got me thinking about this. -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050823/1c00b943/attachment.bin From mental at rydia.net Tue Aug 23 17:04:22 2005 From: mental at rydia.net (MenTaLguY) Date: Tue Aug 23 16:57:57 2005 Subject: bug or feature? In-Reply-To: <20050823194531.GF20644@masanjin.net> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> <20050823193612.GE20644@masanjin.net> <20050823194531.GF20644@masanjin.net> Message-ID: <1124831062.1039.70.camel@localhost.localdomain> On Tue, 2005-08-23 at 15:45 -0400, William Morgan wrote: > Excerpts from William Morgan's mail of 23 Aug 2005 (EDT): > > If we coopt this field and have 'hobix post' insert it, set to the > > current time, in the YAML before opening any pre-existing entry, we > > can use this to determine whether to push it up the list or not. > > Oh yeah, and the default behavior is unchanged: any change pushes it > back up to the top of the queue. Hmm, so if I didn't want the post pushed up the list, what would I do? -mental -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050823/a1996b3d/attachment.bin From christian at luijten.org Tue Aug 23 17:15:39 2005 From: christian at luijten.org (Christian Luijten) Date: Tue Aug 23 17:09:00 2005 Subject: Creating multiple pages from one single entry Message-ID: <2252c394c00677af85d4aad73d112c82@luijten.org> Hi, I'm trying to create a photogallery entry type and so far I've succeeded in writing out a thumbnail page (yeah, well, that isn't that hard, is it) by changing the linklist entry type to my wishes. Now, I would like to create links from the thumbnails to.. a page containing the larger version. I'd like to know how to do this, if it is at all possible. Thumbnail gallery: http://luijten.org/page/photos/berlin.html Thanks, Christian Luijten -------------- next part -------------- A non-text attachment was scrubbed... Name: photogallery.rb Type: application/octet-stream Size: 3144 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050823/1707c515/photogallery.obj From halostatue at gmail.com Tue Aug 23 17:49:48 2005 From: halostatue at gmail.com (Austin Ziegler) Date: Tue Aug 23 17:43:17 2005 Subject: bug or feature? In-Reply-To: <1124831062.1039.70.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> <20050823193612.GE20644@masanjin.net> <20050823194531.GF20644@masanjin.net> <1124831062.1039.70.camel@localhost.localdomain> Message-ID: <9e7db9110508231449652ba2bf@mail.gmail.com> On 8/23/05, MenTaLguY wrote: > On Tue, 2005-08-23 at 15:45 -0400, William Morgan wrote: > > Excerpts from William Morgan's mail of 23 Aug 2005 (EDT): > > > If we coopt this field and have 'hobix post' insert it, set to the > > > current time, in the YAML before opening any pre-existing entry, we > > > can use this to determine whether to push it up the list or not. > > > > Oh yeah, and the default behavior is unchanged: any change pushes it > > back up to the top of the queue. > > Hmm, so if I didn't want the post pushed up the list, what would I do? Some aggregators also use a unique identifier on RSS entries to ensure that old entries aren't popped up again. -austin -- Austin Ziegler * halostatue@gmail.com * Alternate: austin@halostatue.ca From wmorgan-hobix-is-the-way at masanjin.net Tue Aug 23 17:56:10 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Tue Aug 23 17:49:42 2005 Subject: bug or feature? In-Reply-To: <1124830420.1039.59.camel@localhost.localdomain> References: <1124822330.1039.54.camel@localhost.localdomain> <20050823185948.GC20644@masanjin.net> <1124824007.1039.56.camel@localhost.localdomain> <20050823193612.GE20644@masanjin.net> <20050823194531.GF20644@masanjin.net> <1124830420.1039.59.camel@localhost.localdomain> Message-ID: <20050823215610.GC21620@masanjin.net> Excerpts from MenTaLguY's mail of 23 Aug 2005 (EDT): > Sadly, most don't seem to do this. Certainly Planet doesn't seem to, > which is what got me thinking about this. Nor does Bloglines, which is why I don't think it's such a terrible idea that Hobix be able to do this. It is irritating to have those old posts appear again and again. -- William From wmorgan-hobix-is-the-way at masanjin.net Wed Aug 24 17:31:55 2005 From: wmorgan-hobix-is-the-way at masanjin.net (William Morgan) Date: Wed Aug 24 17:25:24 2005 Subject: Creating multiple pages from one single entry In-Reply-To: <2252c394c00677af85d4aad73d112c82@luijten.org> References: <2252c394c00677af85d4aad73d112c82@luijten.org> Message-ID: <20050824213155.GC25973@masanjin.net> Hi Christian, Excerpts from Christian Luijten's mail of 23 Aug 2005 (EDT): > I'm trying to create a photogallery entry type and so far I've > succeeded in writing out a thumbnail page (yeah, well, that isn't that > hard, is it) by changing the linklist entry type to my wishes. > > Now, I would like to create links from the thumbnails to.. a page > containing the larger version. I'd like to know how to do this, if it > is at all possible. I think the most natural way to do this is for each entry to represent an individual picture, and for the summary pages to act as the galleries. Subclass Entry to contain an image and a thumbnail. Modify the entry ERB to make entry_content the image, and modify the index ERB to make entry_content the thumbnail. That should do it. (Bonus points if you can get quick-summary to display in tabular form.) -- William From jbd at justindossey.com Tue Aug 30 12:38:34 2005 From: jbd at justindossey.com (jbd@justindossey.com) Date: Tue Aug 30 13:34:59 2005 Subject: hobix and rails-- www.podomatic.com Message-ID: Hi all, Yes, I've put hobix on rails. It's at www.podOmatic.com. Okay, I wound up not using quite a bit of hobix, as the site's geared toward novice users, and they don't much care about trackbacks or RedCloth. So what did make it in? Pretty much, just the weblog base class and the YAML stuff. I do intend to improve on that. The site is built around the idea of podcasting. We provide anyone with their own podcast blog and all the associated bits and pieces like search, folksonomy, recommendations, and an online media library. Hobix is flexible enough that it wasn't a big stretch to add an email-like facility for sharing audio files. You can record new audio directly through the browser using a flash applicaation, and there are some flash tools on the site that allow you to create multi-part recordings (think intro and outro). I hacked the rss plugin (and the Entry class) to allow enclosures, and replaced the Storage fu with a distributed filesystem-based storage layer. So if you get a podmail from someone, or you see a link to someone's podcast on podOmatic, be glad! hobix is in there, saving the day! Thank you all for your help along the way and most of all, for Hobix itself. -- Justin Dossey Operations, podOmatic From sl33p3r at free.fr Tue Aug 30 15:01:15 2005 From: sl33p3r at free.fr (Frederick Ros) Date: Tue Aug 30 14:30:10 2005 Subject: hobix and rails-- www.podomatic.com In-Reply-To: References: Message-ID: <20050830190115.GA7862@hal.void.org> jbd@justindossey.com wrote : | So if you get a podmail from someone, or you see a link to someone's | podcast on podOmatic, be glad! hobix is in there, saving the day! | | Thank you all for your help along the way and most of all, for Hobix | itself. Yeah .. that rocks !! Nice to see that _why's product can be so extensible !! -- Frederick Ros aka Sleeper -- sleeper@jabber.fr There are no threads in a.b.p.erotica, so there's no gain in using a threaded news reader. (Unknown source) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://rubyforge.org/pipermail/hobix-is-the-way/attachments/20050830/fab38e66/attachment.bin From why at hobix.com Tue Aug 30 17:37:15 2005 From: why at hobix.com (why the lucky stiff) Date: Tue Aug 30 17:30:32 2005 Subject: hobix and rails-- www.podomatic.com In-Reply-To: References: Message-ID: <4314D18B.2040703@hobix.com> jbd@justindossey.com wrote: > Yes, I've put hobix on rails. It's at www.podOmatic.com. Good Lord. > I hacked the rss plugin (and the Entry class) to allow enclosures, and > replaced the Storage fu with a distributed filesystem-based storage > layer. So, let me see if I understand. You're using Hobix where others might use ActiveRecord? I'm guessing that you're just using Hobix API calls inside your controllers? I'd really like to hear more about how this really works. Maybe you could explain a specific example which stuffs data in Hobix. How did you do enclosures? Are they entry attachments or something? > Thank you all for your help along the way and most of all, for Hobix > itself. Yeah, whatever! Sounds like you made a hovercraft from a capacitor. Cool stuff, Justin. RedHanded will hear about this. _why From jbd at justindossey.com Tue Aug 30 19:15:25 2005 From: jbd at justindossey.com (Justin Dossey) Date: Tue Aug 30 20:11:45 2005 Subject: hobix and rails-- www.podomatic.com In-Reply-To: <4314D18B.2040703@hobix.com> References: <4314D18B.2040703@hobix.com> Message-ID: Answers below. On Tue, 30 Aug 2005, why the lucky stiff wrote: > So, let me see if I understand. You're using Hobix where others > might use ActiveRecord? I'm guessing that you're just using Hobix > API calls inside your controllers? I'd really like to hear more > about how this really works. Maybe you could explain a specific > example which stuffs data in Hobix. I actually do use ActiveRecord, I just don't have any database tables. I just use AR because it gets me some handy Rails fu. The object in AR contains an entry index and the weblog object, and methods in the model act on those, doing saves, regens, and upgens as necessary. The controller preps data for views and packages it for the model, handling any exceptions that come back. Hobix's filesystem storage plugin goes substantially unused, as the site sits on a network-based distributed user data store. Here's an example. Note that I was new to Ruby, to Rails, and to Hobix when I started on this, so it isn't as fluent as it will be in the future. # controller: (@b is the model object, a Podcast) def personalize case @request.method when :get @b=Podcast.find(@session['user']['login']) unless @b when :post @b=Podcast.find(@session['user']['login']) unless @b linklist=nil unless @params['link_name'].empty? linklist=@params['link_name'].values.zip(@params['link_place'].values) end vars=Hash.new vars['podcast_title']=@params['podcast']['title'] vars['podcast_tagline']=@params['podcast']['tagline'] vars['podcast_author']=@session['user']['login'] vars['linklist']=linklist @b.save(vars) flash['notice']="Changes saved." redirect_to :action => "show" end end # model: def save(vars=nil) @podcast=Hobix::Weblog.load(@hobix_yaml) if vars @podcast.title=vars["podcast_title"] if vars['podcast_title'] @podcast.tagline=vars["podcast_tagline"] if vars['podcast_tagline'] if vars['linklist'] @podcast.linklist = Hobix::LinkList.new @podcast.linklist.links=YAML::Omap.new vars['linklist'].each do |k,v| next if k.nil? or v.nil? or k.empty? or v.empty? @podcast.linklist.links[k]=v end end end @podcast.save @podcast=Hobix::Weblog::load(@hobix_yaml) # full regen is necessary if hobix.yaml changes @podcast.regenerate end > How did you do enclosures? Are they entry attachments or something? I have an additional object on the Entry, a Hash that I just call 'cast'. It has the three required fields (length, URL, MIME type), and the URL is just a call back to a method in another controller that sends the media file from its designated place in the user data store. Since the site lets you do all kinds of different things to media files, I couldn't attach them to any particular Entry object. -- Justin