We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8c0ea2a commit 54dcb6cCopy full SHA for 54dcb6c
.moban.d/README.rst
@@ -4,5 +4,5 @@
4
{%endblock%}
5
6
{%block features %}
7
-**{{name}}** does xyz.
+{%include "gantt.rst"%}
8
.moban.d/docs/source/index.rst.jj2
@@ -0,0 +1,67 @@
1
+{%include "header.rst.jj2" %}
2
+
3
+Introduction
+--------------------------------------------------------------------------------
+{%include "constraints.rst.jj2"%}
9
10
+Installation
11
12
13
+{%include "installation.rst.jj2" %}
14
15
16
+Rendering Options
17
18
19
+You can pass the following options to :meth:`pyexcel.Sheet.save_as`.
20
+The same options are applicable to
21
+pyexcel's signature functions, but please remember to add 'dest_' prefix.
22
23
+**embed** If it is set true, the resulting html will only contain a portion
24
+of HTML without the HTML header. And it is expected that you, as the
25
+developer to provide the necessary HTML header in your web page.
26
27
28
+Embed Setup
29
30
31
32
+Please copy the hightlighted lines into the head section of each of your web pages:
33
34
+.. code-block:: html
35
+ :linenos:
36
+ :emphasize-lines: 2-21
37
38
+ <html><head>
39
+ <style>
40
+ body {
41
+ font-family: sans-serif;
42
+ background: #ccc;
43
+ }
44
+ .container {
45
+ width: 80%;
46
+ margin: 0 auto;
47
48
+ .gantt-container {
49
+ overflow: scroll;
50
51
+ /* custom class */
52
+ .gantt .bar-milestone .bar-progress {
53
+ fill: tomato;
54
55
+ </style>
56
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/moment.js/2.18.1/moment.min.js"></script>
57
+ <script src="https://cdnjs.cloudflare.com/ajax/libs/snap.svg/0.5.1/snap.svg-min.js"></script>
58
+ <script src="https://github.com/frappe/gantt/raw/master/dist/frappe-gantt.min.js"></script>
59
+ </head><body>
60
+ <!-- here is the embedded gatt -->
61
+ </body>
62
+ </html>
63
64
65
+Then pass on `embed=True` to pyexcel signature functions. It is as simple as that.
66
67
+{%include "license.rst.jj2" %}
.moban.d/gantt.rst
@@ -0,0 +1,30 @@
+**{{name}}** does {{description}}.
+Here is `a sample csv`_ file::
+ id,name,start,end,progress,dependencies,custom_class
+ Task 1,Writing pyexcel-gantt,2017-07-17,2017-07-18,80,,
+ Task 2,Test pyexcel-gantt,2017-07-19,2017-07-20,10,Task 1,,
+ Task 3,Write up the documentation,2017-07-21,2017-07-22,0,Task 1,,
+ Task 4,Release pyexcel-gantt,2017-07-23,2017-07-23,0,"Task 2, Task 3",,bar-milestone
+.. image:: demo/demo.png
+Here's what you need to do in your program:
+.. code-block:: python
+ import pyexcel as p
+ p.save_as(file_name='tasks.csv',
+ dest_file_name='tasks.gantt.html')
+Alternatively, you can do it with pyexcel's command line interface:
+.. code-block:: bash
+ $ pyexcel transcode tasks.csv tasks.gantt.html
+.. _a sample csv:
.moban.yml
@@ -16,3 +16,5 @@ targets:
- test.bat: test.script.jj2
- .travis.yml: travis.yml.jj2
- .gitignore: gitignore.jj2
+ - "docs/source/index.rst": "docs/source/index.rst.jj2"
+ - "docs/source/conf.py": "docs/source/conf.py.jj2"
MANIFEST.in
@@ -1,3 +1,2 @@
include README.rst
include CHANGELOG.rst
-recursive-include pyexcel_gantt/templates *.html *.js
Makefile
@@ -3,8 +3,8 @@ all: test
test:
bash test.sh
-document:
- bash document.sh
+doc:
+ sphinx-build -b html docs/source docs/build
spelling:
sphinx-build -b spelling docs/source/ docs/build/spelling
README.rst
@@ -35,7 +35,28 @@ a little bit more time in coding, documentation and writing interesting posts.
Introduction
================================================================================
-**pyexcel-gantt** does xyz.
+**pyexcel-gantt** does Draw gantt chart using frappe-gantt module for pyexcel data.
+Here is a sample csv file::
+ dest_file_name='demo.gantt.html',)
demo/demo.png
62 KB
demo/demo.py
@@ -2,4 +2,4 @@
p.save_as(file_name='tasks.csv',
- dest_file_name='s.gantt.html', dest_js_url='frappe-gantt.min.js')
+ dest_file_name='tasks.gantt.html',)
demo/frappe-gantt.min.js
0 commit comments