## Recommended packages for site-info
- [viasite/drupal-scripts](https://github.com/viasite/drupal-scripts)
- [viasite/server-scripts](https://github.com/viasite/server-scripts)
## Install
```
pip install site_discovery
```
# get-sites
Get sites from localhost and execute site-info for each site.
## Configuration
Config file should placed into `/etc/site-info.yml`. See [site-info.example.yml](site-info.example.yml).
``` yaml
tests:
- name: root_path # name of test, using as json name and xlsx column name
comment: Site root # using as comment for cell in xlsx
command: pwd # shell command for get test result
type: string # result type (integer|string|time)
groups: main # string or array of groups
```
I'm using group `main` for must-have tests.
## Usage
### Default sites list, output to tab separated list
```
get-sites
```
### Generate all tests results into xlsx with delay for avoid server overload
```
get-sites --format xlsx --xlsx-path /tmp/sites-info.xlsx --group all --delay 10
```
## Options
- `--format=[console|json|xlsx|line]` - output format
- `--quiet` - don't output progress
- `--color` - colorize line output
- `--root-path-excluded=ROOT_PATHS_EXCLUDED` - exclude some paths, default: [/usr/share/nginx/html, /var/www/html, /var/www/example.com]
- `--excluded-file=EXCLUDED_FILE` - don't scan site with file in site root, default: `.excluded`
- `--cached` - Only attach site-info, don't generate
- `--cache-time=TIME` - Cache time, when `--cached` not set
- `--delay=DELAY` - Delay between site-info calls, seconds, default: 0
- `--lock-file-path=LOCK_FILE_PATH` - Path to lockfile, default: `/tmp/sites-info.lock`
- `--lock-file-max-age=LOCK_FILE_AGE` - Max age of lockfile (since last modification), seconds, default: 86400
- `--results-dir=RESULTS_DIR` - Path to directory with site-info results, default: `/var/log/site-info`
- `--force` - Ignore lockfile
- `--group=GROUPS` - Groups of site-info tests, default: main. --group all assumes execution of all tests.
- `--limit=LIMIT` - Limit of sites
- `--sites-json=SITES_JSON` - Get sites results from json
- `--xlsx-path=XLSX_PATH` - xlsx destination path
# site-info
Get info for single site.
# server-info
Get info for server.
没有合适的资源?快使用搜索试试~ 我知道了~
资源推荐
资源详情
资源评论
收起资源包目录
site-discovery-0.1.7.tar.gz (24个子文件)
site-discovery-0.1.7
PKG-INFO 743B
site_discovery
server_info.py 4KB
__init__.py 0B
get_sites.py 19KB
site_info.py 11KB
server-info.example.yml 179B
site_discovery.egg-info
PKG-INFO 743B
requires.txt 70B
not-zip-safe 1B
SOURCES.txt 575B
entry_points.txt 149B
top_level.txt 15B
dependency_links.txt 1B
pbr.json 47B
LICENSE 1KB
CONTRIBUTING.md 597B
setup.cfg 967B
requirements.txt 70B
site-info.example.yml 8KB
setup.py 80B
CHANGELOG.md 3KB
README.md 2KB
scripts
init.sh 218B
upload.sh 338B
共 24 条
- 1
资源评论
挣扎的蓝藻
- 粉丝: 12w+
- 资源: 15万+
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功