Login | Register For Free | Help
Search for: (Advanced)

Mailing List Archive: Bricolage: devel

can I use bric_soap to run a utility template?

 

 

Bricolage devel RSS feed   Index | Next | Previous | View Threaded


dawn at dawnthots

Oct 18, 2011, 3:42 PM

Post #1 of 12 (2995 views)
Permalink
can I use bric_soap to run a utility template?

Hi all

I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?

Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.

I know b) works but I wondered if

the bric_soap template module might have a command I didn't know about that would suit this situation.

thank you
Dawn


david at kineticode

Oct 18, 2011, 4:48 PM

Post #2 of 12 (2900 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On Oct 18, 2011, at 3:42 PM, Dawn Buie wrote:

> I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?

No.

> Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.
>
> I know b) works but I wondered if
>
> the bric_soap template module might have a command I didn't know about that would suit this situation.

I presume you're calling that utility template from story template already, yes? In that case, just republish a story using said template.

Best,

David


dawn at dawnthots

Oct 18, 2011, 5:08 PM

Post #3 of 12 (2909 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

ok thanks

On 2011-10-18, at 7:48 PM, David E. Wheeler wrote:

> On Oct 18, 2011, at 3:42 PM, Dawn Buie wrote:
>
>> I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?
>
> No.
>
>> Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.
>>
>> I know b) works but I wondered if
>>
>> the bric_soap template module might have a command I didn't know about that would suit this situation.
>
> I presume you're calling that utility template from story template already, yes? In that case, just republish a story using said template.
>
> Best,
>
> David
>


dawn at dawnthots

Oct 19, 2011, 8:19 AM

Post #4 of 12 (2907 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

Has there ever been a feature request for a kind of template that just contains scripts which can be run with a cronjob - within the bricolage environment?

Current bricolage just works on the publish paradigm, nothing happens until you publish a story or media item. Is that paradigm fulfilling everyone's needs?

Dawn


On 2011-10-18, at 8:08 PM, Dawn Buie wrote:

> ok thanks
>
> On 2011-10-18, at 7:48 PM, David E. Wheeler wrote:
>
>> On Oct 18, 2011, at 3:42 PM, Dawn Buie wrote:
>>
>>> I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?
>>
>> No.
>>
>>> Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.
>>>
>>> I know b) works but I wondered if
>>>
>>> the bric_soap template module might have a command I didn't know about that would suit this situation.
>>
>> I presume you're calling that utility template from story template already, yes? In that case, just republish a story using said template.
>>
>> Best,
>>
>> David
>>
>


ps at phillipadsmith

Oct 19, 2011, 8:28 AM

Post #5 of 12 (2907 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

Why put the scripts in a template? Why not just run a script that does the work that you want done, like bric_soap or bric_republish do?

On 2011-10-19, at 11:19 AM, Dawn Buie wrote:

> Has there ever been a feature request for a kind of template that just contains scripts which can be run with a cronjob - within the bricolage environment?
>
> Current bricolage just works on the publish paradigm, nothing happens until you publish a story or media item. Is that paradigm fulfilling everyone's needs?
>
> Dawn
>
>
> On 2011-10-18, at 8:08 PM, Dawn Buie wrote:
>
>> ok thanks
>>
>> On 2011-10-18, at 7:48 PM, David E. Wheeler wrote:
>>
>>> On Oct 18, 2011, at 3:42 PM, Dawn Buie wrote:
>>>
>>>> I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?
>>>
>>> No.
>>>
>>>> Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.
>>>>
>>>> I know b) works but I wondered if
>>>>
>>>> the bric_soap template module might have a command I didn't know about that would suit this situation.
>>>
>>> I presume you're calling that utility template from story template already, yes? In that case, just republish a story using said template.
>>>
>>> Best,
>>>
>>> David
>>>
>>
>

--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith

Save our in-boxes! http://emailcharter.org


dawn at dawnthots

Oct 19, 2011, 8:42 AM

Post #6 of 12 (2909 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

Yes I know I could do that - but I'm saying why not house that functionality within the Bricolage UI itself. As we get competent (somewhat) with scripting outside of Bricolage we sometimes forget how hard it is for the newbie to get started. I'm thinking of something like Greasemonkey for Firefox a place within the UI where you can just paste stuff that other people said will do the job for you.

I'm just looking for a list of features/tweaks that might be good for us to work on at out next Brick Hack too. I know I've been out of the loop for a while - so I hope I don't offend if I've missed something that's already been talked about.

Dawn

