From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 70D2113832E for ; Thu, 11 Aug 2016 08:09:51 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 3D4F221C2BB; Thu, 11 Aug 2016 08:09:29 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 724F221C2BA for ; Thu, 11 Aug 2016 08:09:23 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 321EE340C98 for ; Thu, 11 Aug 2016 08:09:22 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6C7D8246B for ; Thu, 11 Aug 2016 08:09:18 +0000 (UTC) From: "Patrice Clement" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Patrice Clement" Message-ID: <1470902878.e8d256efab42553bd7165b37e691776842f2c67d.monsieurp@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: app-misc/xmind/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: app-misc/xmind/files/x-xmind.xml app-misc/xmind/files/xmind-thumbnailer app-misc/xmind/files/xmind.schemas X-VCS-Directories: app-misc/xmind/files/ X-VCS-Committer: monsieurp X-VCS-Committer-Name: Patrice Clement X-VCS-Revision: e8d256efab42553bd7165b37e691776842f2c67d X-VCS-Branch: master Date: Thu, 11 Aug 2016 08:09:18 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 2042c574-eb2a-4a39-bf28-875b2af5e386 X-Archives-Hash: c635f75696a89f32ed8adcfef16245d0 commit: e8d256efab42553bd7165b37e691776842f2c67d Author: Michael Mair-Keimberger (asterix) gmail com> AuthorDate: Fri Jul 8 13:19:24 2016 +0000 Commit: Patrice Clement gentoo org> CommitDate: Thu Aug 11 08:07:58 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e8d256ef app-misc/xmind: remove unused files Signed-off-by: Patrice Clement gentoo.org> app-misc/xmind/files/x-xmind.xml | 10 ----- app-misc/xmind/files/xmind-thumbnailer | 78 ---------------------------------- app-misc/xmind/files/xmind.schemas | 30 ------------- 3 files changed, 118 deletions(-) diff --git a/app-misc/xmind/files/x-xmind.xml b/app-misc/xmind/files/x-xmind.xml deleted file mode 100644 index 57292e9..0000000 --- a/app-misc/xmind/files/x-xmind.xml +++ /dev/null @@ -1,10 +0,0 @@ - - - - - XMind Workbook - - - - - diff --git a/app-misc/xmind/files/xmind-thumbnailer b/app-misc/xmind/files/xmind-thumbnailer deleted file mode 100644 index 48eb89b..0000000 --- a/app-misc/xmind/files/xmind-thumbnailer +++ /dev/null @@ -1,78 +0,0 @@ -#!/usr/bin/env python - -import gnomevfs -import os -import sys -import zipfile -from PIL import Image, ImageEnhance - -# Alter these varibles to change thumbnail look -ICON_PATH = "/usr/share/icons/hicolor/32x32/apps/xmind.png" # Change this path to alter icons -ICON_OPACITY = 0.6 #Opacity of the icon (between 0.0 and 1.0) -THUMBNAIL_BACKGROUND_COLOR = "white" # Color of the background - -in_file_path = gnomevfs.get_local_path_from_uri(sys.argv[1]) -out_file_path = sys.argv[2] -path_without_thumbs = os.getenv("HOME")+"/Templates" - -def get_icon(thumbnail_size): - #Load icon - icon = Image.open(ICON_PATH).convert("RGBA") - #Set it's opacity - icon = set_icon_opacity(icon,ICON_OPACITY) - #And set it's position in thumbnail - icon_posx=thumbnail_size[0]-icon.size[0] - icon_posy=thumbnail_size[1]-icon.size[1] - icon_width=thumbnail_size[0] - icon_height=thumbnail_size[1] - return {"image":icon,"position":(icon_posx,icon_posy,icon_width,icon_height)} - -def get_basic_thumbnail(): - #Find out if the file is not in Templates directory - if in_file_path.find(path_without_thumbs)!=0: - try: - #Extract thumbnail from Xmind file and save it - zip=zipfile.ZipFile(in_file_path,mode="r") - picture=zip.read("Thumbnails/thumbnail.jpg") - zip.close() - thumbnail=open(out_file_path,"w") - thumbnail.write(picture) - thumbnail.write("/n") - thumbnail.close() - #Open saved thumbnail - image=Image.open(out_file_path).convert("RGBA") - if image.size[0]>200: - image = image.resize((200,image.size[1]*200/image.size[0])) - if image.size[1]>200: - image = image.resize((image.size[0]*200/image.size[1],200)) - return {"suceeded":True,"image":image,"size":(image.size[0],image.size[1])} - - except: - return {"suceeded":False} - else: - return {"suceeded":False} - -# Nicked from http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/362879 -def set_icon_opacity(icon,opacity): - #Returns an image with reduced opacity. - assert opacity >= 0 and opacity <= 1 - if icon.mode != 'RGBA': - icon = icon.convert('RGBA') - else: - icon = icon.copy() - alpha = icon.split()[3] - alpha = ImageEnhance.Brightness(alpha).enhance(opacity) - icon.putalpha(alpha) - return icon - -thumbnail=get_basic_thumbnail() -if thumbnail["suceeded"]: - background=Image.new("RGB", thumbnail["size"], THUMBNAIL_BACKGROUND_COLOR) - icon=get_icon(thumbnail["size"]) - thumbnail=thumbnail["image"] - # Add thumbnail - background.paste(thumbnail, None, thumbnail) - # Add icon - background.paste(icon["image"],icon["position"],icon["image"]) - # Save thumbnail - background.save(out_file_path,"PNG") diff --git a/app-misc/xmind/files/xmind.schemas b/app-misc/xmind/files/xmind.schemas deleted file mode 100644 index 336b09e..0000000 --- a/app-misc/xmind/files/xmind.schemas +++ /dev/null @@ -1,30 +0,0 @@ - - - - - /schemas/desktop/gnome/thumbnailers/application@x-xmind/enable - /desktop/gnome/thumbnailers/application@x-xmind/enable - xmind-thumb - bool - true - - - - - - - - - /schemas/desktop/gnome/thumbnailers/application@x-xmind/command - /desktop/gnome/thumbnailers/application@x-xmind/command - xmind-thumb - string - /usr/bin/xmind-thumbnailer %u %o - - - - - - - -