Skip to content

Commit

Permalink
Merge pull request #2 from OpenShot/master
Browse files Browse the repository at this point in the history
Grab latest changes
  • Loading branch information
DylanC authored Apr 30, 2018
2 parents 3fbb038 + 93cbd7a commit e23a2b2
Show file tree
Hide file tree
Showing 78 changed files with 2,252 additions and 1,023 deletions.
3 changes: 2 additions & 1 deletion .github/CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@

_Please download our latest daily installer:_

1. www.openshot.org/download - click '**Other Downloads**' link and grab the newest one
1. www.openshot.org/download - click the '**Daily Builds**' button, then grab the latest build from the list.
(Use the buttons below to download installers for a different Operating System.)
2. Then enable 'Debug Mode (Verbose)' in the Preferences
3. Quit OpenShot and delete both log files:
* **Windows**: OpenShot stores its logs in your user profile directory (`%USERPROFILE%`, e.g. `C:\Users\username\`)
Expand Down
80 changes: 80 additions & 0 deletions doc/contributing.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
.. Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-source project
dedicated to delivering high quality video editing and animation solutions
to the world.
.. OpenShot Video Editor 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.
.. OpenShot Video Editor 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 OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
Contributing
============

Did you find a bug?
-------------------

- **Please check if this bug was already reported** by searching on
GitHub under
`Issues <https://github.com/OpenShot/openshot-qt/issues>`__.

- If you're unable to find an open issue addressing the problem, `open
a new one <https://github.com/OpenShot/openshot-qt/issues/new>`__. Be
sure to include a **title and clear description**, as much relevant
information as possible, and the steps to reproduce the crash or
issue.

- Please **attach log files** if you are reporting a crash. Otherwise,
we will not be able to determine the cause of the crash.

Please download our latest daily installer:
"""""""""""""""""""""""""""""""""""""""""""
1. `www.openshot.org/download <https://www.openshot.org/download>`__ - click the '**DAILY BUILDS**' button, then grab the latest build from the list.
(Use the buttons below to download installers for a different Operating System.)
2. Then enable 'Debug Mode (Verbose)' in the Preferences
3. Quit OpenShot and delete both log files:

- **Windows**: OpenShot stores its logs in your user profile
directory (``%USERPROFILE%``, e.g. ``C:\Users\username\``)

- ``%USERPROFILE%/.openshot_qt/openshot_qt.log``
- ``%USERPROFILE%/.openshot_qt/libopenshot.log``

- **Linux/MacOS**: OpenShot stores its logs in your home directory
(``$HOME``, e.g. ``/home/username/``)

- ``$HOME/.openshot_qt/openshot_qt.log``
- ``$HOME/.openshot_qt/libopenshot.log``

4. Re-launch OpenShot and trigger the crash as quickly as possible (to
keep the log files small)
5. Attach **both** log files

Did you write a patch that fixes a bug?
---------------------------------------

- Open a new GitHub pull request with the patch.

- Ensure the PR description clearly describes the problem and solution.
Include the relevant issue number if applicable.

- Before submitting, please ensure your PR passes all build /
compilation / and unit tests.

OpenShot Video Editor is a volunteer effort, and a labor of love. Please
be patient with any issues you find, and feel free to get involved and
help us fix them!

Thanks!

OpenShot Team
2 changes: 1 addition & 1 deletion doc/developers.rst
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,7 @@ to run. To launch openshot-qt from the source code, use the following commands:
python3 src/launch.py
This should launch the OpenShot user interface, and include any changes you have made to the source code
files (*.py Python files, *.ui PyQt UI files, etc...). This requires the `libopenshot-audio` and
files (`*.py` Python files, `*.ui` PyQt UI files, etc...). This requires the `libopenshot-audio` and
`libopenshot` libraries, and if anything went wrong with the steps above, OpenShot will likely not launch.

If OpenShot launches at this point, congratulations, you now have a working local version of OpenShot,
Expand Down
3 changes: 2 additions & 1 deletion doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ Table of Contents:
titles
profiles
developers
learn_more
contributing
learn_more
2 changes: 1 addition & 1 deletion freeze.py
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ def find_files(directory, patterns):
if (libpath \
and not libpath.startswith("/lib") \
and not "libnvidia-glcore.so" in libpath \
and not libpath_file in ["libstdc++.so.6", "libGL.so.1", "libxcb.so.1", "libX11.so.6", "libasound.so.2", "libfontconfig.so.1", "libgcc_s.so.1 ", "libICE.so.6", "libp11-kit.so.0", "libSM.so.6", "libgobject-2.0.so.0"]) \
and not libpath_file in ["libstdc++.so.6", "libGL.so.1", "libxcb.so.1", "libX11.so.6", "libasound.so.2", "libgcc_s.so.1 ", "libICE.so.6", "libp11-kit.so.0", "libSM.so.6", "libgobject-2.0.so.0"]) \
or libpath_file in ["libgcrypt.so.11", "libQt5DBus.so.5", "libpng12.so.0", "libbz2.so.1.0", "libqxcb.so"]:

