Skip to main content

Best Gantt chart in Python

Project description

netkiller-gantt

Best project gantt charts in Python

甘特图

Python Gantt 工具

安装

brew install cairo
brew install pkg-config
pip3 install pycairo -i https://pypi.tuna.tsinghua.edu.cn/simple

pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple
pip install netkiller-gantt -i https://pypi.tuna.tsinghua.edu.cn/simple

命令帮助

neo@MacBook-Pro-M2 ~> gantt -h

Usage: gantt [options] message

Options:
  -h, --help            show this help message and exit
  -l /path/to/gantt.json, --load=/path/to/gantt.json
                        load data from file.
  -s /path/to/gantt.svg, --save=/path/to/gantt.svg
                        save file
  --stdin               cat gantt.json | gantt -s file.svg
  -d, --debug           debug mode

从标准输出载入json数据生成甘特图

neo@MacBook-Pro-M2 ~> cat gantt.json | gantt --stdin
/Users/neo/workspace/GitHub/devops
Usage: gantt [options] message

Options:
  -h, --help            show this help message and exit
  -l /path/to/gantt.json, --load=/path/to/gantt.json
                        load data from file.
  -s /path/to/gantt.svg, --save=/path/to/gantt.svg
                        save file
  --stdin               cat gantt.json | gantt -s file.svg
  -d, --debug           debug mode

从 CSV 文件生成

select id, parent, name,estStarted,deadline,assignedTo  from zt_task 
INTO OUTFILE '/tmp/project.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ,
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
rm -rf /tmp/project.csv
cat <<EOF | mysql -h127.0.0.1 -uroot -p123456 zentao
SELECT 'id','name','start','finish', 'resource', 'parent'
UNION
select id, name,estStarted,deadline,assignedTo, parent  from zt_task
INTO OUTFILE '/tmp/project.csv'
FIELDS ENCLOSED BY '"'
TERMINATED BY ','
ESCAPED BY '"'
LINES TERMINATED BY '\r\n';
EOF
select id, name,estStarted as start, deadline as finish,  assignedTo as resource, parent from zt_task where `group` = 4 order by id desc limit 100;
select id, name,estStarted as start, deadline as finish,  assignedTo as resource, parent from zt_task where assignedTo in ('chenjingfeng','ligongfa','yuanjianfeng','liqiang') order by id desc limit 100;

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

netkiller-gantt-0.0.1.tar.gz (39.6 kB view details)

Uploaded Source

File details

Details for the file netkiller-gantt-0.0.1.tar.gz.

File metadata

  • Download URL: netkiller-gantt-0.0.1.tar.gz
  • Upload date:
  • Size: 39.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.1 CPython/3.10.5

File hashes

Hashes for netkiller-gantt-0.0.1.tar.gz
Algorithm Hash digest
SHA256 be9faa534fe2b1999037f529e0527c48de19a2077dd59687d5e5305c35e188e2
MD5 c0145893f40c655055fd858309ce3acb
BLAKE2b-256 bf2db1b64e267958e9ddbfccd3a54a7c24593d7a1b3a28395e52cc2d7703cc02

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page