Skip to content

Commit

Permalink
add needed modules and add version file
Browse files Browse the repository at this point in the history
  • Loading branch information
FabianSchurig committed Feb 22, 2019
1 parent b14133a commit d99f05a
Show file tree
Hide file tree
Showing 282 changed files with 44,793 additions and 39 deletions.
58 changes: 21 additions & 37 deletions ContentCenterLoader.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,11 @@
module_module_dir = os.path.abspath(os.path.join(module_dir, "modules"))
sys.path.append(module_module_dir)

import pip
import requests
import lockfile
try:
import requests
except:
pass

version = "v1.2.4.2"
_app = None
_ui = None

Expand All @@ -36,34 +36,30 @@ def versiontuple(v):
v = v.replace('v', '')
return tuple(map(int, (v.split("."))))

def install(path, requirementsFileName):
os.makedirs(path, exist_ok=True)
if hasattr(pip, 'main'):
with open(requirementsFileName) as f:
for line in f:
pip.main(['install', '-U', line, '-t', path, '--ignore-installed', '-q'])
else:
with open(requirementsFileName) as f:
from pip._internal import main
for line in f:
main(['install', '-U', line, '-t', path, '--ignore-installed', '-q'])


def update(context):
global version, _ui, isMac
global _ui, isMac
currentFolder = os.path.dirname(os.path.realpath(__file__))
currentFolder = os.path.join(currentFolder, '')
# cwd = os.getcwd()
try:
with open(os.path.join(script_dir,'version.json')) as f:
data = json.load(f)
version = data['tag_name']
print(version)
except:
version = "999"
print('Failed:\n{}'.format(traceback.format_exc()))
pass

releasesURI = 'https://api.github.com/repos/Bitfroest/contentcenter_fusion360/releases'
releasesURI = 'https://custom.hk-fs.de/uploads/version.json'

if isMac:
proc = subprocess.Popen(['curl', releasesURI], stdout=subprocess.PIPE)
(out, err) = proc.communicate()
j = json.loads(out.decode('utf-8'))
tag_name = j[0]['tag_name']
tarball_url = j[0]['tarball_url']
published_at = j[0]['published_at']
tag_name = j['tag_name']
tarball_url = j['tarball_url']
published_at = j['published_at']

if versiontuple(tag_name) > versiontuple(version):
# Check if the URL is reachable
Expand Down Expand Up @@ -99,12 +95,6 @@ def update(context):
# copy all extracted contents to add in folder
shutil.copytree(tempDirectory, os.path.join(currentFolder, ''))

if os.path.isfile(os.path.join(currentFolder, 'requirements.txt')):
modulesFolder= os.path.join(os.path.join(currentFolder, 'modules'), 'modules')
if not os.path.exists(modulesFolder):
os.makedirs(modulesFolder)
install(modulesFolder, os.path.join(currentFolder, 'requirements.txt'))

if os.path.isfile(os.path.join(os.path.join(currentFolder, 'modules'), 'ContentCenter.py')):
# updated and now reload the function
try:
Expand All @@ -118,9 +108,9 @@ def update(context):
r = requests.get(releasesURI)
if r.status_code == 200:
releases = r.json()
tag_name = releases[0]['tag_name']
tarball_url = releases[0]['tarball_url']
published_at = releases[0]['published_at']
tag_name = releases['tag_name']
tarball_url = releases['tarball_url']
published_at = releases['published_at']
# _ui.messageBox(str(tag_name))

if versiontuple(tag_name) > versiontuple(version):
Expand Down Expand Up @@ -158,12 +148,6 @@ def update(context):
# copy all extracted contents to add in folder
shutil.copytree(tempDirectory, os.path.join(currentFolder, ''))

if os.path.isfile(os.path.join(currentFolder, 'requirements.txt')):
modulesFolder= os.path.join(os.path.join(currentFolder, 'modules'), 'modules')
if not os.path.exists(modulesFolder):
os.makedirs(modulesFolder)
install(modulesFolder, os.path.join(currentFolder, 'requirements.txt'))

if os.path.isfile(os.path.join(os.path.join(currentFolder, 'modules'), 'ContentCenter.py')):
# updated and now reload the function
try:
Expand Down
1 change: 0 additions & 1 deletion modules/.gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
/modules
/__pycache__
5 changes: 4 additions & 1 deletion modules/ContentCenter.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,10 @@
module_dir = os.path.abspath(os.path.join(script_dir, "modules"))
sys.path.append(module_dir)

import requests
try:
import requests
except:
pass

# global set of event handlers to keep them referenced for the duration of the command
handlers = []
Expand Down
Binary file added modules/modules/bin/chardetect.exe
Binary file not shown.
45 changes: 45 additions & 0 deletions modules/modules/certifi-2018.11.29.dist-info/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
Certifi: Python SSL Certificates
================================

`Certifi`_ is a carefully curated collection of Root Certificates for
validating the trustworthiness of SSL certificates while verifying the identity
of TLS hosts. It has been extracted from the `Requests`_ project.

