Skip to content

Commit

Permalink
Added documentation for #20
Browse files Browse the repository at this point in the history
  • Loading branch information
nemesifier committed Oct 22, 2015
1 parent e5b3f2e commit 30034a6
Showing 1 changed file with 18 additions and 0 deletions.
18 changes: 18 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,24 @@ The following example code will generate an archive with one file in ``/etc/cron
})
o.generate()
New lines must be escaped using ``\n``, or alternatively, the contents can be represented
as an array of lines:

.. code-block:: python
o = OpenWrt({
"files": [
{
"path": "/etc/crontabs/root",
"contents": [
'* * * * * echo "test" > /etc/testfile',
'* * * * * echo "test2" > /etc/testfile2'
]
}
]
})
o.generate()
Templates
---------

Expand Down

0 comments on commit 30034a6

Please sign in to comment.