Modifying many recipes with out use of GUI

17 views
Skip to first unread message

Jason Miller

unread,
Nov 23, 2011, 2:07:51 PM11/23/11
to Bitten
I have built two simple python scripts which facilitate saving all the
recipes as files, and another script that writes the data back
(through the use of SQL update, so its pretty safe). Thus allowing you
to make use of awk, sed, grep or any other favorite editor tool to
help manage recipes.

The reason for the post, is that I have not been able to find said
tools, and I am sure if there was such a tool available, would be
better then mine. Does anyone know of such a tool? Or, if not, I will
gladly post my two scripts.

Thanks,
Jason Miller

W. Martin Borgert

unread,
Nov 23, 2011, 9:04:22 PM11/23/11
to bit...@googlegroups.com, Jason Miller
Quoting "Jason Miller" <m.jason...@gmail.com>:
> Or, if not, I will
> gladly post my two scripts.

Please do post them. TIA!

Jason Miller

unread,
Nov 26, 2011, 3:09:34 PM11/26/11
to Bitten

On Nov 23, 7:04 pm, "W. Martin Borgert" <deba...@debian.org> wrote:


> Quoting "Jason Miller" <m.jason.mil...@gmail.com>:
>
> > Or, if not, I will
> > gladly post my two scripts.
>
> Please do post them. TIA!


<after attempting a copy/past... and failing>

Hmmm I knew that copy/paste was going to be a bad idea!
Alright then. The two scripts can be grabbed from a public place:

http://millerfam.org/bitten_recipe.tar.gz

Hope these help some people like it does me. We have/maintain about 40
recipes, and frequently must make small mundane changes to each of
them. I finally got tired of it. Because the old saying is true: If
your using a mouse, your doing it wrong!

haha

Cheers, and happy Thanks Giving all!

Jason Miller

unread,
Nov 28, 2011, 3:47:54 PM11/28/11
to bit...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Bitten" group.
To post to this group, send email to bit...@googlegroups.com.
To unsubscribe from this group, send email to bitten+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bitten?hl=en.



Sorry all for one more post… But I am seeing traffic on my web server for the files, so I thought I would go ahead and make a Trac-Hack page for it:


I'll be sure to keep it updated as I use it here at work etc etc.

Hope this is helping people!
Jason

Brettschneider Falk

unread,
Nov 29, 2011, 2:26:09 AM11/29/11
to bit...@googlegroups.com
Hi,
just for my understanding: "...saving all the recipes..." - Why do you
have many recipes? I have one recipe per branch, and there are trunk and
a very few release branches. So no trouble with the number of recipes,
not hard to copy and paste those few ones in the Admin page of Trac. And
a recipe is mainly just a call to 4 steps here:
clean+update+execute+finish, so just 20 lines of code in a recipe.
The Bitten slave's script is called by recipe and at first updates
further scripts from its svn branch, and so each configuration can have
its own work script. Those further scripts are doing the actual work.
Working this way, where is the need for your tools?
CU, falkb


> -----Original Message-----
> From: bit...@googlegroups.com [mailto:bit...@googlegroups.com] On
Behalf
> Of Jason Miller
> Sent: Wednesday, November 23, 2011 8:08 PM
> To: Bitten
> Subject: [Bitten] Modifying many recipes with out use of GUI
>
> I have built two simple python scripts which facilitate saving all the
> recipes as files, and another script that writes the data back
> (through the use of SQL update, so its pretty safe). Thus allowing you
> to make use of awk, sed, grep or any other favorite editor tool to
> help manage recipes.
>
> The reason for the post, is that I have not been able to find said
> tools, and I am sure if there was such a tool available, would be

> better then mine. Does anyone know of such a tool? Or, if not, I will


> gladly post my two scripts.
>

> Thanks,
> Jason Miller


>
> --
> You received this message because you are subscribed to the Google
Groups
> "Bitten" group.
> To post to this group, send email to bit...@googlegroups.com.
> To unsubscribe from this group, send email to
> bitten+un...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/bitten?hl=en.

---
Geschaftsfuhrer: Dr. Joachim Ihlefeld . Marcel Seeber . Dr. Oliver Vietze
Sitz der Gesellschaft: Radeberg
Amtsgericht Dresden: HRB 15379
Ust. ID: DE 189714583

Simon Cross

