how to present commandline output

Glyn Davies <[email protected]>
Newsgroups gmane.text.docutils.user
Organization Catalyst IT Limited
Message-ID <[email protected]>
Hi Folks,

I am looking for a a way to include linux commandline output into my
RST/Sphinx documentation.

The issue is with random indentation and line length and while I can
trim the lines it spoils the readability of the output and removing the
indentation completely screws the context. Below is an example of the
kind of thing I would like to include if possible.

Cheers,
Glyn


Name:                                   helloworld-deployment
Namespace:                        default
CreationTimestamp:       Mon, 16 Jul 2018 15:32:11 +1200
Labels:                                 app=helloworld
Annotations:                     deployment.kubernetes.io/revision=2
Selector:                              app=helloworld
Replicas:                              6 desired | 6 updated | 6 total
| 6 available | 0 unavailable
StrategyType:                   RollingUpdate
MinReadySeconds:         20
RollingUpdateStrategy:  1 max unavailable, 1 max surge
Pod Template:
  Labels:  app=helloworld
  Containers:
    helloworld:
    Image:        chelios/helloworld-flask:latest
    Port:         5000/TCP
    Host Port:    0/TCP
    Environment:  <none>
    Mounts:       <none>
  Volumes:        <none>
Conditions:
  Type           Status  Reason
  ----           ------  ------
  Available      True    MinimumReplicasAvailable
  Progressing    True    NewReplicaSetAvailable
OldReplicaSets:  <none>
NewReplicaSet:   helloworld-deployment-5896b9988 (6/6 replicas created)
Events:
  Type    Reason             Age   From                   Message
  ----    ------             ----  ----                   -------
  Normal  ScalingReplicaSet  6m    deployment-controller Scaled up
replica set helloworld-deployment-58d59d965b to 3
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled up
replica set helloworld-deployment-58d59d965b to 6
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled up
replica set helloworld-deployment-5896b9988 to 1
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled down
replica set helloworld-deployment-58d59d965b to 5
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled up
replica set helloworld-deployment-5896b9988 to 2
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled down
replica set helloworld-deployment-58d59d965b to 3
  Normal  ScalingReplicaSet  2m    deployment-controller Scaled up
replica set helloworld-deployment-5896b9988 to 4
  Normal  ScalingReplicaSet  1m    deployment-controller Scaled down
replica set helloworld-deployment-58d59d965b to 1
  Normal  ScalingReplicaSet  1m    deployment-controller Scaled up
replica set helloworld-deployment-5896b9988 to 6
  Normal  ScalingReplicaSet  1m    deployment-controller (combined from
similar events): Scaled down replica set helloworld-deployment-
58d59d965b to 0

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.