OpenShot Video Editor  2.0.0
info.py
Go to the documentation of this file.
1 ##
2 #
3 # @file
4 # @brief This file contains the current version number of OpenShot, along with other global settings.
5 # @author Jonathan Thomas <jonathan@openshot.org>
6 #
7 # @section LICENSE
8 #
9 # Copyright (c) 2008-2018 OpenShot Studios, LLC
10 # (http://www.openshotstudios.com). This file is part of
11 # OpenShot Video Editor (http://www.openshot.org), an open-source project
12 # dedicated to delivering high quality video editing and animation solutions
13 # to the world.
14 #
15 # OpenShot Video Editor is free software: you can redistribute it and/or modify
16 # it under the terms of the GNU General Public License as published by
17 # the Free Software Foundation, either version 3 of the License, or
18 # (at your option) any later version.
19 #
20 # OpenShot Video Editor is distributed in the hope that it will be useful,
21 # but WITHOUT ANY WARRANTY; without even the implied warranty of
22 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
23 # GNU General Public License for more details.
24 #
25 # You should have received a copy of the GNU General Public License
26 # along with OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
27 #
28 
29 import os
30 
31 from PyQt5.QtCore import QDir
32 
33 VERSION = "2.4.4"
34 MINIMUM_LIBOPENSHOT_VERSION = "0.2.3"
35 DATE = "20190315000000"
36 NAME = "openshot-qt"
37 PRODUCT_NAME = "OpenShot Video Editor"
38 GPL_VERSION = "3"
39 DESCRIPTION = "Create and edit stunning videos, movies, and animations"
40 COMPANY_NAME = "OpenShot Studios, LLC"
41 COPYRIGHT = "Copyright (c) 2008-2018 %s" % COMPANY_NAME
42 CWD = os.getcwd()
43 PATH = os.path.dirname(os.path.dirname(os.path.realpath(__file__))) # Primary openshot folder
44 HOME_PATH = os.path.join(os.path.expanduser("~"))
45 USER_PATH = os.path.join(HOME_PATH, ".openshot_qt")
46 BACKUP_PATH = os.path.join(USER_PATH, "backup")
47 BLENDER_PATH = os.path.join(USER_PATH, "blender")
48 ASSETS_PATH = os.path.join(USER_PATH, "assets")
49 THUMBNAIL_PATH = os.path.join(USER_PATH, "thumbnail")
50 CACHE_PATH = os.path.join(USER_PATH, "cache")
51 PREVIEW_CACHE_PATH = os.path.join(USER_PATH, "preview-cache")
52 TITLE_PATH = os.path.join(USER_PATH, "title")
53 PROFILES_PATH = os.path.join(PATH, "profiles")
54 IMAGES_PATH = os.path.join(PATH, "images")
55 TRANSITIONS_PATH = os.path.join(USER_PATH, "transitions")
56 EXPORT_PRESETS_PATH = os.path.join(PATH, "presets")
57 EXPORT_TESTS = os.path.join(USER_PATH, "tests")
58 USER_PROFILES_PATH = os.path.join(USER_PATH, "profiles")
59 USER_PRESETS_PATH = os.path.join(USER_PATH, "presets")
60 
61 # Create PATHS if they do not exist (this is where temp files are stored... such as cached thumbnails)
62 for folder in [USER_PATH, THUMBNAIL_PATH, CACHE_PATH, BLENDER_PATH, ASSETS_PATH, TITLE_PATH, PROFILES_PATH, IMAGES_PATH,
63  TRANSITIONS_PATH, EXPORT_TESTS, BACKUP_PATH, USER_PROFILES_PATH, USER_PRESETS_PATH, PREVIEW_CACHE_PATH]:
64  if not os.path.exists(folder.encode("UTF-8")):
65  os.makedirs(folder, exist_ok=True)
66 
67 # names of all contributors, using "u" for unicode encoding
68 JT = {"name": u"Jonathan Thomas", "email": "jonathan@openshot.org", "website":"http://openshot.org/developers/jonathan"}
69 
70 # Languages
71 CMDLINE_LANGUAGE = None
72 CURRENT_LANGUAGE = 'en_US'
73 SUPPORTED_LANGUAGES = ['en_US']
74 
75 try:
76  from language import openshot_lang
77  language_path=":/locale/"
78 except ImportError:
79  language_path=os.path.join(PATH, 'language')
80  print("Compiled translation resources missing!")
81  print("Loading translations from: {}".format(language_path))
82 
83 # Compile language list from :/locale resource
84 langdir = QDir(language_path)
85 langs = langdir.entryList(['OpenShot.*.qm'], QDir.NoDotAndDotDot|QDir.Files,
86  sort=QDir.Name)
87 for trpath in langs:
88  SUPPORTED_LANGUAGES.append(trpath.split('.')[1])
89 
90 SETUP = {
91  "name": NAME,
92  "version": VERSION,
93  "author": JT["name"] + " and others",
94  "author_email": JT["email"],
95  "maintainer": JT["name"],
96  "maintainer_email": JT["email"],
97  "url": "http://www.openshot.org/",
98  "license": "GNU GPL v." + GPL_VERSION,
99  "description": DESCRIPTION,
100  "long_description": "Create and edit videos and movies\n"
101  " OpenShot Video Editor is a free, open-source, non-linear video editor. It\n"
102  " can create and edit videos and movies using many popular video, audio, \n"
103  " image formats. Create videos for YouTube, Flickr, Vimeo, Metacafe, iPod,\n"
104  " Xbox, and many more common formats!\n"
105  ".\n"
106  " Features include:\n"
107  " * Multiple tracks (layers)\n"
108  " * Compositing, image overlays, and watermarks\n"
109  " * Support for image sequences (rotoscoping)\n"
110  " * Key-frame animation\n * Video and audio effects (chroma-key)\n"
111  " * Transitions (lumas and masks)\n"
112  " * 3D animation (titles and simulations)\n"
113  " * Upload videos (YouTube and Vimeo supported)",
114 
115  # see http://pypi.python.org/pypi?%3Aaction=list_classifiers
116  "classifiers": [
117  "Development Status :: 5 - Production/Stable",
118  "Environment :: X11 Applications",
119  "Environment :: X11 Applications :: GTK",
120  "Intended Audience :: End Users/Desktop",
121  "License :: OSI Approved :: GNU General Public License (GPL)",
122  "Operating System :: OS Independent",
123  "Operating System :: POSIX :: Linux",
124  "Programming Language :: Python",
125  "Topic :: Artistic Software",
126  "Topic :: Multimedia :: Video :: Non-Linear Editor", ] +
127  ["Natural Language :: " + language for language in SUPPORTED_LANGUAGES],
128 
129  # Automatic launch script creation
130  "entry_points": {
131  "gui_scripts": [
132  "openshot-qt = openshot_qt.launch:main"
133  ]
134  }
135 }
136 
137 ##
138 # Get the current website language code for URLs
140  if CURRENT_LANGUAGE == "zh_CN":
141  return "zh-hans/"
142  elif CURRENT_LANGUAGE == "zh_TW":
143  return "zh-hant/"
144  elif CURRENT_LANGUAGE == "en_US":
145  return ""
146  else:
147  return "%s/" % CURRENT_LANGUAGE.split("_")[0].lower()
def website_language
Get the current website language code for URLs.
Definition: info.py:139