Merge 'Add tools/create-desktop-icon.py' into py3

This commit is contained in:
Adam Voss 2017-03-25 14:31:56 -05:00
commit c981d75a29
4 changed files with 37 additions and 5 deletions

View File

@ -1,4 +1,4 @@
.TH GPO "1" "November 2016" "gpodder 3.9.2" "User Commands"
.TH GPO "1" "December 2016" "gpodder 3.9.3" "User Commands"
.SH NAME
gpo \- Text mode interface of gPodder
.SH SYNOPSIS

View File

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.47.4.
.TH GPODDER "1" "November 2016" "gpodder 3.9.2" "User Commands"
.TH GPODDER "1" "December 2016" "gpodder 3.9.3" "User Commands"
.SH NAME
gpodder \- Media aggregator and podcast client
.SH SYNOPSIS
@ -23,3 +23,6 @@ print logging output on the console
.TP
\fB\-s\fR URL, \fB\-\-subscribe\fR=\fI\,URL\/\fR
subscribe to the feed at URL
.TP
\fB\-p\fR PSN, \fB\-\-psn\fR=\fI\,PSN\/\fR
Mac OS X application process number

View File

@ -20,9 +20,9 @@
# This metadata block gets parsed by setup.py - use single quotes only
__tagline__ = 'Media aggregator and podcast client'
__author__ = 'Thomas Perl <thp@gpodder.org>'
__version__ = '3.9.2'
__date__ = '2016-11-30'
__relname__ = 'Canyonero'
__version__ = '3.9.3'
__date__ = '2016-12-22'
__relname__ = 'Whacketts'
__copyright__ = '© 2005-2016 Thomas Perl and the gPodder Team'
__license__ = 'GNU General Public License, version 3 or later'
__url__ = 'http://gpodder.org/'

View File

@ -0,0 +1,29 @@
#!/usr/bin/env python3
# create-desktop-icon.py: Create a Desktop icon
# 2016-12-22 Thomas Perl <m@thp.io>
import os
import sys
BASE = os.path.normpath(os.path.abspath(os.path.join(os.path.dirname(__file__), '..')))
TEMPLATE = """# Created by %(__file__)s
[Desktop Entry]
Name=gPodder (Git)
Exec=%(BASE)s/bin/gpodder
Icon=%(BASE)s/share/icons/hicolor/scalable/apps/gpodder.svg
Terminal=false
Type=Application
""" % locals()
DESTINATION = os.path.expanduser('~/Desktop/gpodder-git.desktop')
if os.path.exists(DESTINATION):
print('%(DESTINATION)s already exists, not overwriting')
sys.exit(1)
with open(DESTINATION, 'w') as fp:
fp.write(TEMPLATE)
os.chmod(DESTINATION, 0o755)
print('Wrote %(DESTINATION)s' % locals())