diff --git a/icons/book.svg b/icons/book.svg
index 51bad47..a75a52a 100644
--- a/icons/book.svg
+++ b/icons/book.svg
@@ -1,83 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/calendar.svg b/icons/calendar.svg
index 24ffe7f..2c7c811 100644
--- a/icons/calendar.svg
+++ b/icons/calendar.svg
@@ -1,82 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/categories.svg b/icons/categories.svg
index a5ed124..9d09372 100644
--- a/icons/categories.svg
+++ b/icons/categories.svg
@@ -1,80 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/forms.svg b/icons/forms.svg
index 84d51ef..d4f6843 100644
--- a/icons/forms.svg
+++ b/icons/forms.svg
@@ -1,90 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/home.svg b/icons/home.svg
index 89d0ab4..0e6ce4a 100644
--- a/icons/home.svg
+++ b/icons/home.svg
@@ -1,144 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/mail.svg b/icons/mail.svg
index 8363772..560e7f5 100644
--- a/icons/mail.svg
+++ b/icons/mail.svg
@@ -1,79 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/management.svg b/icons/management.svg
index 107e240..fa47235 100644
--- a/icons/management.svg
+++ b/icons/management.svg
@@ -1,93 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/add.svg b/icons/old-set/add.svg
similarity index 100%
rename from icons/add.svg
rename to icons/old-set/add.svg
diff --git a/icons/announces.svg b/icons/old-set/announces.svg
similarity index 100%
rename from icons/announces.svg
rename to icons/old-set/announces.svg
diff --git a/icons/clock.svg b/icons/old-set/clock.svg
similarity index 100%
rename from icons/clock.svg
rename to icons/old-set/clock.svg
diff --git a/icons/counter.svg b/icons/old-set/counter.svg
similarity index 100%
rename from icons/counter.svg
rename to icons/old-set/counter.svg
diff --git a/icons/facturier.svg b/icons/old-set/facturier.svg
similarity index 100%
rename from icons/facturier.svg
rename to icons/old-set/facturier.svg
diff --git a/icons/gis.svg b/icons/old-set/gis.svg
similarity index 100%
rename from icons/gis.svg
rename to icons/old-set/gis.svg
diff --git a/icons/grid.svg b/icons/old-set/grid.svg
similarity index 100%
rename from icons/grid.svg
rename to icons/old-set/grid.svg
diff --git a/icons/password.svg b/icons/old-set/password.svg
similarity index 100%
rename from icons/password.svg
rename to icons/old-set/password.svg
diff --git a/icons/phone.svg b/icons/old-set/phone.svg
similarity index 100%
rename from icons/phone.svg
rename to icons/old-set/phone.svg
diff --git a/icons/porte-doc.svg b/icons/old-set/porte-doc.svg
similarity index 100%
rename from icons/porte-doc.svg
rename to icons/old-set/porte-doc.svg
diff --git a/icons/security.svg b/icons/old-set/security.svg
similarity index 100%
rename from icons/security.svg
rename to icons/old-set/security.svg
diff --git a/icons/submission.svg b/icons/old-set/submission.svg
similarity index 100%
rename from icons/submission.svg
rename to icons/old-set/submission.svg
diff --git a/icons/texts.svg b/icons/old-set/texts.svg
similarity index 100%
rename from icons/texts.svg
rename to icons/old-set/texts.svg
diff --git a/icons/theme.svg b/icons/old-set/theme.svg
similarity index 100%
rename from icons/theme.svg
rename to icons/old-set/theme.svg
diff --git a/icons/organizational-units.svg b/icons/organizational-units.svg
index 866b998..9b4af47 100644
--- a/icons/organizational-units.svg
+++ b/icons/organizational-units.svg
@@ -1,99 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/passerelle.svg b/icons/passerelle.svg
index a86f365..4f5931b 100644
--- a/icons/passerelle.svg
+++ b/icons/passerelle.svg
@@ -1,113 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/portal-agent.svg b/icons/portal-agent.svg
index ec3328a..ada9a2a 100644
--- a/icons/portal-agent.svg
+++ b/icons/portal-agent.svg
@@ -1,175 +1 @@
-
-
-
-
+
diff --git a/icons/portal.svg b/icons/portal.svg
index ec3328a..6bb8558 100644
--- a/icons/portal.svg
+++ b/icons/portal.svg
@@ -1,175 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/roles.svg b/icons/roles.svg
index 84f72fe..8be381a 100644
--- a/icons/roles.svg
+++ b/icons/roles.svg
@@ -1,111 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/services.svg b/icons/services.svg
index 627bdf1..cfc2db0 100644
--- a/icons/services.svg
+++ b/icons/services.svg
@@ -1,86 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/settings.svg b/icons/settings.svg
index 78d54d4..b5c18c0 100644
--- a/icons/settings.svg
+++ b/icons/settings.svg
@@ -1,85 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/statistics.svg b/icons/statistics.svg
index 10f3355..1943488 100644
--- a/icons/statistics.svg
+++ b/icons/statistics.svg
@@ -1,97 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/system.svg b/icons/system.svg
index 9d7fcb7..1783e66 100644
--- a/icons/system.svg
+++ b/icons/system.svg
@@ -1,67 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/users.svg b/icons/users.svg
index 5595dae..fbbc5eb 100644
--- a/icons/users.svg
+++ b/icons/users.svg
@@ -1,92 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/icons/workflows.svg b/icons/workflows.svg
index 7cd2d4e..217d6ef 100644
--- a/icons/workflows.svg
+++ b/icons/workflows.svg
@@ -1,86 +1 @@
-
-
-
-
+
\ No newline at end of file
diff --git a/setup.py b/setup.py
index e6f3850..3bc45af 100644
--- a/setup.py
+++ b/setup.py
@@ -132,18 +132,14 @@ class build_icons(Command):
if not os.path.exists(destpath):
os.mkdir(destpath)
variants = {
- 'small': {'colour': 'e7e7e7', 'width': '20',
- 'css': 'ul#sidepage-menu li a.icon-%(name)s { background-image: url(icons/%(filename)s); }'},
+ 'small': {'colour': 'e7e7e7', 'width': '20'},
'small.white': {'colour': 'ffffff', 'width': '20'},
'small.4e7ee2': {'colour': '4e7ee2', 'width': '20'},
'small.ff375e': {'colour': 'ff375e', 'width': '20'},
'small.6f2b92': {'colour': '6f2b92', 'width': '20'},
- 'large': {'colour': 'e7e7e7', 'width': '80',
- 'css': 'ul.apps li.icon-%(name)s a { background-image: url(icons/%(filename)s); }'},
- 'large-hover': {'colour': 'bebebe', 'width': '80',
- 'css': 'ul.apps li.icon-%(name)s a:hover { background-image: url(icons/%(filename)s); }'},
+ 'large': {'colour': 'e7e7e7', 'width': '80'},
+ 'large-hover': {'colour': 'bebebe', 'width': '80'},
}
- css_rules = []
for basepath, dirnames, filenames in os.walk('icons'):
for filename in filenames:
basename = os.path.splitext(filename)[0]
@@ -152,31 +148,26 @@ class build_icons(Command):
destname = os.path.join(destpath, dest_filename)
self.generate(os.path.join(basepath, filename), destname,
**variants.get(variant))
- css = variants.get(variant).get('css')
- if css:
- css_rules.append(css % {'name': basename, 'filename': dest_filename})
- print '\n'.join(sorted(css_rules))
def generate(self, src, dest, colour, width, **kwargs):
- if os.path.exists(dest) and os.stat(dest).st_mtime >= os.stat(src).st_mtime:
+ if False and os.path.exists(dest) and os.stat(dest).st_mtime >= os.stat(src).st_mtime:
return
# default values
from PIL import Image
from PIL import PngImagePlugin
- author = 'GNOME Project'
license = 'Creative Commons Attribution-Share Alike 3.0'
+ if 'old-set' in src:
+ author = 'GNOME Project'
+ tree = ET.fromstring(open(src).read().replace('#000000', '#%s' % colour))
+ for elem in tree.findall('*'):
+ if not elem.attrib.get('style'):
+ elem.attrib['style'] = 'fill:#%s' % colour
+ else:
+ author = "J'articule"
+ tree = ET.fromstring(open(src).read())
+ for elem in tree.findall('{http://www.w3.org/2000/svg}defs/{http://www.w3.org/2000/svg}style'):
+ elem.text = elem.text.replace('242d3c', colour)
- tree = ET.fromstring(open(src).read().replace('#000000', '#%s' % colour))
- for elem in tree.findall('*'):
- if not elem.attrib.get('style'):
- elem.attrib['style'] = 'fill:#%s' % colour
- for elem in tree.getchildren():
- if elem.tag == '{http://www.w3.org/2000/svg}text' and elem.text.startswith('Created by'):
- author = elem.text[len('Created by')+1:]
- tree.remove(elem)
- for elem in tree.getchildren():
- if elem.tag == '{http://www.w3.org/2000/svg}text' and 'Noun Project' in elem.text:
- tree.remove(elem)
f = tempfile.NamedTemporaryFile(suffix='.svg', delete=False)
f.write(ET.tostring(tree))
f.close()