# Ignore paths that start with /lib
Expand Down
39 changes: 31 additions & 8 deletions installer/build-server.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,9 +134,20 @@ def slack_upload_log(log, title, comment=None):

print("Slack Upload: %s" % log_path)
if slack_object:
# Upload build log to slack (and append platform icon to comment [:linux:, :windows:, or :darwin:])
slack_object.files.upload(log_path, filetype="txt", filename="%s-build-server.txt" % platform.system(),
title=title, initial_comment=':%s: %s' % (platform.system().lower(), comment), channels="#build-server")
for attempt in range(3):
try:
# Upload build log to slack (and append platform icon to comment [:linux:, :windows:, or :darwin:])
slack_object.files.upload(log_path, filetype="txt", filename="%s-build-server.txt" % platform.system(),
title=title, initial_comment=':%s: %s' % (platform.system().lower(), comment), channels="#build-server")
# Successfully uploaded!
break
except Exception as ex:
# Quietly fail, and try again
if attempt < 2:
output("Upload log to Slack failed... trying again")
else:
# Throw loud exception
raise Exception('Log upload to Slack failed: %s' % log_path, ex)

# Re-open the log (for append)
log = open(log_path, "a")
Expand All @@ -155,6 +166,12 @@ def upload(file_path, github_release):
url = None
if s3_connection:
folder_path, file_name = os.path.split(file_path)

# Check if this asset is already uploaded
for asset in github_release.assets:
if asset.name == file_name:
return asset.to_json()["browser_download_url"]

for attempt in range(3):
try:
# Attempt the upload
Expand All @@ -170,7 +187,7 @@ def upload(file_path, github_release):
output("Upload failed... trying again")
else:
# Throw loud exception
raise ex
raise Exception('Upload failed. Verify that this file is not already uploaded: %s' % file_path, ex)

return url

Expand Down Expand Up @@ -573,6 +590,11 @@ def upload(file_path, github_release):
torrent_path = "%s.torrent" % app_build_path
torrent_command = 'mktorrent -a "udp://tracker.openbittorrent.com:80/announce, udp://tracker.publicbt.com:80/announce, udp://tracker.opentrackr.org:1337" -c "OpenShot Video Editor %s" -w "%s" -o "%s" "%s"' % (version, download_url, "%s.torrent" % app_name, app_name)
torrent_output = ""

# Remove existing torrents (if any found)
if os.path.exists(torrent_path):
os.remove(torrent_path)

# Create torrent
for line in run_command(torrent_command, builds_path):
output(line)
Expand All @@ -587,15 +609,16 @@ def upload(file_path, github_release):
# Torrent succeeded! Upload the torrent to github
url = upload(torrent_path, github_release)

# Notify Slack
slack_upload_log(log, "%s: Build logs for %s" % (platform.system(), app_name), "Successful build: %s" % download_url)

# Move app to uploads folder, and remove from build folder (so it will be skipped next time)
shutil.copyfile(app_build_path, app_upload_path)
os.remove(app_build_path)
shutil.copyfile(torrent_path, "%s.torrent" % app_upload_path)
os.remove(app_build_path)
os.remove(torrent_path)

# Notify Slack
slack_upload_log(log, "%s: Build logs for %s" % (platform.system(), app_name), "Successful build: %s" % download_url)
shutil.copyfile(log_path, "%s.log" % app_upload_path)

else:
# App doesn't exist (something went wrong)
error("App Missing Error: %s does not exist" % app_build_path)
Expand Down
49 changes: 49 additions & 0 deletions src/classes/conversion.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"""
@file
@brief This file deals with value conversions
@author Jonathan Thomas <jonathan@openshot.org>
@author Frank Dana <ferdnyc AT gmail com>
@section LICENSE
Copyright (c) 2008-2018 OpenShot Studios, LLC
(http://www.openshotstudios.com). This file is part of
OpenShot Video Editor (http://www.openshot.org), an open-source project
dedicated to delivering high quality video editing and animation solutions
to the world.
OpenShot Video Editor 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.
OpenShot Video Editor 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 OpenShot Library. If not, see <http://www.gnu.org/licenses/>.
"""

import math

def zoomToSeconds(zoomValue):
""" Convert zoom factor (slider position) into scale-seconds """

if (zoomValue <= 5):
# Under 1 minute, convert to seconds (exponential)
return 2**zoomValue
elif (zoomValue <= 11):
# convert to N minutes (exponential), in seconds
return 60 * (2**(zoomValue-6))
else:
# Over 1 hour, convert to N hours (exponential), in seconds
return 3600 * (2**(zoomValue-12))


def secondsToZoom(scaleValue):
""" Convert a number of seconds to a timeline zoom factor """

return int(math.log(scaleValue,2))

Loading

0 comments on commit e23a2b2

Please sign in to comment.