← Back to team overview

quickly-talk team mailing list archive

Re: optimum folder for post_create.py etc

 

I agree commandsconfig is probably not the best configuration file for
edit. I could see a workflow where a user could bash out a project
then want to edit help files later, then switch back to code. This
does not look like a template class rewrite to me. Perhaps such a
configuration might go into .quickly in the project folder?

This works but is a bit tortuous

foo-template/edit.py

from quickly.template.ubuntu_application import Edit as UbuntuAppEdit

class Edit(UbuntuAppEdit):

edit_files = ["project"]

To switch file group you need to gedit
~/.config/quickly/templates/foo-template/edit.py

foo-template/edit.py

from quickly.template.ubuntu_application import Edit as UbuntuAppEdit

class Edit(UbuntuAppEdit):

edit_files = ["help"]

However was't one of the points of quickly to make stuff like
gedit ~/.config/quickly/templates/foo-template/edit.py easier ?

On 14/08/2012, Didier Roche <didrocks@xxxxxxxxxx> wrote:
> Le 14/08/2012 10:54, tony byrne a écrit :
>> Hi Didier
>
> Hey Tony,
>>
>> ~/.config/quickly/templates/builtins/
>>
>> looks like it may solve my -t toolkit add  problem
>>
>> For your information I routinely run
>>
>> quickly create ubuntu-application <project-name>
>> quickly -t toolkit add nolaunchpad # removes launchpad integration
>> quickly -t toolkit add jsonfile # replaces couchDB by a json config
>> file in ~/.config/<project-name>
>>
>> Then the resultant project runs on a windows pc!
>>
>> I'm assuming from earlier descriptions that I move nolaunchpad and
>> jsonfile to
>> ~/.config/quickly/templates/builtins/store
>> then my visual basic killer workflow becomes
>>
>> quickly create ubuntu-application <project-name>
>> quickly add nolaunchpad
>> quickly add jsonfile  ?
>
> Sounds perfect! (or if you want to limit to ubuntu-application, I would say
>
> ~/.config/quickly/templates/ubuntu-applications/store
>
> :))
>
>>
>> Its a pity that commandsconfig is going. It seems to me an obvious
>> solution to the edit opens too many files problem is a section in
>> commandsconfig something like
>>
>> [edit]
>> # open all files
>> #files=project,projectlib,tests,help,project hooks,template hooks
>> files=project
> As it seems this command is tight to "edit", shouldn't it just an
> overridable parameters in the edit command?
>
> Like:
> ubuntu-applications/edit.py:
>
> from quickly.template import Command
>
> class Edit(Command):
>
> edit_files = ["project", "projectlib", "tests"…]
>
> def run(self, …)
> …
>
>
> Then, as you want to create your own template (as modifying the
> commandsconfig file):
>
> foo-template/edit.py
>
> from quickly.template.ubuntu_application import Edit as UbuntuAppEdit
>
> class Edit(UbuntuAppEdit):
>
> edit_files = ["project"]
>
>
> and that's it! (and this enable to tweak a lot more values for derived
> templates)
>> Have you looked at /dev/shm for speed? A use that may work is the
>> first time quickly is run in a session it copies all templates into
>> /dev/shm and sets an environment flag. All future quickly calls then
>> read /dev/shm, this complicates template writes a little e.g. quickly
>> quickly, which need to rewrite the /dev/shm cache.
> Not a bad idea, I used it a while ago, but for a C++ program. We can
> maybe use that if we notice that reading the metadata in each commands
> file is ETOOMUCH :)
>
>
> Didier
>
>
> _______________________________________________
> Mailing list: https://launchpad.net/~quickly-talk
> Post to     : quickly-talk@xxxxxxxxxxxxxxxxxxx
> Unsubscribe : https://launchpad.net/~quickly-talk
> More help   : https://help.launchpad.net/ListHelp
>


References