Installation
------------

``certifi`` is available on PyPI. Simply install it with ``pip``::

$ pip install certifi

Usage
-----

To reference the installed certificate authority (CA) bundle, you can use the
built-in function::

>>> import certifi

>>> certifi.where()
'/usr/local/lib/python2.7/site-packages/certifi/cacert.pem'

Enjoy!

1024-bit Root Certificates
~~~~~~~~~~~~~~~~~~~~~~~~~~

Browsers and certificate authorities have concluded that 1024-bit keys are
unacceptably weak for certificates, particularly root certificates. For this
reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its
bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key)
certificate from the same CA. Because Mozilla removed these certificates from
its bundle, ``certifi`` removed them as well.

In previous versions, ``certifi`` provided the ``certifi.old_where()`` function
to intentionally re-add the 1024-bit roots back into your bundle. This was not
recommended in production and therefore was removed at the end of 2018.

.. _`Certifi`: https://certifi.io/en/latest/
.. _`Requests`: http://docs.python-requests.org/en/latest/


1 change: 1 addition & 0 deletions modules/modules/certifi-2018.11.29.dist-info/INSTALLER
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
21 changes: 21 additions & 0 deletions modules/modules/certifi-2018.11.29.dist-info/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This packge contains a modified version of ca-bundle.crt:

ca-bundle.crt -- Bundle of CA Root Certificates

Certificate data from Mozilla as of: Thu Nov 3 19:04:19 2011#
This is a bundle of X.509 certificates of public Certificate Authorities
(CA). These were automatically extracted from Mozilla's root certificates
file (certdata.txt). This file can be found in the mozilla source tree:
http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1#
It contains the certificates in PEM format and therefore
can be directly used with curl / libcurl / php_curl, or with
an Apache+mod_ssl webserver for SSL client authentication.
Just configure this file as the SSLCACertificateFile.#

***** BEGIN LICENSE BLOCK *****
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at http://mozilla.org/MPL/2.0/.

***** END LICENSE BLOCK *****
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
69 changes: 69 additions & 0 deletions modules/modules/certifi-2018.11.29.dist-info/METADATA
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
Metadata-Version: 2.0
Name: certifi
Version: 2018.11.29
Summary: Python package for providing Mozilla's CA Bundle.
Home-page: https://certifi.io/
Author: Kenneth Reitz
Author-email: [email protected]
License: MPL-2.0
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)
Classifier: Natural Language :: English
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.3
Classifier: Programming Language :: Python :: 3.4
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7

Certifi: Python SSL Certificates
================================

`Certifi`_ is a carefully curated collection of Root Certificates for
validating the trustworthiness of SSL certificates while verifying the identity
of TLS hosts. It has been extracted from the `Requests`_ project.

Installation
------------

``certifi`` is available on PyPI. Simply install it with ``pip``::

$ pip install certifi

Usage
-----

To reference the installed certificate authority (CA) bundle, you can use the
built-in function::

>>> import certifi

>>> certifi.where()
'/usr/local/lib/python2.7/site-packages/certifi/cacert.pem'

Enjoy!

1024-bit Root Certificates
~~~~~~~~~~~~~~~~~~~~~~~~~~

Browsers and certificate authorities have concluded that 1024-bit keys are
unacceptably weak for certificates, particularly root certificates. For this
reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its
bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key)
certificate from the same CA. Because Mozilla removed these certificates from
its bundle, ``certifi`` removed them as well.

In previous versions, ``certifi`` provided the ``certifi.old_where()`` function
to intentionally re-add the 1024-bit roots back into your bundle. This was not
recommended in production and therefore was removed at the end of 2018.

.. _`Certifi`: https://certifi.io/en/latest/
.. _`Requests`: http://docs.python-requests.org/en/latest/


15 changes: 15 additions & 0 deletions modules/modules/certifi-2018.11.29.dist-info/RECORD
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
certifi-2018.11.29.dist-info/DESCRIPTION.rst,sha256=zHkn1YEe408K2MGitHvHNrp17zRLM4tUVRv_8PJTRKc,1465
certifi-2018.11.29.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
certifi-2018.11.29.dist-info/LICENSE.txt,sha256=anCkv2sBABbVmmS4rkrY3H9e8W8ftFPMLs13HFo0ETE,1048
certifi-2018.11.29.dist-info/METADATA,sha256=NPNIqL3Rn7OYSxKd9-eM_IG52qaoEYXzbLPQYAc7iEo,2408
certifi-2018.11.29.dist-info/RECORD,,
certifi-2018.11.29.dist-info/WHEEL,sha256=5wvfB7GvgZAbKBSE9uX9Zbi6LCL-_KgezgHblXhCRnM,113
certifi-2018.11.29.dist-info/metadata.json,sha256=qQMHCg3rKC0sNjQVdrpaQSXFC6azUQcgV1bA1PB1mLM,1049
certifi-2018.11.29.dist-info/top_level.txt,sha256=KMu4vUCfsjLrkPbSNdgdekS-pVJzBAJFO__nI8NF6-U,8
certifi/__init__.py,sha256=timLpLv3BNcGLLEz2s6gyA34hOhMb4AIPBz0zxOxna8,52
certifi/__main__.py,sha256=FiOYt1Fltst7wk9DRa6GCoBr8qBUxlNQu_MKJf04E6s,41
certifi/__pycache__/__init__.cpython-36.pyc,,
certifi/__pycache__/__main__.cpython-36.pyc,,
certifi/__pycache__/core.cpython-36.pyc,,
certifi/cacert.pem,sha256=zGy4Y1gu9Zy-6CGvg3apdC7kXMm3f1ELolJwNDnBRv0,275834
certifi/core.py,sha256=K_VfM6GwSemTFisUgFWyk__w1m9pCGFRF5zTzO5bGv0,288
6 changes: 6 additions & 0 deletions modules/modules/certifi-2018.11.29.dist-info/WHEEL
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.30.0.a0)
Root-Is-Purelib: true
Tag: py2-none-any
Tag: py3-none-any

