├── AssetManagerKV.iml
├── config.py
├── assetEE.py
├── README.md
├── .gitignore
├── assetman.kv
├── LICENSE
└── main.py
/AssetManagerKV.iml:
--------------------------------------------------------------------------------
1 |
2 |
3 |
4 |
5 |
6 |
7 |
8 |
9 |
--------------------------------------------------------------------------------
/config.py:
--------------------------------------------------------------------------------
1 | # -*- coding: utf-8 -*-
2 | # colors dict
3 | import ee
4 | ee.Initialize()
5 |
6 | COLORS = {"red": (1, 0, 0, 0.8),
7 | "green": (0, 1, 0, 0.8),
8 | "blue": (0, 0, 1, 0.8),
9 | "black": (0, 0, 0, 0.8)}
10 |
11 | # coltype dict
12 | COLTYPE = {"Folder": COLORS["blue"],
13 | "ImageCollection": COLORS["green"],
14 | "Image": COLORS["red"],
15 | "unk": COLORS["black"]}
16 |
17 | USER = ee.data.getAssetRoots()[0]['id']
--------------------------------------------------------------------------------
/assetEE.py:
--------------------------------------------------------------------------------
1 | #!/usr/bin/env python2
2 | # -*- coding: utf-8 -*-
3 | """
4 | Created on Mon May 22 10:46:12 2017
5 |
6 | @author: Rodrigo E. Principe
7 | """
8 | import ee
9 | ee.Initialize()
10 |
11 | def recrusive_delete_asset(assetId):
12 | try:
13 | content = ee.data.getList({'id':assetId})
14 | except:
15 | return
16 |
17 | if len(content) == 0:
18 | ee.data.deleteAsset(assetId)
19 | else:
20 | for asset in content:
21 | path = asset['id']
22 | ty = asset['type']
23 | if ty == 'Image':
24 | ee.data.deleteAsset(path)
25 | else:
26 | recrusive_delete_asset(path)
27 |
28 | def getAssetAcl(assetId):
29 | return ee.data.getAssetAcl(assetId)
30 |
31 | def setAssetAcl(assetId, aclUpdate):
32 | return ee.data.setAssetAcl(assetId, aclUpdate)
--------------------------------------------------------------------------------
/README.md:
--------------------------------------------------------------------------------
1 | # Standalone Asset Manager for Google Earth Engine
2 | ###### *Made with kivy framework*
3 | #### It's main purpose is to perform some task over many assets, like delete or share.
4 |
5 | ## How to run it
6 |
7 | ### Install dependencies
8 | 1. [Kivy](https://kivy.org/docs/installation/installation.html)
9 | 2. [Google Earth Engine Python API](https://developers.google.com/earth-engine/python_install)
10 |
11 | *Tested only in Linux Mint 18 MATE (more coming..)*
12 |
13 | ### Download source code
14 | ######*(not binaries yet)*
15 | If you have [git](https://git-scm.com/) do:
16 |
17 | > git clone https://github.com/fitoprincipe/AssetManagerKV
18 |
19 | If you have not git and don't want to install it, download from [github](https://github.com/fitoprincipe/AssetManagerKV)
20 |
21 | ### Execute
22 |
23 | - Open a terminal (in Windows a *prompt* or *cmd*)
24 | - Navigate to the source code folder
25 | - Write:
26 |
27 | > python main.py
28 |
29 | ## Some aspects
30 |
31 | ### Colors
32 |
33 | - **Folders** are blue
34 | - **ImageCollection** are green
35 | - **Image** are red
36 |
37 | The header color is random
38 |
39 | ### Others
40 | - Refresh button don't work yet
41 | - When you delete or share several assets it seems like it hungs, and may hang, but usually does not hang
--------------------------------------------------------------------------------
/.gitignore:
--------------------------------------------------------------------------------
1 | # Created by .ignore support plugin (hsz.mobi)
2 | ### Python template
3 | # Byte-compiled / optimized / DLL files
4 | __pycache__/
5 | *.py[cod]
6 | *$py.class
7 |
8 | # C extensions
9 | *.so
10 |
11 | # Distribution / packaging
12 | .Python
13 | build/
14 | develop-eggs/
15 | dist/
16 | downloads/
17 | eggs/
18 | .eggs/
19 | lib/
20 | lib64/
21 | parts/
22 | sdist/
23 | var/
24 | wheels/
25 | *.egg-info/
26 | .installed.cfg
27 | *.egg
28 | MANIFEST
29 |
30 | # PyInstaller
31 | # Usually these files are written by a python script from a template
32 | # before PyInstaller builds the exe, so as to inject date/other infos into it.
33 | *.manifest
34 | *.spec
35 |
36 | # Installer logs
37 | pip-log.txt
38 | pip-delete-this-directory.txt
39 |
40 | # Unit test / coverage reports
41 | htmlcov/
42 | .tox/
43 | .coverage
44 | .coverage.*
45 | .cache
46 | nosetests.xml
47 | coverage.xml
48 | *.cover
49 | .hypothesis/
50 |
51 | # Translations
52 | *.mo
53 | *.pot
54 |
55 | # Django stuff:
56 | *.log
57 | .static_storage/
58 | .media/
59 | local_settings.py
60 |
61 | # Flask stuff:
62 | instance/
63 | .webassets-cache
64 |
65 | # Scrapy stuff:
66 | .scrapy
67 |
68 | # Sphinx documentation
69 | docs/_build/
70 |
71 | # PyBuilder
72 | target/
73 |
74 | # Jupyter Notebook
75 | .ipynb_checkpoints
76 |
77 | # pyenv
78 | .python-version
79 |
80 | # celery beat schedule file
81 | celerybeat-schedule
82 |
83 | # SageMath parsed files
84 | *.sage.py
85 |
86 | # Environments
87 | .env
88 | .venv
89 | env/
90 | venv/
91 | ENV/
92 | env.bak/
93 | venv.bak/
94 |
95 | # Spyder project settings
96 | .spyderproject
97 | .spyproject
98 |
99 | # Rope project settings
100 | .ropeproject
101 |
102 | # mkdocs documentation
103 | /site
104 |
105 | # mypy
106 | .mypy_cache/
107 |
108 | # IDEA
109 | .idea
110 | AssetManagerKV.iml
111 |
--------------------------------------------------------------------------------
/assetman.kv:
--------------------------------------------------------------------------------
1 | #:import ran random.random
2 |
3 | :
4 | # BoxLayout
5 | orientation: "vertical"
6 | Menu:
7 | id: menu
8 |
9 |