On 2011-10-19, at 11:28 AM, Phillip Smith wrote:

>
> Why put the scripts in a template? Why not just run a script that does the work that you want done, like bric_soap or bric_republish do?
>
> On 2011-10-19, at 11:19 AM, Dawn Buie wrote:
>
>> Has there ever been a feature request for a kind of template that just contains scripts which can be run with a cronjob - within the bricolage environment?
>>
>> Current bricolage just works on the publish paradigm, nothing happens until you publish a story or media item. Is that paradigm fulfilling everyone's needs?
>>
>> Dawn
>>
>>
>> On 2011-10-18, at 8:08 PM, Dawn Buie wrote:
>>
>>> ok thanks
>>>
>>> On 2011-10-18, at 7:48 PM, David E. Wheeler wrote:
>>>
>>>> On Oct 18, 2011, at 3:42 PM, Dawn Buie wrote:
>>>>
>>>>> I'd like to call a utility template - which simply republishes a bunch of stories - using bric_soap. Is there a way to do this - similar to how we would use $m->comp('util/republish_stuff.mc') in a story template?
>>>>
>>>> No.
>>>>
>>>>> Or do I have to make a story template which either a) calls the utility template, republish_stuff.mc' or b) paste the guts of republish_stuff.mc' into the new republish.mc story.
>>>>>
>>>>> I know b) works but I wondered if
>>>>>
>>>>> the bric_soap template module might have a command I didn't know about that would suit this situation.
>>>>
>>>> I presume you're calling that utility template from story template already, yes? In that case, just republish a story using said template.
>>>>
>>>> Best,
>>>>
>>>> David
>>>>
>>>
>>
>
> --
> Phillip Smith
> http://phillipadsmith.com
> http://twitter.com/phillipadsmith
> http://linkedin.com/in/phillipadsmith
>
> Save our in-boxes! http://emailcharter.org
>


david at kineticode

Oct 19, 2011, 9:02 AM

Post #7 of 12 (2906 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On Oct 19, 2011, at 8:42 AM, Dawn Buie wrote:

> Yes I know I could do that - but I'm saying why not house that functionality within the Bricolage UI itself. As we get competent (somewhat) with scripting outside of Bricolage we sometimes forget how hard it is for the newbie to get started. I'm thinking of something like Greasemonkey for Firefox a place within the UI where you can just paste stuff that other people said will do the job for you.

Maybe, but Templates are the wrong place for such functionality. They should be for formatting stories, period. It's bad enough that thery're used for all sorts of other things, like publishing other stories.

> I'm just looking for a list of features/tweaks that might be good for us to work on at out next Brick Hack too. I know I've been out of the loop for a while - so I hope I don't offend if I've missed something that's already been talked about.

I am so offended.

NOT.

I think that this may be closer to what you're thinking of:

http://www.justatheory.com/bricolage/design/tasks_jobs_actions.html

Best,

David


ps at phillipadsmith

Oct 19, 2011, 9:10 AM

Post #8 of 12 (2905 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On 2011-10-19, at 12:02 PM, David E. Wheeler wrote:

> On Oct 19, 2011, at 8:42 AM, Dawn Buie wrote:
>
>> Yes I know I could do that - but I'm saying why not house that functionality within the Bricolage UI itself. As we get competent (somewhat) with scripting outside of Bricolage we sometimes forget how hard it is for the newbie to get started. I'm thinking of something like Greasemonkey for Firefox a place within the UI where you can just paste stuff that other people said will do the job for you.
>
> Maybe, but Templates are the wrong place for such functionality. They should be for formatting stories, period. It's bad enough that thery're used for all sorts of other things, like publishing other stories.
>
>> I'm just looking for a list of features/tweaks that might be good for us to work on at out next Brick Hack too. I know I've been out of the loop for a while - so I hope I don't offend if I've missed something that's already been talked about.
>
> I am so offended.
>
> NOT.
>
> I think that this may be closer to what you're thinking of:
>
> http://www.justatheory.com/bricolage/design/tasks_jobs_actions.html

No offence here either -- more curiosity than anything. :)

The only similar thing we've discussed that I can remember is having like a REPL or something along those lines in the Bricolage UI, i.e., you paste in some code and run it right there and get the results back. For example, you could paste in a complex Story->list() to see what it would return, or to debug a template, etc.

Phillip.

--
Phillip Smith
http://phillipadsmith.com
http://twitter.com/phillipadsmith
http://linkedin.com/in/phillipadsmith

Save our in-boxes! http://emailcharter.org


greg at node79

