diff --git a/.vscode/settings.json b/.vscode/settings.json new file mode 100644 index 0000000..645ad3d --- /dev/null +++ b/.vscode/settings.json @@ -0,0 +1,3 @@ +{ + "python.pythonPath": "venv/bin/python3.8" +} \ No newline at end of file diff --git a/buildozer.spec b/buildozer.spec index a05d57b..967245b 100644 --- a/buildozer.spec +++ b/buildozer.spec @@ -41,7 +41,7 @@ requirements = python3,setuptools,requests,certifi,urllib3,chardet,idna,sqlite3, # (str) Custom source folders for requirements # Sets custom source for any requirements with recipes # requirements.source.kivy = ../../kivy -#requirements.source.kivy = ../kivysrc +# requirements.source.kivy = %(source.dir)s/kivysrc # (list) Garden requirements #garden_requirements = diff --git a/cleanup.sh b/cleanup.sh index 37e4e16..430db0d 100755 --- a/cleanup.sh +++ b/cleanup.sh @@ -2,6 +2,13 @@ # cleanup virtual environment rm -fr venv +rm -fr __pycache__ + +# cleanup cache +#mapview +rm -fr cache +#mozilla +rm -fr .cache # cleanup buildozer dirs rm -fr .buildozer diff --git a/cncbot.py b/cncbot.py index 44cbe48..a2df6df 100644 --- a/cncbot.py +++ b/cncbot.py @@ -16,7 +16,7 @@ class ForestBot(pydle.Client): async def on_connect(self): await super().on_connect() await self.join(CNC_CHANNEL) - await self.message(CNC_CHANNEL, '] {}'.format(MOTD)) + await self.message(CNC_CHANNEL, MOTD) async def is_admin(self, nickname): """ diff --git a/forestmapview.kv b/forestmapview.kv index 2e9aef5..f4d7b9a 100644 --- a/forestmapview.kv +++ b/forestmapview.kv @@ -4,7 +4,6 @@ #:include treemarker.kv : - url: "http://forest.deflax.net:8111/tile/{z}/{x}/{y}.png" lat: 42.131331 lon: 24.747571 zoom: 17 diff --git a/forestmapview.py b/forestmapview.py index 432fc71..fb21fe0 100644 --- a/forestmapview.py +++ b/forestmapview.py @@ -1,15 +1,15 @@ from kivy.app import App from kivy.clock import Clock -from kivy_garden.mapview import MapView +from kivy_garden.mapview import MapView, MapSource from treemarker import TreeMarker class ForestMapView(MapView): get_trees_timer = None tree_names = [] - - #def on_zoom(self, *args): - # self.zoom = 10 + map_source = MapSource(url="http://forest.deflax.net/tile/{z}/{x}/{y}.png", + cache_key="forest-map", tile_size=256, + image_ext="png", attribution="@ afx") def print_current_zoom(self, *args): print("] Zoom level: " + str(self.zoom))