网站本地副本的sitemap.xml生成器
bdt_sitemap的Python项目详细描述
可以用作库,也可以在命令行中独立运行。
支持两个参数:
Domain: In url form, the domain name for which you’re generating sitemaps. Subdomains are also supported. Each domain and subdomain must be run separately. ‘domain.com’ and ‘subdomain.domain.ru’ are both valid.
LocalPath: Path to the website directory as stored locally. Platform agnostic.
警告:如果没有传递localpath参数,则假定为当前目录!你会被问到这是否是一个错误,并有机会退出,但仅此而已!如果你不小心的话,你会发现sitemap.xmls到处都是!
用法:
bdt_sitemap mysite.com ~/sites/sitefolder
bdt_sitemap tadeuszow.com /home/xenmen/sites/Tadeuszow-site/main
bdt_sitemap daniel.tadeuszow.com C:UsersXenmensitesTadeuszow-sitedaniel
在WIP中用作库,目前创建一个名为emod_time的全局变量,并定义三个函数:
init_emod_time()
compare_emod_time(newtime)
create_sitemap(domain, site_dir, ignorelist=[])
建议在版本1.0之前使用独立的bdt_站点地图,而不是作为库使用