Oct 19, 2011, 3:21 PM

Post #9 of 12 (2904 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On 2011-10-19, at 12:10 PM, Phillip Smith wrote:

> No offence here either -- more curiosity than anything. :)

OK fine, I'll take some offence since no one else is!

> The only similar thing we've discussed that I can remember is having like a REPL or something along those lines in the Bricolage UI...

I like that idea. We can just duct tape re.pl (http://search.cpan.org/~doy/Devel-REPL-1.003012/lib/Devel/REPL.pm) together with the Bricolage environment and...instant command-line Bricolage!


dawn at dawnthots

Oct 19, 2011, 3:39 PM

Post #10 of 12 (2907 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On 2011-10-19, at 12:02 PM, David E. Wheeler wrote:

> On Oct 19, 2011, at 8:42 AM, Dawn Buie wrote:
>
>> Yes I know I could do that - but I'm saying why not house that functionality within the Bricolage UI itself. As we get competent (somewhat) with scripting outside of Bricolage we sometimes forget how hard it is for the newbie to get started. I'm thinking of something like Greasemonkey for Firefox a place within the UI where you can just paste stuff that other people said will do the job for you.
>
> Maybe, but Templates are the wrong place for such functionality. They should be for formatting stories, period. It's bad enough that thery're used for all sorts of other things, like publishing other stories.

Interesting. So you don't like templates being used for republishing?
>
> I think that this may be closer to what you're thinking of:
>
> http://www.justatheory.com/bricolage/design/tasks_jobs_actions.html

You know I've never bothered with these bits of (Actions, Alerts ) Bricolage. I do set up Destinations, and I see jobs when they are in the Job queue, but as a result of other things I've done - I've never set up a Job specifically.

So are TASKS still Just a Theory? because there is no Bricolage::Biz::Task isn't in the API.

I see what you are doing with all of these bits, were you imagining in future Bricolage versions they would offer more options from the UI as opposed to being classes that need to be called from templates which are called from stories getting published?

Thanks for the info - I like the grammar of Bricolage - but I think it would be great if we could construct clearer sentences with ease. I'd like to hear more about what's already been tried.

Dawn

>
> Best,
>
> David
>


dawn at dawnthots

Oct 19, 2011, 3:40 PM

Post #11 of 12 (2903 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On 2011-10-19, at 6:21 PM, Greg Heo wrote:

> On 2011-10-19, at 12:10 PM, Phillip Smith wrote:
>
>> No offence here either -- more curiosity than anything. :)
>
> OK fine, I'll take some offence since no one else is!

A good offence is more important that a good defence, apparently.

Dawn


david at kineticode

Oct 19, 2011, 3:49 PM

Post #12 of 12 (2905 views)
Permalink
Re: can I use bric_soap to run a utility template? [In reply to]

On Oct 19, 2011, at 3:39 PM, Dawn Buie wrote:

>> Maybe, but Templates are the wrong place for such functionality. They should be for formatting stories, period. It's bad enough that thery're used for all sorts of other things, like publishing other stories.
>
> Interesting. So you don't like templates being used for republishing?

No. If I were designing a new system today, templates would be used for only one thing: templating. All the other shit that templates currently do would be handled in other ways designed for whatever purpose they're meant to serve.

>> I think that this may be closer to what you're thinking of:
>>
>> http://www.justatheory.com/bricolage/design/tasks_jobs_actions.html
>
> You know I've never bothered with these bits of (Actions, Alerts ) Bricolage. I do set up Destinations, and I see jobs when they are in the Job queue, but as a result of other things I've done - I've never set up a Job specifically.
>
> So are TASKS still Just a Theory? because there is no Bricolage::Biz::Task isn't in the API.

Yes. That blog post was meant as a design document. There has never been an implementation (or even a plan for one).

> I see what you are doing with all of these bits, were you imagining in future Bricolage versions they would offer more options from the UI as opposed to being classes that need to be called from templates which are called from stories getting published?

Yes.

> Thanks for the info - I like the grammar of Bricolage - but I think it would be great if we could construct clearer sentences with ease. I'd like to hear more about what's already been tried.

Currently, things are done programmatically with Bricolage in three ways:

* Templates. Useful for publishing related documents
* SOAP. Useful for bulk tasks
* Scripts using the API. Offers the most control.

Best,

David

Bricolage devel RSS feed   Index | Next | Previous | View Threaded
 
 


Interested in having your list archived? Contact Gossamer Threads
 
  Web Applications & Managed Hosting Powered by Gossamer Threads Inc.