Drop python2. PIL everywhere. Bootstrap serve local (#1)
* all local * local ref * typo * proper local * remove static
This commit is contained in:
parent
be79b63627
commit
56f7e9f152
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,2 +1,3 @@
|
||||
__pycache__/
|
||||
*.pem
|
||||
*.pem
|
||||
.venv
|
12
screen.py
12
screen.py
@ -23,12 +23,7 @@ if ver==2:
|
||||
elif ver==3:
|
||||
import io
|
||||
|
||||
if sys.platform in ["win32", "darwin"]:
|
||||
from PIL import ImageGrab as ig
|
||||
else:
|
||||
import pyscreenshot as ig
|
||||
bkend = "pygdk3"
|
||||
|
||||
from PIL import ImageGrab as ig
|
||||
|
||||
class Screen():
|
||||
def __init__(self):
|
||||
@ -46,10 +41,7 @@ class Screen():
|
||||
|
||||
def getframes(self):
|
||||
while True:
|
||||
if sys.platform in ["win32", "darwin"]:
|
||||
im = ig.grab()
|
||||
else:
|
||||
im = ig.grab(childprocess=False,backend=bkend)
|
||||
im = ig.grab()
|
||||
self.screenfile.seek(0)
|
||||
self.screenfile.truncate(0)
|
||||
im_converted = im.convert("RGB")
|
||||
|
@ -26,8 +26,10 @@ secret_key = u'f71b10b68b1bc00019cfc50d6ee817e75d5441bd5db0bd83453b398225cede69'
|
||||
|
||||
app = Flask(__name__)
|
||||
app.secret_key = secret_key
|
||||
app.config['BOOTSTRAP_SERVE_LOCAL'] = True
|
||||
Bootstrap(app)
|
||||
|
||||
|
||||
###### general ##########################################
|
||||
@app.route('/')
|
||||
def welcome():
|
||||
|
@ -32,13 +32,16 @@ along with Screenshare. If not, see <https://www.gnu.org/licenses/>.
|
||||
<link rel="stylesheet" href="{{url_for('static', filename='css/jquery-confirm.min.css')}}"/>
|
||||
|
||||
<link rel="stylesheet" href="{{url_for('static', filename='css/common.css')}}?ver=2"/>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block scripts %}
|
||||
{{super()}}
|
||||
|
||||
<script src="{{url_for('static', filename='js/jquery-confirm.min.js')}}"></script>
|
||||
|
||||
<script src="{{url_for('static', filename='js/screen.js')}}?ver=3"></script>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block body_attribs %}
|
||||
|
Loading…
x
Reference in New Issue
Block a user