pydoit / doit

CLI task management & automation tool
http://pydoit.org
MIT License
1.85k stars 175 forks source link

`doit` gallery #208

Open vlcinsky opened 6 years ago

vlcinsky commented 6 years ago

The idea: users inspired by examples of doit usage

Link to experimental gallery: https://github.com/pydoit/doit-gallery/issues

doit users may inspire each other by sharing their use of doit. Even plain output of $ doit list or $doit list --all may reveal to others unexpected but valuable way of using doit.

Proposed content

Purpose annotation

Short summary of intended use and purpose of given doit application. It shall be very short. It might be handy to use user story format as:

As a user of my personal notebook I want to be able setting notebook connectivity (wifi, mobile internet) up and down from command line as command line is my most favourite UI.

Short or long list of doit tasks

Apart from title, which would described the purpose of given doit usage, users would provide output of doit list and doit list --all.

$ doit list
available   List all available configured connections.
status      List currently active network connections.
up          Set given connection up (specific connection name required).
down        Set given connection down.
radio       Report status of network radio devices
radioon     Set network radio device on
radiooff    Set network radio device off.

To make it more educative and to allow hiding sensitive information from it, it would be allowed to edit the order of commands and to modify (slightly) the text shown.

The same applies to $ doit list --all if it adds any value:

available       List all available configured connections.
status          List currently active network connections.
up              Set given connection up (specific connection name required).
up:VPN
up:home
up:office
up:hotspot
up:train
up:mobile
down            Set given connection down.
down:VPN
down:home
down:office
down:hotspot
down:train
down:mobile
radio           Report status of network radio devices
radioon         Set network radio device on
radioon:wifi
radioon:wwan
radiooff        Set network radio device off.
radiooff:wifi
radiooff:wwan

Example of real usage

Describe more details about usage. Whatever gives the reader better idea about it. No need to be exhaustive, it shall just inspire, not instruct how to do it.

E.g.:

When I travel by train and want to connect to (already preconfigured) train wifi:

$ doit up:train
.  up:train
Connection succesfully activated (Active D-Bus path: /org/freedesktop/NetworkManager/ActiveConnection/1)

When in aeroplane, before take-off I switch all radio network devices:

$ doit radiooff
.  radiooff:wifi
.  radiooff:wwan

When on the road and in need of mobile connectivity provided by LTE modem within my notebook:

$ doit up:tm
.  up:mobile
Connection succesfully activated (Active D-Bus path: /org/freedesktop/NetworkManager/ActiveConnection/3)

doit added value

What are the main advantages of using given doit based solution.

E.g.: Set of nmcli calls (e.g. $ nmcli c up mobile) packed into well named doit tasks, which are easy to call and easy to list when one needs to remind how they are named.

Meta (versions etc.)

Provide information about environment, where it is used, e.g.:

Users

Describe the type of users, their number etc.

commands and packages used

Just list what command line tools are expected to be installed and what python packages installed.

shell commands

python packages

dodo file

Did you use dodo.py, used another file name and pointed to it via command line switch or this stuff is embedded into another application?

Is dodo file standalone, imports other python packages of your own or other python packages

dodo file dependencies:

Possibly describe size of the file (number of lines of dodo.py)

Is the code available somewhere? (either url or "no", do not promise publishing as it generates noise as others would ask you to share it really)

e.g. single dodo file dodo.py, 82 lines. Not shared.

doit technologies used

Insight into what doit features were used. No need to show off the author knows a lot and uses a lot, in fact, one can show off, things can be done real simple.

Any other interesting stuff

Provide any more details, which might be interesting.

Collecting and publishing gallery items

Gallery shall not generate too much extra burden and obligations. Expectations are:

I was considering following options:

In fact, there are two roles: to collect and to publish. In some cases they can be merged.

To me the optimal solution seems github issue tracker in dedicated repository.

Dedicated Github repository doit-gallery

Here I detail my proposal for using Github repo:

Set up Github repository pydoit/doit-gallery.

Create README.rst there, explaining code of conduct:

Roadmap

Fund with Polar

vlcinsky commented 6 years ago

Gallery repo created: https://github.com/pydoit/doit-gallery

Filed first two issues.

Kwpolska commented 6 years ago

Issues look like a bad place for this. Perhaps a wiki? Even better, a wiki on this repository instead of a new one?

vlcinsky commented 6 years ago

@Kwpolska you are right, issues have many disadvantages:

But issues have advantages too:

I am in search of a solution, allowing users to share their way of using doit as simply as possible. Plus if it does not generate too much burden for maintenance, then it is good.

With issues everyone knows, how to add a new one, we (already) have there a template to follow.

Regarding wiki, I have mixed feeling about it:

Experimenting with gallery via issue tracker

My plan is to create few entries and see, how it works with issues.

I already learned small lessons:

Experimenting with gallery via wiki

If you are more familiar with using wiki, I would propose you to try creating few pages with gallery entries in it. Best in the doit-gallery repository (this may be changed after we complete experiments). You may find out a style, which will work better then issues and good solutions are always welcome.

vlcinsky commented 6 years ago

@Kwpolska btw I thing the proper issue tracker for the gallery is here (continuing with this ticket).