diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml
new file mode 100644
index 0000000..378d477
--- /dev/null
+++ b/.github/workflows/codeql-analysis.yml
@@ -0,0 +1,67 @@
+# For most projects, this workflow file will not need changing; you simply need
+# to commit it to your repository.
+#
+# You may wish to alter this file to override the set of languages analyzed,
+# or to provide custom queries or build logic.
+#
+# ******** NOTE ********
+# We have attempted to detect the languages in your repository. Please check
+# the `language` matrix defined below to confirm you have the correct set of
+# supported CodeQL languages.
+#
+name: "CodeQL"
+
+on:
+ push:
+ branches: [ develop ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ develop ]
+ schedule:
+ - cron: '35 9 * * 6'
+
+jobs:
+ analyze:
+ name: Analyze
+ runs-on: ubuntu-latest
+
+ strategy:
+ fail-fast: false
+ matrix:
+ language: [ 'javascript', 'python' ]
+ # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ]
+ # Learn more:
+ # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Initializes the CodeQL tools for scanning.
+ - name: Initialize CodeQL
+ uses: github/codeql-action/init@v1
+ with:
+ languages: ${{ matrix.language }}
+ # If you wish to specify custom queries, you can do so here or in a config file.
+ # By default, queries listed here will override any specified in a config file.
+ # Prefix the list here with "+" to use these queries and those in the config file.
+ # queries: ./path/to/local/query, your-org/your-repo/queries@main
+
+ # Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
+ # If this step fails, then you should remove it and run the build manually (see below)
+ - name: Autobuild
+ uses: github/codeql-action/autobuild@v1
+
+ # âšī¸ Command-line programs to run using the OS shell.
+ # đ https://git.io/JvXDl
+
+ # âī¸ If the Autobuild fails above, remove it and uncomment the following three lines
+ # and modify them (or add more) to build your code if your project
+ # uses a compiled language
+
+ #- run: |
+ # make bootstrap
+ # make release
+
+ - name: Perform CodeQL Analysis
+ uses: github/codeql-action/analyze@v1
diff --git a/.github/workflows/ossar-analysis.yml b/.github/workflows/ossar-analysis.yml
new file mode 100644
index 0000000..513afd6
--- /dev/null
+++ b/.github/workflows/ossar-analysis.yml
@@ -0,0 +1,44 @@
+# This workflow integrates a collection of open source static analysis tools
+# with GitHub code scanning. For documentation, or to provide feedback, visit
+# https://github.com/github/ossar-action
+name: OSSAR
+
+on:
+ push:
+ branches: [ develop ]
+ pull_request:
+ # The branches below must be a subset of the branches above
+ branches: [ develop ]
+ schedule:
+ - cron: '26 13 * * 4'
+
+jobs:
+ OSSAR-Scan:
+ # OSSAR runs on windows-latest.
+ # ubuntu-latest and macos-latest support coming soon
+ runs-on: windows-latest
+
+ steps:
+ - name: Checkout repository
+ uses: actions/checkout@v2
+
+ # Ensure a compatible version of dotnet is installed.
+ # The [Microsoft Security Code Analysis CLI](https://aka.ms/mscadocs) is built with dotnet v3.1.201.
+ # A version greater than or equal to v3.1.201 of dotnet must be installed on the agent in order to run this action.
+ # GitHub hosted runners already have a compatible version of dotnet installed and this step may be skipped.
+ # For self-hosted runners, ensure dotnet version 3.1.201 or later is installed by including this action:
+ # - name: Install .NET
+ # uses: actions/setup-dotnet@v1
+ # with:
+ # dotnet-version: '3.1.x'
+
+ # Run open source static analysis tools
+ - name: Run OSSAR
+ uses: github/ossar-action@v1
+ id: ossar
+
+ # Upload results to the Security tab
+ - name: Upload OSSAR results
+ uses: github/codeql-action/upload-sarif@v1
+ with:
+ sarif_file: ${{ steps.ossar.outputs.sarifFile }}
diff --git a/.gitignore b/.gitignore
index 620be43..1cfc82f 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,36 +1,28 @@
-env
-dump
-config-bos-mint.yaml
-
-config-bos-mint.yaml
-
+.idea/
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
-*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
+env/
build/
develop-eggs/
dist/
downloads/
eggs/
-.eggs/
lib/
lib64/
parts/
sdist/
var/
-wheels/
-share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
-MANIFEST
+*.eggs
# PyInstaller
# Usually these files are written by a python script from a template
@@ -45,17 +37,10 @@ pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
-.nox/
.coverage
-.coverage.*
.cache
nosetests.xml
coverage.xml
-*.cover
-*.py,cover
-.hypothesis/
-.pytest_cache/
-cover/
# Translations
*.mo
@@ -63,82 +48,15 @@ cover/
# Django stuff:
*.log
-local_settings.py
-db.sqlite3
-db.sqlite3-journal
-
-# Flask stuff:
-instance/
-.webassets-cache
-
-# Scrapy stuff:
-.scrapy
# Sphinx documentation
docs/_build/
+docs/html
# PyBuilder
-.pybuilder/
target/
-# Jupyter Notebook
-.ipynb_checkpoints
-
-# IPython
-profile_default/
-ipython_config.py
-
-# pyenv
-# For a library or package, you might want to ignore these files since the code is
-# intended to run in multiple environments; otherwise, check them in:
-# .python-version
-
-# pipenv
-# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
-# However, in case of collaboration, if having platform-specific dependencies or dependencies
-# having no cross-platform support, pipenv may install dependencies that don't work, or not
-# install all needed dependencies.
-#Pipfile.lock
-
-# PEP 582; used by e.g. github.com/David-OConnor/pyflow
-__pypackages__/
-
-# Celery stuff
-celerybeat-schedule
-celerybeat.pid
-
-# SageMath parsed files
-*.sage.py
-
-# Environments
-.env
-.venv
-env/
-venv/
-ENV/
-env.bak/
-venv.bak/
-
-# Spyder project settings
-.spyderproject
-.spyproject
-
-# Rope project settings
-.ropeproject
-
-# mkdocs documentation
-/site
-
-# mypy
-.mypy_cache/
-.dmypy.json
-dmypy.json
-
-# Pyre type checker
-.pyre/
-
-# pytype static type analyzer
-.pytype/
+# Vim temp files
+*.swp
-# Cython debug symbols
-cython_debug/
+.ropeproject/
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index c210439..0e538d3 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -13,6 +13,7 @@ gemnasium-python-dependency_scanning:
stages:
- test
+ - deploy
test:
stage: test
@@ -20,3 +21,12 @@ test:
- apt-get update -qy
- apt-get install -y python3-dev python3-pip build-essential sqlite3
- pip3 install -r requirements.txt
+
+deployToDev:
+ stage: deploy
+ script:
+ - deployToDev
+ tags:
+ - cp1
+ only:
+ - develop
\ No newline at end of file
diff --git a/README.md b/README.md
index 2b1b2f4..59edcbe 100644
--- a/README.md
+++ b/README.md
@@ -2,22 +2,36 @@
The project is a web based implementation of couch potato.
+## Requirements
+- Python 3
+- Virtualenv
+- GCC
+- Git
+- MongoDB
+- SQLite
+
+### Ubuntu 18+
+```bash
+sudo apt-get update
+sudo apt-get install python3 python3-venv python3-dev build-essential git mongodb libmysqlclient-dev -y
+```
+
## Installation
-```bash
+```bash
cd python-cp-gui
python3 -m venv env
source env/bin/activate
pip3 install -r requirements.txt
+# Configure config-bos-mint.yaml
+cd couchpotato
+cp example-config-bos-mint.yaml config-bos-mint.yaml
```
-
-
### First Run
-Modify config-bos-mint.yaml
-
```bash
+cd python-cp-gui
source env/bin/activate
cd couchpotato/scripts/
./install.sh
@@ -26,7 +40,9 @@ cd couchpotato/scripts/
This operation will clear all the existing users
## Usage
+
```bash
+cd python-cp-gui
source env/bin/activate
cd couchpotato
python3 manage.py runserver 0.0.0.0:9010
@@ -41,4 +57,15 @@ openAPI 2.0 documentation is available at /swagger and /redoc
## Uninsallation
Delete the python-cp-gui folder
+## TLS
+To run development cerver with TLS
+python3 manage.py runsslserver 0.0.0.0:9020
+
+To generate self signed certificates
+sudo openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout tls.key -out tls.crt
+
+To run with certificates
+python3 manage.py runsslserver 0.0.0.0:9020 --certificate tls.crt --key tls.key
+
+
diff --git a/__version__ b/__version__
index 0ea3a94..0d91a54 100644
--- a/__version__
+++ b/__version__
@@ -1 +1 @@
-0.2.0
+0.3.0
diff --git a/couchpotato/calender/__init__.py b/couchpotato/calender/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/couchpotato/calender/admin.py b/couchpotato/calender/admin.py
new file mode 100644
index 0000000..8c38f3f
--- /dev/null
+++ b/couchpotato/calender/admin.py
@@ -0,0 +1,3 @@
+from django.contrib import admin
+
+# Register your models here.
diff --git a/couchpotato/calender/apps.py b/couchpotato/calender/apps.py
new file mode 100644
index 0000000..811332c
--- /dev/null
+++ b/couchpotato/calender/apps.py
@@ -0,0 +1,5 @@
+from django.apps import AppConfig
+
+
+class CalenderConfig(AppConfig):
+ name = 'calender'
diff --git a/couchpotato/calender/migrations/__init__.py b/couchpotato/calender/migrations/__init__.py
new file mode 100644
index 0000000..e69de29
diff --git a/couchpotato/calender/models.py b/couchpotato/calender/models.py
new file mode 100644
index 0000000..71a8362
--- /dev/null
+++ b/couchpotato/calender/models.py
@@ -0,0 +1,3 @@
+from django.db import models
+
+# Create your models here.
diff --git a/couchpotato/calender/templates/calender.html b/couchpotato/calender/templates/calender.html
new file mode 100644
index 0000000..43c3aea
--- /dev/null
+++ b/couchpotato/calender/templates/calender.html
@@ -0,0 +1,241 @@
+{% load static %}
+
+
+
+