Skip to content

Commit

Permalink
Release 0.1.11 (#44)
Browse files Browse the repository at this point in the history
* Temp exe

* Updated temporary exe file

* Delete tesla_dashcam_190b3.exe

* Fix check release

* Updated README with initial 0.1.10 and additional TODO

Updated README with items already in progress for 0.1.10

Added items to TODO list

* Fix running tesla_dashcam when installed with pip

* Updated README with additional items done for next release

* Initial set of updates for 0.1.10.

* Timestamp sorting fix

* Added Chapter Markers in To-Do list

* Made behaviour for single folder same as multiple

Made behaviour for single folder discovered same as multiple.

* --delete_souce now also for execution without --monitor

* Updated README and reorged 0.1.10 items a bit

* Fix deleting foldr file if name same as clip name

* Exclude ffmpeg.exe

* Default output folder, change in folder filename

Added default output folder
Changed folder filename to <Start_Timestamp>_<End_Timestamp>
Source is optional now

* Set Python version to 3.7 only

* Updated readme for 0.1.10

Finished updating readme

* Set version to 0.1.10

* Fixed metadata issue

Fixed if all 3 files of a timestamp are corrupt
Ensured that video_timestamp is dateformat if timestamp was retrieved from filename instead of clip.

* Fixed issue if camera file was missing

Fixed an issue if a camera file was missing.
Removed now unused MOVIE_LAYOUT dictionary

* Release 0.1.10

* Fixed traceback issue for ffmpeg (#39)

* Added option to test distribution with TestPyPi

* Version change to 0.1.11

* Updated README

Added 2 fixes for 0.1.11
Added option to crop videos in TODO section

* Fixed output folder issues

* Missing piece for PyPi

Figured out missing piece allowing easy execution from PyPi.

* Updated links to executables

* Removed DIAGONAL as it is not implemented
  • Loading branch information
ehendrix23 authored Jul 29, 2019
1 parent dd130a5 commit ea11d61
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 14 deletions.
13 changes: 9 additions & 4 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ Binaries

Stand-alone binaries can be retrieved:

- Windows: https://github.com/ehendrix23/tesla_dashcam/releases/download/v0.1.9/tesla_dashcam.zip
- MacOS (OSX): https://github.com/ehendrix23/tesla_dashcam/releases/download/v0.1.9/tesla_dashcam.dmg
- Windows: https://github.com/ehendrix23/tesla_dashcam/releases/download/v0.1.11/tesla_dashcam.zip
- MacOS (OSX): https://github.com/ehendrix23/tesla_dashcam/releases/download/v0.1.11/tesla_dashcam.dmg

`ffmpeg <https://www.ffmpeg.org/legal.html>`_ is included within the respective package.
ffmpeg is a separately licensed product under the `GNU Lesser General Public License (LGPL) version 2.1 or later <http://www.gnu.org/licenses/old-licenses/lgpl-2.1.html>`_.
Expand Down Expand Up @@ -152,7 +152,7 @@ Usage
(default: False)
--no-notification Do not create a notification upon completion.
(default: True)
--layout {WIDESCREEN,FULLSCREEN,DIAGONAL,PERSPECTIVE}
--layout {WIDESCREEN,FULLSCREEN,PERSPECTIVE}
Layout of the created video.
FULLSCREEN: Front camera center top, side cameras underneath it.
WIDESCREEN: Output from all 3 cameras are next to each other.
Expand Down Expand Up @@ -657,13 +657,18 @@ Release Notes
- Fixed: Folder clip would be removed if only 1 set in folder with same name as folder name if keep_intermediate not specified
- Fixed: Font issue in Windows (hopefully final fix) `Issue #29 <https://github.com/ehendrix23/tesla_dashcam/issues/29>`_
- Fixed: Python version has to be 3.7 or higher due to use of capture_output `Issue #19 <https://github.com/ehendrix23/tesla_dashcam/issues/19>`_
0.1.11:
- Fixed: Traceback when getting ffmpeg path in Linux `Issue #39 <https://github.com/ehendrix23/tesla_dashcam/issues/39>`_
- Fixed: running tesla_dashcam when installed using pip. `Issue #38 <https://github.com/ehendrix23/tesla_dashcam/issues/38>`_
- Fixed: Just providing a filename for output would result in traceback.
- Fixed: When providing a folder as output it would be possible that the last folder name was stripped potentially resulting in error.
TODO
----
* Allow exclusion of camera(s) in output (i.e. don't include right, or don't include front, ...).
* Implement option to crop individual camera output
* Provide option to copy or move from source to output folder before starting to process
* Add chapter markers
* Allow for scanning if there are new folders and process if there are
Expand Down
43 changes: 42 additions & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,46 @@ def run(self):

sys.exit()

class TestUploadCommand(Command):
"""Support setup.py upload."""

description = 'Build and publish the package to TestPyPi.'
user_options = [] # type: ignore

@staticmethod
def status(string):
"""Prints things in bold."""
print('\033[1m{0}\033[0m'.format(string))

def initialize_options(self):
"""Add options for initialization."""
pass

def finalize_options(self):
"""Add options for finalization."""
pass

def run(self):
"""Run."""
try:
self.status('Removing previous builds…')
rmtree(os.path.join(HERE, 'dist'))
except OSError:
pass

self.status('Building Source and Wheel (universal) distribution…')
os.system('{0} setup.py sdist bdist_wheel --universal'.format(
sys.executable))

self.status('Uploading the package to TestPyPi via Twine…')
os.system('twine upload --repository-url '
'https://test.pypi.org/legacy/ dist/*')

self.status('Pushing git tags…')
os.system('git tag v{0}'.format(ABOUT['__version__']))
os.system('git push --tags')

sys.exit()

# Where the magic happens:
setup(
Expand All @@ -108,7 +148,7 @@ def run(self):
# py_modules=['tesla_dashcam'],

entry_points={
'console_scripts': ['tesla_dashcam=tesla_dashcam.tesla_dashcam:main'],
'console_scripts': ['tesla_dashcam=tesla_dashcam:main'],
},
install_requires=REQUIRED,
include_package_data=True,
Expand All @@ -128,5 +168,6 @@ def run(self):
# $ setup.py publish support.
cmdclass={
'upload': UploadCommand,
'testupload': TestUploadCommand,
},
)
1 change: 1 addition & 0 deletions tesla_dashcam/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
from .tesla_dashcam import main
2 changes: 1 addition & 1 deletion tesla_dashcam/__version__.py
Original file line number Diff line number Diff line change
@@ -1 +1 @@
__version__ = '0.1.10'
__version__ = '0.1.11'
13 changes: 5 additions & 8 deletions tesla_dashcam/tesla_dashcam.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@
VERSION = {
'major': 0,
'minor': 1,
'patch': 10,
'patch': 11,
'beta': -1,
}
VERSION_STR = 'v{major}.{minor}.{patch}'.format(
Expand Down Expand Up @@ -1370,7 +1370,7 @@ def resource_path(relative_path):
"""
# If compiled with pyinstaller then sys._MEIPASS points to the location
# of the bundle. Otherwise path of python script is used.
base_path = getattr(sys, '_MEIPASS', Path(__file__).parent)
base_path = getattr(sys, '_MEIPASS', str(Path(__file__).parent))
return os.path.join(base_path, relative_path)


Expand Down Expand Up @@ -1522,7 +1522,6 @@ def main() -> None:
required=False,
choices=['WIDESCREEN',
'FULLSCREEN',
'DIAGONAL',
'PERSPECTIVE', ],
default='FULLSCREEN',
help="R|Layout of the created video.\n"
Expand All @@ -1542,8 +1541,7 @@ def main() -> None:
" WIDESCREEN: 1/2 (640x480, video is "
"1920x480)\n"
" FULLSCREEN: 1/2 (640x480, video is "
"1280x960)\n"
" DIAGONAL: 1/4 (320x240, video is 980x380)\n"
"1280x960)\n"
" PERSPECTIVE: 1/4 (320x240, video is "
"980x380)\n"
)
Expand Down Expand Up @@ -2091,14 +2089,13 @@ def main() -> None:

# Determine the target folder and filename.
# If no extension then assume it is a folder.
if len(os.path.splitext(args.output)) > 1:
if os.path.splitext(args.output)[1] is None:
target_folder, target_filename = os.path.split(args.output)
if target_filename is None:
# If nothing in target_filename then no folder was given,
# setting default movie folder
target_folder = movie_folder
target_filename = arggs.output

target_filename = args.output
else:
# Folder only provided.
target_folder = args.output
Expand Down

0 comments on commit ea11d61

Please sign in to comment.