文件操作 - css.py
返回文件管理
返回主菜单
删除本文件
文件: /usr/share/bluefish/plugins/zencoding/filters/css.py
编辑文件内容
#!/usr/bin/env python # -*- coding: utf-8 -*- ''' Process CSS properties: replaces snippets, augumented with ! char, with <em>!important</em> suffix @author Sergey Chikuyonok (serge.che@gmail.com) @link http://chikuyonok.ru ''' import re import zencoding re_important = re.compile(r'(.+)\!$') @zencoding.filter('css') def process(tree, profile): for item in tree.children: # CSS properties are always snippets if item.type == 'snippet' and re_important.search(item.real_name): item.start = re.sub(r'(;?)$', ' !important\\1', item.start) process(item, profile) return tree
修改文件时间
将文件时间修改为当前时间的前一年
删除文件