← Back to team overview

openshot.code team mailing list archive

[Merge] lp:~kroq-gar78/openshot/fix-956664 into lp:openshot

 

kroq-gar78 has proposed merging lp:~kroq-gar78/openshot/fix-956664 into lp:openshot.

Requested reviews:
  OpenShot Code (openshot.code)
Related bugs:
  Bug #956664 in OpenShot Video Editor: "[Feature Request] --version command line option"
  https://bugs.launchpad.net/openshot/+bug/956664

For more details, see:
https://code.launchpad.net/~kroq-gar78/openshot/fix-956664/+merge/99228

I added a '--version' command line option to 'bin/openshot' and the manpage for 'openshot'
-- 
https://code.launchpad.net/~kroq-gar78/openshot/fix-956664/+merge/99228
Your team OpenShot Code is requested to review the proposed merge of lp:~kroq-gar78/openshot/fix-956664 into lp:openshot.
=== modified file 'bin/openshot'
--- bin/openshot	2011-08-27 20:46:36 +0000
+++ bin/openshot	2012-03-25 22:10:27 +0000
@@ -18,7 +18,7 @@
 #	You should have received a copy of the GNU General Public License
 #	along with OpenShot Video Editor.  If not, see <http://www.gnu.org/licenses/>.
 
-import sys, os
+import os, sys
 
 # get the real location of this launcher file (not the link location)
 realfile = os.path.realpath(__file__)
@@ -46,6 +46,11 @@
 # we should be able to import openshot and call the main() method
 
 try:
+	if( "--version" in sys.argv ):
+		from openshot.classes import info
+		print "OpenShot version %s" % info.SETUP['version']	
+		exit()
+	
 	# RUN OPENSHOT (from the openshot/bin folder)
 	from openshot import main
 	main()
@@ -90,4 +95,4 @@
 		print " bug at https://bugs.launchpad.net/openshot.  Good luck!"
 		print ""
 		
-	
\ No newline at end of file
+	

=== modified file 'docs/openshot.1'
--- docs/openshot.1	2010-09-18 09:05:00 +0000
+++ docs/openshot.1	2012-03-25 22:10:27 +0000
@@ -1,12 +1,12 @@
 .TH OPENSHOT 1 "SEPT 2010" Linux "User Manuals"
-.SH NAME
+.SH NAME
 openshot \- Non-Linear Video Editor
 
 .SH SYNOPSIS
 .B openshot 
-[filename1 [filename2]] ...
-
-.SH DESCRIPTION
+[--version] [filename1 [filename2]] ...
+
+.SH DESCRIPTION
 OpenShot Video Editor is a program designed to create videos on 
 Linux.  It can easily combine multiple video clips, audio clips, 
 and images into a single project, and then export the video into 
@@ -22,8 +22,8 @@
 create television commercials and on-line films, or anything else 
 you can dream up.
 
-.TP
-.B More information
+.TP
+.B More information
  Project Website: http://www.OpenShotVideo.com
  User Website: http://www.OpenShotUsers.com