--- /dev/null
+pkgs/nonfree_*.json
+downloads
--- /dev/null
+winfreed - download a selection of Free Software for MS Windows.
+
+When installing a MS Windows OS I always end up downloading a lot of Free
+Software to make the system actually useful, and sometimes even to replace the
+proprietary ones (e.g. VLC beats WMP a million times in my use case).
+
+winfreed makes this process less painful, offering a selection of Free
+Software you can install on MS Windows.
+
+To add a new package copy template.json to pkgs/<progam>.json and change the
+content.
+
+Proprietary software could be necessary on some systems, and I suggest to add
+using packages with names like "pkgs/nonfree_<command>.json", anyway I am not
+going to distribute or publicize those, so don't bother proposing nonfree
+packages.
+
+Take care,
+ Antonio Ospite
+ http://ao2.it
--- /dev/null
+{
+ "name": "7-Zip",
+ "homepage": "http://www.7-zip.org/",
+ "description": "7-Zip is a file archiver with a high compression ratio.",
+ "URL": "http://downloads.sourceforge.net/sevenzip/7z920.exe"
+}
--- /dev/null
+{
+ "name": "CDBurnerXP",
+ "homepage": "http://cdburnerxp.se/",
+ "description": "CDBurnerXP is a free application to burn CDs and DVDs, including Blu-Ray and HD-DVDs.",
+ "URL": "http://download.cdburnerxp.se/msi/cdbxp_setup_4.3.8.2631.msi"
+}
--- /dev/null
+{
+ "name": "Evince",
+ "homepage": "http://projects.gnome.org/evince/",
+ "description": "Evince is a document viewer for multiple document formats.",
+ "URL": "http://ftp.gnome.org/pub/GNOME/binaries/win32/evince/2.32/evince-2.32.0-144.1.msi"
+}
--- /dev/null
+{
+ "name": "GIMP",
+ "homepage": "http://www.gimp.org/",
+ "description": "GIMP is the GNU Image Manipulation Program. It is a freely distributed piece of software for such tasks as photo retouching, image composition and image authoring.",
+ "URL": "http://downloads.sourceforge.net/gimp-win/gimp-2.6.11-i686-setup-1.exe?use_mirror="
+}
--- /dev/null
+{
+ "name": "Inkscape",
+ "homepage": "http://inkscape.org/",
+ "description": "An Open Source vector graphics editor, with capabilities similar to Illustrator, CorelDraw, or Xara X, using the W3C standard Scalable Vector Graphics (SVG) file format.",
+ "URL": "http://sourceforge.net/projects/inkscape/files/inkscape/0.48.2/Inkscape-0.48.2-1-win32.exe/download"
+}
--- /dev/null
+{
+ "name": "LibreOffice",
+ "homepage": "http://www.libreoffice.org/",
+ "description": "LibreOffice is the power-packed free, libre and open source personal productivity suite for Windows, Macintosh and GNU/Linux.",
+ "URL": "http://download.documentfoundation.org/libreoffice/stable/3.4.3/win/x86/LibO_3.4.3_Win_x86_install_multi.exe"
+}
--- /dev/null
+{
+ "name": "LibreOffice Help Pack",
+ "homepage": "http://www.libreoffice.org/",
+ "description": "Localized Help Pack for LibreOffice",
+ "URL": "http://download.documentfoundation.org/libreoffice/stable/3.4.3/win/x86/LibO_3.4.3_Win_x86_helppack_%s.exe"
+}
--- /dev/null
+{
+ "name": "Mozilla Firefox",
+ "homepage": "http://www.mozilla.org/firefox/",
+ "description": "The Firefox browser is created by Mozilla, a non-profit organization whose mission is to promote openness, innovation and opportunity on the Web.",
+ "URL": "http://download.mozilla.org/?product=firefox-6.0.2&os=win&lang=%s"
+}
--- /dev/null
+{
+ "name": "Mozilla Thunderbird",
+ "homepage": "https://www.mozilla.org/thunderbird/",
+ "description": "Thunderbird is a free email application that's easy to set up and customize - and it's loaded with great features!",
+ "URL": "http://download.mozilla.org/?product=thunderbird-3.1.14&os=win&lang=%s"
+}
--- /dev/null
+{
+ "name": "Pidgin",
+ "homepage": "http://pidgin.im/",
+ "description": "Pidgin is an easy to use and free chat client used by millions. Connect to AIM, MSN, Yahoo, and more chat networks all at once.",
+ "URL": "http://sourceforge.net/projects/pidgin/files/Pidgin/2.10.0/pidgin-2.10.0.exe"
+}
--- /dev/null
+{
+ "name": "VLC Media Player",
+ "homepage": "http://www.videolan.org/",
+ "description": "VLC is a free and open source cross-platform multimedia player and framework that plays most multimedia files as well as DVD, Audio CD, VCD, and various streaming protocols.",
+ "URL": "http://sourceforge.net/projects/vlc/files/1.1.11/win32/vlc-1.1.11-win32.exe/download"
+}
--- /dev/null
+{
+ "name": "XP Antispy",
+ "homepage": "http://xp-antispy.org/",
+ "description": "The xp-AntiSpy is a little utility that lets you disable some built-in update and authentication 'features' in WindowsXP.",
+ "URL": "http://xp-antispy.org/index.php/en/download?func=download&itemid=4&mirrorid=1"
+}
--- /dev/null
+{
+ "name": "Example program",
+ "homepage": "http://example.com/",
+ "description": "Example program doesn't do anything useful that we know of.",
+
+ /* A "%s" in the URL will be replaced with a language code,
+ * this can be useful for localized downloads.
+ */
+ "URL": "http://example.com/program-0.1-%s.zip"
+}
--- /dev/null
+WINFREED(1)
+===========
+:doctype: manpage
+
+
+NAME
+----
+winfreed - download a selection of Free Software for MS Windows
+
+
+SYNOPSIS
+--------
+*winfreed* <'COMMAND'>
+
+
+DESCRIPTION
+-----------
+The winfreed(1) command allows to download a selection of Free Software you
+can install on MS Windows.
+
+
+COMMANDS
+--------
+
+*show*::
+ Show info about all the available packages
+
+*download*::
+ Download all the packages
+
+
+TODO Add command arguments like in "download <package>"
+
+
+EXIT STATUS
+-----------
+*0*::
+ Success
+
+*1*::
+ Failure (syntax or usage error; configuration error; document
+ processing failure; unexpected error).
+
+
+AUTHOR
+------
+WinFreed was originally written by Antonio Ospite.
+
+
+RESOURCES
+---------
+Main web site: <http://git.ao2.it/winfreed/>
+
+
+COPYING
+-------
+Copyright \(C) 2011 Antonio Ospite. Free use of this software is
+granted under the terms of the GNU General Public License v3 (GPLv3).
--- /dev/null
+#!/usr/bin/env python
+#
+# winfreed - download a selection of Free Software for MS Windows.
+#
+# Copyright (C) 2011 Antonio Ospite <ospite@studenti.unina.it>
+#
+# This program is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+import os
+import sys
+import glob
+import json
+import urllib2
+from progressbar import Bar, ETA, FileTransferSpeed, Percentage, ProgressBar
+
+# TODO make OUTPUT_DIR and LANGCODE configurable from command line
+OUTPUT_DIR = 'downloads'
+LANGCODE = 'en-US'
+
+# TODO PKG_DIR in $(datadir) or something like that for python projects
+PKG_DIR = 'pkgs'
+CHUNK_SIZE = 8192
+
+def process_all(path, cb):
+ listing = glob.glob(os.path.join(path, '*.json'))
+ for json_file in listing:
+ with open(json_file, mode='r') as f:
+ entry = json.load(f)
+ basename = os.path.basename(json_file)
+ package_name = os.path.splitext(basename)[0]
+ entry['package'] = package_name
+ cb(entry)
+ f.close()
+
+def show(entry):
+ print 'Package: ', entry['package']
+ print 'Program: ', entry['name']
+ print 'Homepage: ', entry['homepage']
+ print
+
+def download(entry):
+ # the "%s" in URLs are meant to be replaced with LANGCODE
+ try:
+ url = entry['URL'] % LANGCODE
+ except:
+ url = entry['URL']
+ pass
+
+ response = urllib2.urlopen(url)
+ filename = urllib2.unquote(os.path.basename(response.geturl()))
+ destfile = os.path.join(OUTPUT_DIR, filename)
+ if os.path.exists(destfile):
+ sys.stderr.write("Warning: %s exists!\n" % destfile)
+ return
+ outfile = open(destfile, mode='w')
+
+ total_size = response.info().getheader('Content-Length').strip()
+ total_size = int(total_size)
+
+ widgets = [entry['name'], ' ', Percentage(), ' ', Bar(marker='=', left='[', right=']'),
+ ' ', ETA(), ' ', FileTransferSpeed()]
+ pbar = ProgressBar(widgets=widgets, maxval=total_size).start()
+
+ bytes_so_far = 0
+ while 1:
+ chunk = response.read(CHUNK_SIZE)
+ if not chunk:
+ break
+
+ bytes_so_far += len(chunk)
+ outfile.write(chunk)
+ pbar.update(bytes_so_far)
+ pbar.finish()
+
+def show_all():
+ process_all(PKG_DIR, show)
+
+def download_all():
+ if os.path.exists(OUTPUT_DIR) == False:
+ os.mkdir(OUTPUT_DIR, 0755)
+
+ process_all(PKG_DIR, download)
+
+def usage():
+ usage = "winfreed - download a selection of Free Software for MS Windows.\n\n"
+ usage += "usage: %s <COMMAND>\n\n" % sys.argv[0]
+ usage += "COMMANDS:\n"
+ usage += "\tshow Show info about all the available packages\n"
+ usage += "\tdownload Download all the packages\n"
+ print usage
+
+if __name__ == "__main__":
+
+ if len(sys.argv) < 2:
+ usage()
+ sys.exit(1)
+
+ if sys.argv[1] == 'download':
+ download_all()
+ elif sys.argv[1] == 'show':
+ show_all()
+ else:
+ usage()
+ sys.exit(1)
+
+ sys.exit(0)