duckduckgo / p5-app-duckpan

DuckDuckHack OpenSource Development Application
http://metacpan.org/module/App::DuckPAN
Other
53 stars 47 forks source link

Duckpan command rm #179

Closed killerfish closed 2 years ago

killerfish commented 9 years ago

@moollaza @mwmiller guys what do you think about having a command like duckpan rm instant_answer_name, i know its not going to be used that extensively, but in future, it might? Also since we have a new command, a rm command makes sense, no?

mwmiller commented 9 years ago

@killerfish I think you're right that it's pretty niche, but probably also useful. I sometimes delete an IA package (but not all of the supporting files) to see the effect on trigger-space, but I bring them back fairly quickly from git. We haven't had significant culling of IAs in my experience.

A perhaps more immediately useful project would be a "mv/rename" command which lets you play around with the name space. This has come up with the Spice Transit area. I'm not entirely sure it will see much use, either. It's also much more ambitious, so I wouldn't want to volunteer your time.

killerfish commented 9 years ago

My thought behind it was the assumption that in the future, there are going to be a lot of source collisions (spice), or goodies porting to spice, so perhaps the removal of ia's might increase. What details would mv/rename entail, essentially? For me the more diverse the work, the more fun its is :grin:

moollaza commented 9 years ago

@killerfish I agree with @mwmiller 's thoughts. I suspect any functionality of this sort would not be used too often, but would certainly be helpful when needed ;)

a mv command would need to mimic some features of new which determines the variations of the name and folder hierarchy (more difficult for spice) based on the Perl package name and then it would need to modify and git mv files accordingly.

@russellholt had expressed that he would like to be able to copy a given IA to build something similar. That would basically be a combination of mv and new in that you'd need to take one IA, grab and copy its files, then replace the name where necessary.

killerfish commented 9 years ago

i love the idea of replicating an IA, for a new one, though i think we can add an option to new, rather than having a mv cmd. Can you give me some use case for mv, since idk i havent come across such a case where i needed to use it (i just create with new, and keep the name i like, and the existing names, well they are already 'accepted'?)

mwmiller commented 9 years ago

Can you give me some use case for mv

@mattr555 created a bunch of IAs which help people understand public transit schedules on the east cost of the US. After a while, it became clear that they share a bunch of similarities and should be in a unified namespace. Moving them around was a hassle. duckpan mv would make it simpler.

There is still an argument as to whether this is a frequent enough occurrence to need a command to simplify.

killerfish commented 9 years ago

got it, IMO i'd group that with the rm command in terms of infrequent use, so perhaps we can revisit it later. But i think for now i can add the replicate option to new command.