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.3-dev1"
34 MINIMUM_LIBOPENSHOT_VERSION = "0.2.2"
35 DATE = "20180922000000"
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_DIR = 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 
60 # Create PATHS if they do not exist (this is where temp files are stored... such as cached thumbnails)
61 for folder in [USER_PATH, THUMBNAIL_PATH, CACHE_PATH, BLENDER_PATH, ASSETS_PATH, TITLE_PATH, PROFILES_PATH, IMAGES_PATH,
62  TRANSITIONS_PATH, EXPORT_TESTS, BACKUP_PATH, USER_PROFILES_PATH, PREVIEW_CACHE_PATH]:
63  if not os.path.exists(folder.encode("UTF-8")):
64  os.makedirs(folder, exist_ok=True)
65 
66 # names of all contributors, using "u" for unicode encoding
67 JT = {"name": u"Jonathan Thomas", "email": "jonathan@openshot.org", "website":"http://openshot.org/developers/jonathan"}
68 
69 # Languages
70 CMDLINE_LANGUAGE = None
71 CURRENT_LANGUAGE = 'en_US'
72 SUPPORTED_LANGUAGES = ['en_US']
73 
74 try:
75  from language import openshot_lang
76  language_path=":/locale/"
77 except ImportError:
78  language_path=os.path.join(PATH, 'language')
79  print("Compiled translation resources missing!")
80  print("Loading translations from: {}".format(language_path))
81 
82 # Compile language list from :/locale resource
83 langdir = QDir(language_path)
84 langs = langdir.entryList(['OpenShot.*.qm'], QDir.NoDotAndDotDot|QDir.Files,
85  sort=QDir.Name)
86 for trpath in langs:
87  SUPPORTED_LANGUAGES.append(trpath.split('.')[1])
88 
89 SETUP = {
90  "name": NAME,
91  "version": VERSION,
92  "author": JT["name"] + " and others",
93  "author_email": JT["email"],
94  "maintainer": JT["name"],
95  "maintainer_email": JT["email"],
96  "url": "http://www.openshot.org/",
97  "license": "GNU GPL v." + GPL_VERSION,
98  "description": DESCRIPTION,
99  "long_description": "Create and edit videos and movies\n"
100  " OpenShot Video Editor is a free, open-source, non-linear video editor. It\n"
101  " can create and edit videos and movies using many popular video, audio, \n"
102  " image formats. Create videos for YouTube, Flickr, Vimeo, Metacafe, iPod,\n"
103  " Xbox, and many more common formats!\n"
104  ".\n"
105  " Features include:\n"
106  " * Multiple tracks (layers)\n"
107  " * Compositing, image overlays, and watermarks\n"
108  " * Support for image sequences (rotoscoping)\n"
109  " * Key-frame animation\n * Video and audio effects (chroma-key)\n"
110  " * Transitions (lumas and masks)\n"
111  " * 3D animation (titles and simulations)\n"
112  " * Upload videos (YouTube and Vimeo supported)",
113 
114  # see http://pypi.python.org/pypi?%3Aaction=list_classifiers
115  "classifiers": [
116  "Development Status :: 5 - Production/Stable",
117  "Environment :: X11 Applications",
118  "Environment :: X11 Applications :: GTK",
119  "Intended Audience :: End Users/Desktop",
120  "License :: OSI Approved :: GNU General Public License (GPL)",
121  "Operating System :: OS Independent",
122  "Operating System :: POSIX :: Linux",
123  "Programming Language :: Python",
124  "Topic :: Artistic Software",
125  "Topic :: Multimedia :: Video :: Non-Linear Editor", ] +
126  ["Natural Language :: " + language for language in SUPPORTED_LANGUAGES],
127 
128  # Automatic launch script creation
129  "entry_points": {
130  "gui_scripts": [
131  "openshot-qt = openshot_qt.launch:main"
132  ]
133  }
134 }
135 
136 ##
137 # Get the current website language code for URLs
139  website_lang = "www"
140  if CURRENT_LANGUAGE != "en_US":
141  website_lang = CURRENT_LANGUAGE
142  return website_lang
def website_language
Get the current website language code for URLs.
Definition: info.py:138