Browse Source

Convert README to reStructuredText

It's the preferred format for Python, after all.
Clara Hobbs 7 years ago
parent
commit
fdc94a244c
1 changed files with 28 additions and 15 deletions
  1. 28
    15
      README.rst

README.md → README.rst View File

1
-# pd-buddy-python
1
+pd-buddy-python
2
+===============
2
 
3
 
3
-Python library for working with the PD Buddy Sink Serial Console Configuration
4
-Interface
4
+Python library for working with the PD Buddy Sink Serial Console
5
+Configuration Interface
5
 
6
 
6
-## Features
7
+Features
8
+--------
7
 
9
 
8
-* Provides a Pythonic interface to the PD Buddy Sink shell commands
9
-* Configuration is represented as a SinkConfig object
10
-* SinkConfig objects can be manipulated locally and written to the device with
11
-  one method call
10
+-  Provides a Pythonic interface to the PD Buddy Sink shell commands
11
+-  Configuration is represented as a SinkConfig object
12
+-  SinkConfig objects can be manipulated locally and written to the
13
+   device with one method call
12
 
14
 
13
-## Examples
15
+Examples
16
+--------
14
 
17
 
15
-### Open the first PD Buddy Sink device and read its configuration
18
+Open the first PD Buddy Sink device and read its configuration
19
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
20
+
21
+::
16
 
22
 
17
     >>> import pdbuddy
23
     >>> import pdbuddy
18
     >>> pdbs = pdbuddy.Sink(list(pdbuddy.Sink.get_devices())[0])
24
     >>> pdbs = pdbuddy.Sink(list(pdbuddy.Sink.get_devices())[0])
24
     v: 5.00 V
30
     v: 5.00 V
25
     i: 3.00 A
31
     i: 3.00 A
26
 
32
 
27
-### Locally manipulate a SinkConfig object
33
+Locally manipulate a SinkConfig object
34
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
35
+
36
+::
28
 
37
 
29
     >>> cfg = pdbs.get_cfg()
38
     >>> cfg = pdbs.get_cfg()
30
     >>> cfg.v = 20000
39
     >>> cfg.v = 20000
33
     >>> cfg
42
     >>> cfg
34
     SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)
43
     SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)
35
 
44
 
36
-### Write the SinkConfig object to flash
45
+Write the SinkConfig object to flash
46
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
47
+
48
+::
37
 
49
 
38
     >>> pdbs.set_tmpcfg(cfg)
50
     >>> pdbs.set_tmpcfg(cfg)
39
     >>> pdbs.write()
51
     >>> pdbs.write()
40
     >>> pdbs.get_cfg()
52
     >>> pdbs.get_cfg()
41
     SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)
53
     SinkConfig(status=SinkStatus.VALID, flags=SinkFlags.GIVEBACK, v=20000, i=2250)
42
 
54
 
43
-## Requirements
55
+Requirements
56
+------------
44
 
57
 
45
-* Python >= 3.6
46
-* pySerial >= 3.0
58
+-  Python >= 3.6
59
+-  pySerial >= 3.0

Loading…
Cancel
Save