1 change: 1 addition & 0 deletions modules/modules/certifi-2018.11.29.dist-info/metadata.json
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
{"classifiers": ["Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Mozilla Public License 2.0 (MPL 2.0)", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7"], "extensions": {"python.details": {"contacts": [{"email": "[email protected]", "name": "Kenneth Reitz", "role": "author"}], "document_names": {"description": "DESCRIPTION.rst", "license": "LICENSE.txt"}, "project_urls": {"Home": "https://certifi.io/"}}}, "generator": "bdist_wheel (0.30.0.a0)", "license": "MPL-2.0", "metadata_version": "2.0", "name": "certifi", "summary": "Python package for providing Mozilla's CA Bundle.", "version": "2018.11.29"}
1 change: 1 addition & 0 deletions modules/modules/certifi-2018.11.29.dist-info/top_level.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
certifi
48 changes: 48 additions & 0 deletions modules/modules/certifi-2018.4.16.dist-info/DESCRIPTION.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
Certifi: Python SSL Certificates
================================

`Certifi`_ is a carefully curated collection of Root Certificates for
validating the trustworthiness of SSL certificates while verifying the identity
of TLS hosts. It has been extracted from the `Requests`_ project.

Installation
------------

``certifi`` is available on PyPI. Simply install it with ``pip``::

$ pip install certifi

Usage
-----

To reference the installed certificate authority (CA) bundle, you can use the
built-in function::

>>> import certifi

>>> certifi.where()
'/usr/local/lib/python2.7/site-packages/certifi/cacert.pem'

Enjoy!

1024-bit Root Certificates
~~~~~~~~~~~~~~~~~~~~~~~~~~

Browsers and certificate authorities have concluded that 1024-bit keys are
unacceptably weak for certificates, particularly root certificates. For this
reason, Mozilla has removed any weak (i.e. 1024-bit key) certificate from its
bundle, replacing it with an equivalent strong (i.e. 2048-bit or greater key)
certificate from the same CA. Because Mozilla removed these certificates from
its bundle, ``certifi`` removed them as well.

In previous versions, ``certifi`` provided the ``certifi.old_where()`` function
to intentionally re-add the 1024-bit roots back into your bundle. This was not
recommended in production and therefore was removed. To assist in migrating old
code, the function ``certifi.old_where()`` continues to exist as an alias of
``certifi.where()``. Please update your code to use ``certifi.where()``
instead. ``certifi.old_where()`` will be removed in 2018.

.. _`Certifi`: http://certifi.io/en/latest/
.. _`Requests`: http://docs.python-requests.org/en/latest/


1 change: 1 addition & 0 deletions modules/modules/certifi-2018.4.16.dist-info/INSTALLER
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
pip
21 changes: 21 additions & 0 deletions modules/modules/certifi-2018.4.16.dist-info/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
This packge contains a modified version of ca-bundle.crt:

ca-bundle.crt -- Bundle of CA Root Certificates

Certificate data from Mozilla as of: Thu Nov 3 19:04:19 2011#
This is a bundle of X.509 certificates of public Certificate Authorities
(CA). These were automatically extracted from Mozilla's root certificates
file (certdata.txt). This file can be found in the mozilla source tree:
http://mxr.mozilla.org/mozilla/source/security/nss/lib/ckfw/builtins/certdata.txt?raw=1#
It contains the certificates in PEM format and therefore
can be directly used with curl / libcurl / php_curl, or with
an Apache+mod_ssl webserver for SSL client authentication.
Just configure this file as the SSLCACertificateFile.#

***** BEGIN LICENSE BLOCK *****
This Source Code Form is subject to the terms of the Mozilla Public License,
v. 2.0. If a copy of the MPL was not distributed with this file, You can obtain
one at http://mozilla.org/MPL/2.0/.

***** END LICENSE BLOCK *****
@(#) $RCSfile: certdata.txt,v $ $Revision: 1.80 $ $Date: 2011/11/03 15:11:58 $
Loading

0 comments on commit d99f05a

Please sign in to comment.