Travis Shirk avatar Travis Shirk committed 8e43e3c

deploy, pavement, etc.

Comments (0)

Files changed (5)

 *.pyc
 *.swp
 build/*
-doc/.build/*
+docs/.build/*
 .coverage
 src/eyed3/info.py
 tags
 
 Get eyeD3
 =========
-.. note::
-  Versions of eyeD3 < 0.7 are NOT API compatible. The command line tool is
-  mostly compatible but may differ slightly in interface.
 
 Supports Python 2.7.
 

bin/cli_examples.sh

 #!/bin/bash
 
 # [[[section SETUP]]]
-rm -f example.mp3
-touch example.mp3
-ls -o example.mp3
+rm -f example.id3
+touch example.id3
+ls -o example.id3
 # [[[endsection]]]
 
 # [[[section ART_TIT_SET]]]
-eyeD3 --artist="Token Entry" --title="Entities" example.mp3
+eyeD3 --artist="Token Entry" --title="Entities" example.id3 -Q
 # [[[endsection]]]
 
 # [[[section ALB_YR_SET]]]
-eyeD3 -A "Jaybird" -Y 1987 example.mp3
-eyeD3 -G "Hardcore" example.mp3
+eyeD3 -A "Jaybird" -Y 1987 example.id3 -Q
+eyeD3 -G "Hardcore" example.id3 -Q
+eyeD3 example.id3
 # [[[endsection]]]
 
 
 # [[[section CLEAR_SET]]]
-eyeD3 --genre="" example.mp3
+eyeD3 --genre="" example.id3
 # [[[endsection]]]
 
 # [[[section ALL]]]
 # Set an artist value in the ID3 v1 tag
-eyeD3 -1 example.mp3 -a id3v1
+eyeD3 -1 example.id3 -a id3v1
 # The file now has a v1 and v2 tag, change the v2 artist
-eyeD3 -2 example.mp3 -a id3v2
+eyeD3 -2 example.id3 -a id3v2
 
 # Take all the values from v2.4 tag (the default) and set them in the v1 tag.
-eyeD3 -2 --to-v1.1 example.mp3
+eyeD3 -2 --to-v1.1 example.id3
 # Take all the values from v1 tag and convert to ID3 v2.3
-eyeD3 -1 --to-v2.3 example.mp3
+eyeD3 -1 --to-v2.3 example.id3
 
 # Remove all the tags
-eyeD3 --remove-all example.mp3
+eyeD3 --remove-all example.id3
 # [[[endsection]]]
+# -*- coding: utf-8 -*-
+################################################################################
+#  Copyright (C) 2012  Travis Shirk <travis@pobox.com>
+#
+#  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 2 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, write to the Free Software
+#  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+#
+################################################################################
+import os
+from fabric.api import run, put
+from pavement import SRC_DIST_TGZ, DOC_DIST, MD5_DIST, SRC_DIST_ZIP
+
+RELEASE_D = "~/www/eyeD3/releases"
+
+def host_type():
+    run('uname -a')
+
+def deploy_sdist():
+    put("./dist/%s" % SRC_DIST_TGZ, RELEASE_D)
+    put("./dist/%s" % SRC_DIST_ZIP, RELEASE_D)
+    put("./dist/%s.md5" % os.path.splitext(SRC_DIST_TGZ)[0], RELEASE_D)
+
+def deploy_docs():
+    put("./dist/%s" % DOC_DIST, "~")
+    run("tar xzf eyeD3_docs-0.7.0-rc1.tgz -C ./www/eyeD3 --strip-components=1")
+
+def deploy():
+    deploy_sdist()
+    deploy_docs()
+
 URL = "http://eyeD3.nicfit.net"
 AUTHOR = "Travis Shirk"
 AUTHOR_EMAIL = "travis@pobox.com"
-SRC_DIST = "%s-%s.tgz" % (PROJECT, VERSION)
+SRC_DIST_TGZ = "%s-%s.tgz" % (PROJECT, VERSION)
+SRC_DIST_ZIP = "%s.zip" % os.path.splitext(SRC_DIST_TGZ)[0]
 DOC_DIST = "%s_docs-%s.tgz" % (PROJECT, VERSION)
+MD5_DIST = "%s.md5" % os.path.splitext(SRC_DIST_TGZ)[0]
 DOC_BUILD_D = "docs/.build"
 
 PACKAGE_DATA = paver.setuputils.find_package_data("src/eyed3",
         author=AUTHOR, maintainer=AUTHOR,
         author_email=AUTHOR_EMAIL, maintainer_email=AUTHOR_EMAIL,
         url=URL,
-        download_url="%s/releases/%s" % (URL, SRC_DIST),
+        download_url="%s/releases/%s" % (URL, SRC_DIST_TGZ),
         license=license,
         package_dir={"": "src" },
         packages=setuptools.find_packages("src",
         keywords=("id3", "mp3", "python"),
         scripts=["bin/eyeD3"],
         package_data=PACKAGE_DATA,
-   ),
+    ),
 
-   sphinx=Bunch(
+    sdist=Bunch(
+        formats="gztar,zip",
+    ),
+
+    sphinx=Bunch(
         docroot=os.path.split(DOC_BUILD_D)[0],
         builddir=os.path.split(DOC_BUILD_D)[1],
         builder='html',
         template_args = {},
-   ),
+    ),
 
-   cog=Bunch(
+    cog=Bunch(
        beginspec='{{{cog',
        endspec='}}}',
        endoutput='{{{end}}}',
        includedir=path(__file__).abspath().dirname(),
-   ),
+    ),
 
-   test=Bunch(
+    test=Bunch(
        debug=False,
        coverage=False,
-   ),
+    ),
 )
 
 @task
 def sdist(options):
     '''Make a source distribution'''
     cwd = os.getcwd()
-    dist_name = os.path.splitext(SRC_DIST)[0]
     try:
         os.chdir("dist")
         # Rename to .tgz
-        sh("mv %s.tar.gz %s" % (dist_name, SRC_DIST))
-        sh("md5sum %s > %s.md5" % (SRC_DIST, dist_name))
+        sh("mv %s.tar.gz %s" % (os.path.splitext(SRC_DIST_TGZ)[0],
+                                SRC_DIST_TGZ))
+        sh("md5sum %s >> %s" % (SRC_DIST_TGZ, MD5_DIST))
+        sh("md5sum %s >> %s" % (SRC_DIST_ZIP, MD5_DIST))
     finally:
         os.chdir(cwd)
 
 def test_dist():
     '''Makes a dist package, unpacks it, and tests it.'''
     cwd = os.getcwd()
-    pkg_d = os.path.splitext(SRC_DIST)[0]
+    pkg_d = os.path.splitext(SRC_DIST_TGZ)[0]
     try:
         os.chdir("./dist")
-        sh("tar xzf %s" % SRC_DIST)
+        sh("tar xzf %s" % SRC_DIST_TGZ)
 
         os.chdir(pkg_d)
         # Copy tests into src pkg
         os.chdir(DOC_BUILD_D)
         sh("tar czvf ../../dist/%s html" % DOC_DIST)
         os.chdir("%s/dist" % cwd)
-        sh("md5sum %s > %s.md5" % (DOC_DIST, os.path.splitext(DOC_DIST)[0]))
+        sh("md5sum %s >> %s" % (DOC_DIST, MD5_DIST))
     finally:
         os.chdir(cwd)
 
                 else:
                     cmd_line = cmd
 
-                cmd_line = (' ' * 2) + cmd_line
-                self.cog.gen.out(cmd_line + "\n")
+                cmd_line = '\n' + (' ' * 2) + cmd_line
+                self.cog.gen.out(cmd_line)
                 output = sh(cmd, capture=True)
                 if output:
                     self.cog.gen.out("\n")
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.