unread,
Nov 29, 2011, 2:45:16 PM11/29/11
to bit...@googlegroups.com
On Mon, Nov 28, 2011 at 10:47 PM, Jason Miller <m.jason...@gmail.com> wrote:
> Sorry all for one more post… But I am seeing traffic on my web server for
> the files, so I thought I would go ahead and make a Trac-Hack page for it:
> http://trac-hacks.org/wiki/BittenRecipesExtractorScript
> I'll be sure to keep it updated as I use it here at work etc etc.
> Hope this is helping people!

Thanks very much for sharing your work. The ability to edit recipes
outside of the web admin interface is a common request. Ideally I'd
like to see Bitten grow an HTTP API of some sort but your scripts are
a nice work around.

Schiavo
Simon

anatoly techtonik

unread,
Nov 29, 2011, 4:21:43 PM11/29/11
to bit...@googlegroups.com
It looks like this should be done by trac-admin interface. Can Bitten plug into it?
-- 
anatoly t. 

Jason Miller

unread,
Nov 29, 2011, 4:36:12 PM11/29/11
to bit...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Bitten" group.
To post to this group, send email to bit...@googlegroups.com.
To unsubscribe from this group, send email to bitten+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bitten?hl=en.


Good point…

I would love to contribute to the actual Trac development, but I won't claim to know Python beyond what you can see I am already capable of.

Jason

Jason Miller

unread,
Nov 29, 2011, 5:44:26 PM11/29/11
to bit...@googlegroups.com
On Nov 29, 2011, at 2:21 PM, anatoly techtonik wrote:
--
You received this message because you are subscribed to the Google Groups "Bitten" group.
To post to this group, send email to bit...@googlegroups.com.
To unsubscribe from this group, send email to bitten+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bitten?hl=en.


I do not see any such trac-admin command which interfaces with any plugins what so ever… I think the way I am going might be the 'right' way for now. I admit, that sounds like a great idea, to have a trac-admin command dump and import recipes. But even if I started down that path, I think I would _really_ be stepping on some toes within that group.

A bitten plugin though… do mean like an API one click button that exports, imports XML bitten recipes from the bitten admin console as Simon suggests? I have already begun digging around to see how I would do that… Excitedly I might add.

And thank you Simon for your kind words!

Jason

anatoly techtonik

unread,
Nov 30, 2011, 5:31:41 AM11/30/11
to bit...@googlegroups.com
On Wed, Nov 30, 2011 at 1:44 AM, Jason Miller <m.jason...@gmail.com> wrote:
On Nov 29, 2011, at 2:21 PM, anatoly techtonik wrote:

On Tue, Nov 29, 2011 at 10:45 PM, Simon Cross <hodg...@gmail.com> wrote:
On Mon, Nov 28, 2011 at 10:47 PM, Jason Miller <m.jason...@gmail.com> wrote:
> Sorry all for one more post… But I am seeing traffic on my web server for
> the files, so I thought I would go ahead and make a Trac-Hack page for it:
> http://trac-hacks.org/wiki/BittenRecipesExtractorScript
> I'll be sure to keep it updated as I use it here at work etc etc.
> Hope this is helping people!

Thanks very much for sharing your work. The ability to edit recipes
outside of the web admin interface is a common request. Ideally I'd
like to see Bitten grow an HTTP API of some sort but your scripts are
a nice work around.

It looks like this should be done by trac-admin interface. Can Bitten plug into it?

I do not see any such trac-admin command which interfaces with any plugins what so ever… I think the way I am going might be the 'right' way for now. I admit, that sounds like a great idea, to have a trac-admin command dump and import recipes. But even if I started down that path, I think I would _really_ be stepping on some toes within that group.

A bitten plugin though… do mean like an API one click button that exports, imports XML bitten recipes from the bitten admin console as Simon suggests? I have already begun digging around to see how I would do that… Excitedly I might add.

And thank you Simon for your kind words!

Since version 0.12 it is possible to add own commands to trac-admin - http://trac.edgewall.org/browser//branches/0.12-stable/trac/admin/api.py#L56

It seems that the proper place for that would be:

But I am not sure how to make plugin compatible with 0.11 then.
-- 
anatoly t.

Jason Miller

unread,
Nov 30, 2011, 8:55:04 AM11/30/11
to bit...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "Bitten" group.
To post to this group, send email to bit...@googlegroups.com.
To unsubscribe from this group, send email to bitten+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/bitten?hl=en.


I would continue to do this if only to learn more about Trac and Python… But after some thought about how and what a new API (a button on the Admin Panel) could do, I found myself back to the 'to-many-mouse-clicks' dilemma. I simply can not think of a quicker way to retrieve and commit changes to my recipes then the way I have it now. But the additional functionality would be welcomed I am sure.

Jason
Reply all
Reply to author
Forward
0 new messages