Merge pull request #989 from pierotofy/desktop

Desktop mode
pull/995/head v1.9.0
Piero Toffanin 2021-05-31 13:53:09 -04:00 zatwierdzone przez GitHub
commit ecdb3eb22c
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 4AEE18F83AFDEB23
31 zmienionych plików z 413 dodań i 258 usunięć

Wyświetl plik

@ -20,7 +20,6 @@ RUN apt-get -qq update && apt-get -qq install -y nodejs
# Install Python3, GDAL, nginx, letsencrypt, psql
RUN apt-get -qq update && apt-get -qq install -y --no-install-recommends python3 python3-pip python3-setuptools python3-wheel git g++ python3-dev python2.7-dev libpq-dev binutils libproj-dev gdal-bin python3-gdal nginx certbot grass-core gettext-base cron postgresql-client-12 gettext
RUN update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 && update-alternatives --install /usr/bin/python python /usr/bin/python3.8 2
RUN ln -s /usr/bin/pip3 /usr/bin/pip && pip install -U pip
# Install pip reqs
ADD requirements.txt /webodm/
@ -40,8 +39,8 @@ WORKDIR /webodm
RUN npm install --quiet -g webpack@4.16.5 && npm install --quiet -g webpack-cli@4.2.0 && npm install --quiet && webpack --mode production
RUN echo "UTC" > /etc/timezone
RUN python manage.py collectstatic --noinput
RUN bash app/scripts/plugin_cleanup.sh && echo "from app.plugins import build_plugins;build_plugins()" | python manage.py shell
RUN bash translate.sh build safe
RUN python manage.py rebuildplugins
RUN python manage.py translate build --safe
# Cleanup
RUN apt-get remove -y g++ python3-dev libpq-dev && apt-get autoremove -y

Wyświetl plik

@ -1,4 +1,5 @@
import os
import sys
import kombu
from django.contrib.auth.models import Permission
@ -82,7 +83,7 @@ def boot():
s.app_logo.save(os.path.basename(settings.APP_DEFAULT_LOGO), File(open(settings.APP_DEFAULT_LOGO, 'rb')))
logger.info("Created settings")
init_plugins()
if not settings.TESTING:

Wyświetl plik

@ -0,0 +1,23 @@
import os
from django.core.management.base import BaseCommand
from nodeodm.models import ProcessingNode
class Command(BaseCommand):
requires_system_checks = []
def add_arguments(self, parser):
parser.add_argument("host", type=str)
parser.add_argument("port", type=int)
parser.add_argument("--label", type=str, required=False, default="", help="Node label")
parser.add_argument("--token", type=str, required=False, default="", help="Node token")
super(Command, self).add_arguments(parser)
def handle(self, **options):
ProcessingNode.objects.update_or_create(hostname=options.get('host'),
defaults={
'hostname': options.get('host'),
'port': options.get('port'),
'label': options.get('label', ''),
'token': options.get('token', '')
})

Wyświetl plik

@ -0,0 +1,27 @@
import os
import shutil
import glob
from django.core.management.base import BaseCommand
from app.plugins import build_plugins
def cleanup():
# Delete all node_modules and build directories within plugins' public/ folders
root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", ".."))
for d in glob.glob(os.path.join(root, "plugins", "**", "public", "node_modules")):
shutil.rmtree(d)
print("R\t" + d)
for d in glob.glob(os.path.join(root, "plugins", "**", "public", "build")):
shutil.rmtree(d)
print("R\t" + d)
print("Cleanup done!")
class Command(BaseCommand):
requires_system_checks = []
def add_arguments(self, parser):
super(Command, self).add_arguments(parser)
def handle(self, **options):
cleanup()
build_plugins()

Wyświetl plik

@ -0,0 +1,54 @@
import os
from django.core.management.base import BaseCommand
from django.core.management import call_command
from app.scripts.extract_odm_strings import extract_odm_strings
from app.scripts.extract_plugin_manifest_strings import extract_plugin_manifest_strings
from app.scripts.extract_potree_strings import extract_potree_strings
root = os.path.abspath(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..", "..", ".."))
class Command(BaseCommand):
requires_system_checks = []
def add_arguments(self, parser):
parser.add_argument("action", type=str, choices=['extract', 'build'])
parser.add_argument("--safe", action='store_true', required=False, help="Skip invalid languages")
super(Command, self).add_arguments(parser)
def handle(self, **options):
with open(os.path.join(root, "LOCALES")) as f:
locales = f.read().strip().split(" ")
if options.get('action') == 'extract':
print("Extracting .po files from Django/React")
locale_params = ["--locale=%s" % l for l in locales]
locale_dir = os.path.join(root, "locale")
if not os.path.exists(locale_dir):
os.mkdir(locale_dir)
extract_potree_strings(
os.path.join(root, "app", "static", "app", "js", "vendor", "potree", "build", "potree", "resources", "lang", "en", "translation.json"),
os.path.join(root, "app", "static", "app", "js", "translations", "potree_autogenerated.js")
)
extract_odm_strings(
"https://raw.githubusercontent.com/OpenDroneMap/ODM/master/opendm/config.py",
os.path.join(root, "app", "static", "app", "js", "translations", "odm_autogenerated.js")
)
extract_plugin_manifest_strings(
os.path.join(root, "plugins"),
os.path.join(root, "app", "translations", "plugin_manifest_autogenerated.py")
)
call_command('makemessages', '--keep-pot', *locale_params, '--ignore=build', '--ignore=app/templates/app/registration/*')
call_command('makemessages_djangojs', '--keep-pot', *locale_params, '-d=djangojs', '--extension=jsx', '--extension=js', '--ignore=build', '--ignore=app/static/app/js/vendor', '--ignore=app/static/app/bundles', '--ignore=node_modules', '--language=Python')
elif options.get('action') == 'build':
if options.get('safe'):
for l in locales:
print("Building %s .po files into .mo" % l)
call_command('compilemessages', '--locale=%s' % l)
else:
print("Building .po files into .mo")
call_command('compilemessages')

Wyświetl plik

@ -26,8 +26,6 @@ class GrassEngine:
if self.grass_binary is None:
logger.warning("Could not find a GRASS 7 executable. GRASS scripts will not work.")
else:
logger.info("Initializing GRASS engine using {}".format(self.grass_binary))
def create_context(self, serialized_context = {}):
if self.grass_binary is None: raise GrassEngineException("GRASS engine is unavailable")

Wyświetl plik

@ -41,7 +41,7 @@ class PluginBase(ABC):
if not os.path.exists(self.get_python_packages_path()):
os.makedirs(self.get_python_packages_path(), exist_ok=True)
p = subprocess.Popen(['pip', 'install', '-U', '-r', 'requirements.txt',
p = subprocess.Popen(['python', '-m', 'pip', 'install', '-U', '-r', 'requirements.txt',
'--target', self.get_python_packages_path()],
cwd=self.get_path())
p.wait()

Wyświetl plik

@ -27,7 +27,7 @@ def requirements_installed(requirements_file, python_path):
"""
env = os.environ.copy()
env["PYTHONPATH"] = env.get("PYTHONPATH", "") + ":" + python_path
reqs = subprocess.check_output(['pip', 'freeze'], env=env)
reqs = subprocess.check_output(['python', '-m', 'pip', 'freeze'], env=env)
installed_packages = [r.decode().split('==')[0] for r in reqs.split()]
deps = parse_requirements(requirements_file)

Wyświetl plik

Wyświetl plik

@ -3,52 +3,6 @@
import argparse, os, urllib.request, ast, sys
from io import StringIO
parser = argparse.ArgumentParser(description='Extract ODM strings.')
parser.add_argument('input', type=str,
help='URL to ODM\'s config.py')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
url = args.input
outfile = args.output
strings = []
print("Fetching %s ..." % url)
res = urllib.request.urlopen(url)
config_file = res.read().decode('utf-8')
# config_file = open("test.py").read()
options = {}
class ArgumentParserStub(argparse.ArgumentParser):
def add_argument(self, *args, **kwargs):
argparse.ArgumentParser.add_argument(self, *args, **kwargs)
options[args[0]] = {}
for name, value in kwargs.items():
options[args[0]][str(name)] = str(value)
def add_mutually_exclusive_group(self):
return ArgumentParserStub()
# Voodoo! :)
# ( parse AST, extract "def config()" function, set module to only
# contain that function, execute module in current scope,
# run config function)
root = ast.parse(config_file)
new_body = []
for stmt in root.body:
# Assignments
if hasattr(stmt, 'targets'):
new_body.append(stmt)
# Functions
elif hasattr(stmt, 'name'):
new_body.append(stmt)
root.body = new_body
exec(compile(root, filename="<ast>", mode="exec"))
# Misc variables needed to get config to run
__version__ = '?'
class context:
@ -63,22 +17,72 @@ class log:
def ODM_ERROR(s):
pass
config(["--project-path", "/bogus", "name"], parser=ArgumentParserStub())
for opt in options:
h = options[opt].get('help')
if h:
h = h.replace("\n", "")
strings.append(h)
def extract_odm_strings(url, outfile):
strings = []
print("Fetching %s ..." % url)
res = urllib.request.urlopen(url)
config_file = res.read().decode('utf-8')
# config_file = open("test.py").read()
strings = list(set(strings))
print("Found %s ODM strings" % len(strings))
if len(strings) > 0:
with open(outfile, "w") as f:
f.write("// Auto-generated with extract_odm_strings.py, do not edit!\n\n")
options = {}
class ArgumentParserStub(argparse.ArgumentParser):
def add_argument(self, *args, **kwargs):
argparse.ArgumentParser.add_argument(self, *args, **kwargs)
options[args[0]] = {}
for name, value in kwargs.items():
options[args[0]][str(name)] = str(value)
def add_mutually_exclusive_group(self):
return ArgumentParserStub()
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
# Voodoo! :)
# ( parse AST, extract "def config()" function, set module to only
# contain that function, execute module in current scope,
# run config function)
root = ast.parse(config_file)
new_body = []
for stmt in root.body:
# Assignments
if hasattr(stmt, 'targets'):
new_body.append(stmt)
print("Wrote %s" % outfile)
else:
print("No strings found")
# Functions
elif hasattr(stmt, 'name'):
new_body.append(stmt)
root.body = new_body
exec(compile(root, filename="<ast>", mode="exec"), globals())
config(["--project-path", "/bogus", "name"], parser=ArgumentParserStub())
for opt in options:
h = options[opt].get('help')
if h:
h = h.replace("\n", "")
strings.append(h)
strings = list(set(strings))
print("Found %s ODM strings" % len(strings))
if len(strings) > 0:
with open(outfile, "w") as f:
f.write("// Auto-generated with extract_odm_strings.py, do not edit!\n\n")
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
print("Wrote %s" % outfile)
else:
print("No strings found")
if __name__ == "__main__":
parser = argparse.ArgumentParser(description='Extract ODM strings.')
parser.add_argument('input', type=str,
help='URL to ODM\'s config.py')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
url = args.input
outfile = args.output

Wyświetl plik

@ -1,33 +1,37 @@
#!/usr/bin/python3
import argparse, json, os, glob
import json, os, glob
parser = argparse.ArgumentParser(description='Extract plugin manifest strings.')
parser.add_argument('input', type=str,
help='Path to plugins directory')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
def extract_plugin_manifest_strings(plugins_dir, output):
strings = []
manifests = glob.glob(os.path.join(plugins_dir, "*", "manifest.json"), recursive=True)
print("Found %s manifests" % len(manifests))
strings = []
manifests = glob.glob(os.path.join(args.input, "*", "manifest.json"), recursive=True)
print("Found %s manifests" % len(manifests))
for m in manifests:
with open(m) as f:
j = json.loads(f.read())
if j.get("description"):
strings.append(j.get("description"))
for m in manifests:
with open(m) as f:
j = json.loads(f.read())
if j.get("description"):
strings.append(j.get("description"))
print("Found %s manifest strings" % len(strings))
if len(strings) > 0:
with open(output, "w") as f:
f.write("// Auto-generated with extract_plugin_manifest_strings.py, do not edit!\n\n")
f.write("from django.utils.translation import gettext as _\n")
for s in strings:
f.write("_(\"%s\")\n" % s.replace("\"", "\\\""))
print("Found %s manifest strings" % len(strings))
if len(strings) > 0:
with open(args.output, "w") as f:
f.write("// Auto-generated with extract_plugin_manifest_strings.py, do not edit!\n\n")
f.write("from django.utils.translation import gettext as _\n")
for s in strings:
f.write("_(\"%s\")\n" % s.replace("\"", "\\\""))
print("Wrote %s" % output)
else:
print("No strings found")
print("Wrote %s" % args.output)
else:
print("No strings found")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Extract plugin manifest strings.')
parser.add_argument('input', type=str,
help='Path to plugins directory')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
extract_plugin_manifest_strings(args.input, args.output)

Wyświetl plik

@ -1,31 +1,35 @@
#!/usr/bin/python3
import argparse, json, os
import json, os
parser = argparse.ArgumentParser(description='Extract Potree strings.')
parser.add_argument('input', type=str,
help='Path to Potree\'s english translation.json')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
def extract_potree_strings(translation_json, output):
strings = []
with open(translation_json) as f:
j = json.loads(f.read())
for section in j:
s = j[section]
for k in s:
english_str = s[k]
strings.append(english_str)
strings = []
with open(args.input) as f:
j = json.loads(f.read())
for section in j:
s = j[section]
for k in s:
english_str = s[k]
strings.append(english_str)
print("Found %s Potree strings" % len(strings))
if len(strings) > 0:
with open(output, "w") as f:
f.write("// Auto-generated with extract_potree_strings.py, do not edit!\n\n")
print("Found %s Potree strings" % len(strings))
if len(strings) > 0:
with open(args.output, "w") as f:
f.write("// Auto-generated with extract_potree_strings.py, do not edit!\n\n")
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
for s in strings:
f.write("_(\"%s\");\n" % s.replace("\"", "\\\""))
print("Wrote %s" % output)
else:
print("No strings found")
print("Wrote %s" % args.output)
else:
print("No strings found")
if __name__ == "__main__":
import argparse
parser = argparse.ArgumentParser(description='Extract Potree strings.')
parser.add_argument('input', type=str,
help='Path to Potree\'s english translation.json')
parser.add_argument('output', type=str,
help='Where to write resulting translation file')
args = parser.parse_args()
extract_potree_strings(args.input, args.output)

Wyświetl plik

@ -1,8 +0,0 @@
#!/bin/bash
# Delete all node_modules and build directories within plugins' public/ folders
__dirname=$(cd $(dirname "$0"); pwd -P)
cd "${__dirname}/../../"
find plugins/ -type d \( -name build -o -name node_modules \) -path 'plugins/*/public/*' -exec rm -frv '{}' \;
echo "Done!"

Wyświetl plik

@ -84,6 +84,10 @@ html, body, section.main, .content, #wrapper, #page-wrapper{
}
}
.sidebar-nav.navbar-collapse{
width: 100%;
}
.navbar-top-links li a.dropdown-toggle{
height: 50px;
}

Wyświetl plik

@ -10,14 +10,16 @@ class MapView extends React.Component {
mapItems: [],
selectedMapType: 'orthophoto',
title: "",
public: false
public: false,
shareButtons: true
};
static propTypes = {
mapItems: PropTypes.array.isRequired, // list of dictionaries where each dict is a {mapType: 'orthophoto', url: <tiles.json>},
selectedMapType: PropTypes.oneOf(['orthophoto', 'plant', 'dsm', 'dtm']),
title: PropTypes.string,
public: PropTypes.bool
public: PropTypes.bool,
shareButtons: PropTypes.bool
};
constructor(props){
@ -106,6 +108,7 @@ class MapView extends React.Component {
showBackground={true}
mapType={this.state.selectedMapType}
public={this.props.public}
shareButtons={this.props.shareButtons}
/>
</div>
</div>);

Wyświetl plik

@ -75,12 +75,14 @@ class CamerasMenu extends React.Component{
class ModelView extends React.Component {
static defaultProps = {
task: null,
public: false
public: false,
shareButtons: true
};
static propTypes = {
task: PropTypes.object.isRequired, // The object should contain two keys: {id: <taskId>, project: <projectId>}
public: PropTypes.bool // Is the view being displayed via a shared link?
public: PropTypes.bool, // Is the view being displayed via a shared link?
shareButtons: PropTypes.bool
};
constructor(props){
@ -499,7 +501,7 @@ class ModelView extends React.Component {
direction="up"
showLabel={false}
buttonClass="btn-secondary" />
{(!this.props.public) ?
{(this.props.shareButtons && !this.props.public) ?
<ShareButton
ref={(ref) => { this.shareButton = ref; }}
task={this.props.task}

Wyświetl plik

@ -32,14 +32,16 @@ class Map extends React.Component {
static defaultProps = {
showBackground: false,
mapType: "orthophoto",
public: false
public: false,
shareButtons: true
};
static propTypes = {
showBackground: PropTypes.bool,
tiles: PropTypes.array.isRequired,
mapType: PropTypes.oneOf(['orthophoto', 'plant', 'dsm', 'dtm']),
public: PropTypes.bool
public: PropTypes.bool,
shareButtons: PropTypes.bool
};
constructor(props) {
@ -536,7 +538,7 @@ _('Example:'),
<div className="actionButtons">
{this.state.pluginActionButtons.map((button, i) => <div key={i}>{button}</div>)}
{(!this.props.public && this.state.singleTask !== null) ?
{(this.props.shareButtons && !this.props.public && this.state.singleTask !== null) ?
<ShareButton
ref={(ref) => { this.shareButton = ref; }}
task={this.state.singleTask}

Wyświetl plik

@ -4,6 +4,7 @@ import ReactDOM from 'react-dom';
import React from 'react';
import $ from 'jquery';
import PluginsAPI from './classes/plugins/API';
import { setLocale } from './translations/functions';
// Main is always executed first in the page
@ -12,6 +13,9 @@ import PluginsAPI from './classes/plugins/API';
window.ReactDOM = ReactDOM;
window.React = React;
// Expose set locale function globally
window.setLocale = setLocale;
$(function(){
PluginsAPI.App.triggerReady();
});

Wyświetl plik

@ -0,0 +1,20 @@
import $ from 'jquery';
function setLocale(locale){
var fd = new FormData();
fd.append('language', locale);
$.ajax({
url: `/i18n/setlang/`,
contentType: false,
processData: false,
data: fd,
type: 'POST'
}).done(function(){
location.reload(true);
}).fail(function(e){
console.error("Cannot set locale", e);
});
}
export { setLocale };

Wyświetl plik

@ -1,81 +1,81 @@
// Auto-generated with extract_odm_strings.py, do not edit!
_("Keep faces in the mesh that are not seen in any camera. Default: %(default)s");
_("Name of dataset (i.e subfolder name within project folder). Default: %(default)s");
_("Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. Default: %(default)s");
_("Legacy option (use --feature-quality instead). Resizes images by the largest side for feature extraction purposes only. Set to -1 to disable. This does not affect the final orthophoto resolution quality and will not resize the original images. Default: %(default)s");
_("Radius of the overlap between submodels. After grouping images into clusters, images that are closer than this radius to a cluster are added to the cluster. This is done to ensure that neighboring submodels overlap. Default: %(default)s");
_("Path to the image groups file that controls how images should be split into groups. The file needs to use the following format: image_name group_nameDefault: %(default)s");
_("Matcher algorithm, Fast Library for Approximate Nearest Neighbors or Bag of Words. FLANN is slower, but more stable. BOW is faster, but can sometimes miss valid matches. Can be one of: %(choices)s. Default: %(default)s");
_("URL to a ClusterODM instance for distributing a split-merge workflow on multiple nodes in parallel. Default: %(default)s");
_("Rerun processing from this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Turn off camera parameter optimization during bundle adjustment. This can be sometimes useful for improving results that exhibit doming/bowling or when images are taken with a rolling shutter camera. Default: %(default)s");
_("Generates a benchmark file with runtime info. Default: %(default)s");
_("Number of steps used to fill areas with gaps. Set to 0 to disable gap filling. Starting with a radius equal to the output resolution, N different DEMs are generated with progressively bigger radius using the inverse distance weighted (IDW) algorithm and merged together. Remaining gaps are then merged using nearest neighbor interpolation. Default: %(default)s");
_("Rerun this stage only and stop. Can be one of: %(choices)s. Default: %(default)s");
_("Reduce the memory usage needed for depthmap fusion by splitting large scenes into tiles. Turn this on if your machine doesn't have much RAM and/or you've set --pc-quality to high or ultra. Experimental. Default: %(default)s");
_("Minimum number of features to extract per image. More features can be useful for finding more matches between images, potentially allowing the reconstruction of areas with little overlap or insufficient features. More features also slow down processing. Default: %(default)s");
_("Average number of images per submodel. When splitting a large dataset into smaller submodels, images are grouped into clusters. This value regulates the number of images that each cluster should have on average. Default: %(default)s");
_("Path to the file containing the ground control points used for georeferencing. The file needs to use the following format: EPSG:<code> or <+proj definition>geo_x geo_y geo_z im_x im_y image_name [gcp_name] [extra1] [extra2]Default: %(default)s");
_("Computes an euclidean raster map for each DEM. The map reports the distance from each cell to the nearest NODATA value (before any hole filling takes place). This can be useful to isolate the areas that have been filled. Default: %(default)s");
_("Export the georeferenced point cloud in Entwine Point Tile (EPT) format. Default: %(default)s");
_("Turn on gamma tone mapping or none for no tone mapping. Can be one of %(choices)s. Default: %(default)s ");
_("Export the georeferenced point cloud in LAS format. Default: %(default)s");
_("DSM/DTM resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Legacy option (use --pc-quality instead). Controls the density of the point cloud by setting the resolution of the depthmap images. Higher values take longer to compute but produce denser point clouds. Default: %(default)s");
_("Run local bundle adjustment for every image added to the reconstruction and a global adjustment every 100 images. Speeds up reconstruction for very large datasets. Default: %(default)s");
_("Simple Morphological Filter elevation threshold parameter (meters). Default: %(default)s");
_("Skip the blending of colors near seams. Default: %(default)s");
_("Use the camera parameters computed from another dataset instead of calculating them. Can be specified either as path to a cameras.json file or as a JSON string representing the contents of a cameras.json file. Default: %(default)s");
_("Generate static tiles for orthophotos and DEMs that are suitable for viewers like Leaflet or OpenLayers. Default: %(default)s");
_("Choose the algorithm for extracting keypoints and computing descriptors. Can be one of: %(choices)s. Default: %(default)s");
_("Use this tag to build a DSM (Digital Surface Model, ground + objects) using a progressive morphological filter. Check the --dem* parameters for finer tuning. Default: %(default)s");
_("Simple Morphological Filter slope parameter (rise over run). Default: %(default)s");
_("show this help message and exit");
_("Skip generation of PDF report. This can save time if you don't need a report. Default: %(default)s");
_("Print additional messages to the console. Default: %(default)s");
_("Export the georeferenced point cloud in CSV format. Default: %(default)s");
_("Filters the point cloud by keeping only a single point around a radius N (in meters). This can be useful to limit the output resolution of the point cloud and remove duplicate points. Set to 0 to disable sampling. Default: %(default)s");
_("Set a value in meters for the GPS Dilution of Precision (DOP) information for all images. If your images are tagged with high precision GPS information (RTK), this value will be automatically set accordingly. You can use this option to manually set it in case the reconstruction fails. Lowering this option can sometimes help control bowling-effects over large areas. Default: %(default)s");
_("Print debug messages. Default: %(default)s");
_("Distance threshold in meters to find pre-matching images based on GPS exif data. Set both matcher-neighbors and this to 0 to skip pre-matching. Default: %(default)s");
_("When texturing the 3D mesh, for each triangle, choose to prioritize images with sharp features (gmi) or those that cover the largest area (area). Default: %(default)s");
_("Use this tag if you have a GCP File but want to use the EXIF information for georeferencing instead. Default: %(default)s");
_("Decimate the points before generating the DEM. 1 is no decimation (full quality). 100 decimates ~99%% of the points. Useful for speeding up generation of DEM results in very large datasets. Default: %(default)s");
_("Perform ground rectification on the point cloud. This means that wrongly classified ground points will be re-classified and gaps will be filled. Useful for generating DTMs. Default: %(default)s");
_("Set feature extraction quality. Higher quality generates better features, but requires more memory and takes longer. Can be one of: %(choices)s. Default: %(default)s");
_("The maximum vertex count of the output mesh. Default: %(default)s");
_("Set the radiometric calibration to perform on images. When processing multispectral and thermal images you should set this option to obtain reflectance/temperature values (otherwise you will get digital number values). [camera] applies black level, vignetting, row gradient gain/exposure compensation (if appropriate EXIF tags are found) and computes absolute temperature values. [camera+sun] is experimental, applies all the corrections of [camera], plus compensates for spectral radiance registered via a downwelling light sensor (DLS) taking in consideration the angle of the sun. Can be one of: %(choices)s. Default: %(default)s");
_("Set point cloud quality. Higher quality generates better, denser point clouds, but requires more memory and takes longer. Each step up in quality increases processing time roughly by a factor of 4x.Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter window radius parameter (meters). Default: %(default)s");
_("Set this parameter if you want to generate a Google Earth (KMZ) rendering of the orthophoto. Default: %(default)s");
_("Delete heavy intermediate files to optimize disk space usage. This affects the ability to restart the pipeline from an intermediate stage, but allows datasets to be processed on machines that don't have sufficient disk space available. Default: %(default)s");
_("Skip normalization of colors across all images. Useful when processing radiometric data. Default: %(default)s");
_("Set this parameter if you want to generate a PNG rendering of the orthophoto. Default: %(default)s");
_("When processing multispectral datasets, you can specify the name of the primary band that will be used for reconstruction. It's recommended to choose a band which has sharp details and is in focus. Default: %(default)s");
_("Orthophoto resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Permanently delete all previous results and rerun the processing pipeline.");
_("Set this parameter if you want a striped GeoTIFF. Default: %(default)s");
_("Set a camera projection type. Manually setting a value can help improve geometric undistortion. By default the application tries to determine a lens type from the images metadata. Can be one of: %(choices)s. Default: %(default)s");
_("Path to the project folder. Your project folder should contain subfolders for each dataset. Each dataset should have an \"images\" folder.");
_("Generates a polygon around the cropping area that cuts the orthophoto around the edges of features. This polygon can be useful for stitching seamless mosaics with multiple overlapping orthophotos. Default: %(default)s");
_("Displays version number and exits. ");
_("Choose what to merge in the merge step in a split dataset. By default all available outputs are merged. Options: %(choices)s. Default: %(default)s");
_("Skip generation of a full 3D model. This can save time if you only need 2D results such as orthophotos and DEMs. Default: %(default)s");
_("Classify the point cloud outputs using a Simple Morphological Filter. You can control the behavior of this option by tweaking the --dem-* parameters. Default: %(default)s");
_("End processing at this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter elevation scalar parameter. Default: %(default)s");
_("Type of photometric outlier removal method. Can be one of: %(choices)s. Default: %(default)s");
_("Use images' GPS exif data for reconstruction, even if there are GCPs present.This flag is useful if you have high precision GPS measurements. If there are no GCPs, this flag does nothing. Default: %(default)s");
_("Number of nearest images to pre-match based on GPS exif data. Set to 0 to skip pre-matching. Neighbors works together with Distance parameter, set both to 0 to not use pre-matching. Default: %(default)s");
_("Use a full 3D mesh to compute the orthophoto instead of a 2.5D mesh. This option is a bit faster and provides similar results in planar areas. Default: %(default)s");
_("Path to the image geolocation file containing the camera center coordinates used for georeferencing. Note that omega/phi/kappa are currently not supported (you can set them to 0). The file needs to use the following format: EPSG:<code> or <+proj definition>image_name geo_x geo_y geo_z [omega (degrees)] [phi (degrees)] [kappa (degrees)] [horz accuracy (meters)] [vert accuracy (meters)]Default: %(default)s");
_("Use this tag to build a DTM (Digital Terrain Model, ground only) using a simple morphological filter. Check the --dem* and --smrf* parameters for finer tuning. Default: %(default)s");
_("Build orthophoto overviews for faster display in programs such as QGIS. Default: %(default)s");
_("Automatically crop image outputs by creating a smooth buffer around the dataset boundaries, shrinked by N meters. Use 0 to disable cropping. Default: %(default)s");
_("When processing multispectral datasets, ODM will automatically align the images for each band. If the images have been postprocessed and are already aligned, use this option. Default: %(default)s");
_("Set the compression to use for orthophotos. Can be one of: %(choices)s. Default: %(default)s");
_("Set feature extraction quality. Higher quality generates better features, but requires more memory and takes longer. Can be one of: %(choices)s. Default: %(default)s");
_("End processing at this stage. Can be one of: %(choices)s. Default: %(default)s");
_("When texturing the 3D mesh, for each triangle, choose to prioritize images with sharp features (gmi) or those that cover the largest area (area). Default: %(default)s");
_("Delete heavy intermediate files to optimize disk space usage. This affects the ability to restart the pipeline from an intermediate stage, but allows datasets to be processed on machines that don't have sufficient disk space available. Default: %(default)s");
_("Simple Morphological Filter elevation threshold parameter (meters). Default: %(default)s");
_("Use the camera parameters computed from another dataset instead of calculating them. Can be specified either as path to a cameras.json file or as a JSON string representing the contents of a cameras.json file. Default: %(default)s");
_("Type of photometric outlier removal method. Can be one of: %(choices)s. Default: %(default)s");
_("Name of dataset (i.e subfolder name within project folder). Default: %(default)s");
_("Orthophoto resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Build orthophoto overviews for faster display in programs such as QGIS. Default: %(default)s");
_("Displays version number and exits. ");
_("Use this tag to build a DSM (Digital Surface Model, ground + objects) using a progressive morphological filter. Check the --dem* parameters for finer tuning. Default: %(default)s");
_("Export the georeferenced point cloud in CSV format. Default: %(default)s");
_("Reduce the memory usage needed for depthmap fusion by splitting large scenes into tiles. Turn this on if your machine doesn't have much RAM and/or you've set --pc-quality to high or ultra. Experimental. Default: %(default)s");
_("Permanently delete all previous results and rerun the processing pipeline.");
_("Export the georeferenced point cloud in Entwine Point Tile (EPT) format. Default: %(default)s");
_("Use this tag if you have a GCP File but want to use the EXIF information for georeferencing instead. Default: %(default)s");
_("Turn off camera parameter optimization during bundle adjustment. This can be sometimes useful for improving results that exhibit doming/bowling or when images are taken with a rolling shutter camera. Default: %(default)s");
_("Generates a polygon around the cropping area that cuts the orthophoto around the edges of features. This polygon can be useful for stitching seamless mosaics with multiple overlapping orthophotos. Default: %(default)s");
_("Print debug messages. Default: %(default)s");
_("Set point cloud quality. Higher quality generates better, denser point clouds, but requires more memory and takes longer. Each step up in quality increases processing time roughly by a factor of 4x.Can be one of: %(choices)s. Default: %(default)s");
_("Number of nearest images to pre-match based on GPS exif data. Set to 0 to skip pre-matching. Neighbors works together with Distance parameter, set both to 0 to not use pre-matching. Default: %(default)s");
_("Set a camera projection type. Manually setting a value can help improve geometric undistortion. By default the application tries to determine a lens type from the images metadata. Can be one of: %(choices)s. Default: %(default)s");
_("Skip generation of PDF report. This can save time if you don't need a report. Default: %(default)s");
_("Octree depth used in the mesh reconstruction, increase to get more vertices, recommended values are 8-12. Default: %(default)s");
_("Skips dense reconstruction and 3D model generation. It generates an orthophoto directly from the sparse reconstruction. If you just need an orthophoto and do not need a full 3D model, turn on this option. Default: %(default)s");
_("Ignore Ground Sampling Distance (GSD). GSD caps the maximum resolution of image outputs and resizes images when necessary, resulting in faster processing and lower memory usage. Since GSD is an estimate, sometimes ignoring it can result in slightly better image output quality. Default: %(default)s");
_("Rerun processing from this stage. Can be one of: %(choices)s. Default: %(default)s");
_("Turn on gamma tone mapping or none for no tone mapping. Can be one of %(choices)s. Default: %(default)s ");
_("Decimate the points before generating the DEM. 1 is no decimation (full quality). 100 decimates ~99%% of the points. Useful for speeding up generation of DEM results in very large datasets. Default: %(default)s");
_("Path to the image groups file that controls how images should be split into groups. The file needs to use the following format: image_name group_nameDefault: %(default)s");
_("Skip normalization of colors across all images. Useful when processing radiometric data. Default: %(default)s");
_("Filters the point cloud by removing points that deviate more than N standard deviations from the local mean. Set to 0 to disable filtering. Default: %(default)s");
_("Set a value in meters for the GPS Dilution of Precision (DOP) information for all images. If your images are tagged with high precision GPS information (RTK), this value will be automatically set accordingly. You can use this option to manually set it in case the reconstruction fails. Lowering this option can sometimes help control bowling-effects over large areas. Default: %(default)s");
_("Skip the blending of colors near seams. Default: %(default)s");
_("The maximum vertex count of the output mesh. Default: %(default)s");
_("Set this parameter if you want to generate a PNG rendering of the orthophoto. Default: %(default)s");
_("Set this parameter if you want a striped GeoTIFF. Default: %(default)s");
_("Generates a benchmark file with runtime info. Default: %(default)s");
_("Run local bundle adjustment for every image added to the reconstruction and a global adjustment every 100 images. Speeds up reconstruction for very large datasets. Default: %(default)s");
_("Computes an euclidean raster map for each DEM. The map reports the distance from each cell to the nearest NODATA value (before any hole filling takes place). This can be useful to isolate the areas that have been filled. Default: %(default)s");
_("The maximum number of processes to use in various processes. Peak memory requirement is ~1GB per thread and 2 megapixel image resolution. Default: %(default)s");
_("show this help message and exit");
_("Rerun this stage only and stop. Can be one of: %(choices)s. Default: %(default)s");
_("Simple Morphological Filter window radius parameter (meters). Default: %(default)s");
_("Keep faces in the mesh that are not seen in any camera. Default: %(default)s");
_("Minimum number of features to extract per image. More features can be useful for finding more matches between images, potentially allowing the reconstruction of areas with little overlap or insufficient features. More features also slow down processing. Default: %(default)s");
_("Use a full 3D mesh to compute the orthophoto instead of a 2.5D mesh. This option is a bit faster and provides similar results in planar areas. Default: %(default)s");
_("Skip generation of a full 3D model. This can save time if you only need 2D results such as orthophotos and DEMs. Default: %(default)s");
_("Number of steps used to fill areas with gaps. Set to 0 to disable gap filling. Starting with a radius equal to the output resolution, N different DEMs are generated with progressively bigger radius using the inverse distance weighted (IDW) algorithm and merged together. Remaining gaps are then merged using nearest neighbor interpolation. Default: %(default)s");
_("Set this parameter if you want to generate a Google Earth (KMZ) rendering of the orthophoto. Default: %(default)s");
_("Print additional messages to the console. Default: %(default)s");
_("Classify the point cloud outputs using a Simple Morphological Filter. You can control the behavior of this option by tweaking the --dem-* parameters. Default: %(default)s");
_("Ignore Ground Sampling Distance (GSD). GSD caps the maximum resolution of image outputs and resizes images when necessary, resulting in faster processing and lower memory usage. Since GSD is an estimate, sometimes ignoring it can result in slightly better image output quality. Default: %(default)s");
_("Simple Morphological Filter elevation scalar parameter. Default: %(default)s");
_("Set the compression to use for orthophotos. Can be one of: %(choices)s. Default: %(default)s");
_("Distance threshold in meters to find pre-matching images based on GPS exif data. Set both matcher-neighbors and this to 0 to skip pre-matching. Default: %(default)s");
_("Set the radiometric calibration to perform on images. When processing multispectral and thermal images you should set this option to obtain reflectance/temperature values (otherwise you will get digital number values). [camera] applies black level, vignetting, row gradient gain/exposure compensation (if appropriate EXIF tags are found) and computes absolute temperature values. [camera+sun] is experimental, applies all the corrections of [camera], plus compensates for spectral radiance registered via a downwelling light sensor (DLS) taking in consideration the angle of the sun. Can be one of: %(choices)s. Default: %(default)s");
_("Radius of the overlap between submodels. After grouping images into clusters, images that are closer than this radius to a cluster are added to the cluster. This is done to ensure that neighboring submodels overlap. Default: %(default)s");
_("URL to a ClusterODM instance for distributing a split-merge workflow on multiple nodes in parallel. Default: %(default)s");
_("Use images' GPS exif data for reconstruction, even if there are GCPs present.This flag is useful if you have high precision GPS measurements. If there are no GCPs, this flag does nothing. Default: %(default)s");
_("When processing multispectral datasets, ODM will automatically align the images for each band. If the images have been postprocessed and are already aligned, use this option. Default: %(default)s");
_("Use this tag to build a DTM (Digital Terrain Model, ground only) using a simple morphological filter. Check the --dem* and --smrf* parameters for finer tuning. Default: %(default)s");
_("Legacy option (use --pc-quality instead). Controls the density of the point cloud by setting the resolution of the depthmap images. Higher values take longer to compute but produce denser point clouds. Default: %(default)s");
_("Generate static tiles for orthophotos and DEMs that are suitable for viewers like Leaflet or OpenLayers. Default: %(default)s");
_("Skips dense reconstruction and 3D model generation. It generates an orthophoto directly from the sparse reconstruction. If you just need an orthophoto and do not need a full 3D model, turn on this option. Default: %(default)s");
_("Legacy option (use --feature-quality instead). Resizes images by the largest side for feature extraction purposes only. Set to -1 to disable. This does not affect the final orthophoto resolution quality and will not resize the original images. Default: %(default)s");
_("Simple Morphological Filter slope parameter (rise over run). Default: %(default)s");
_("When processing multispectral datasets, you can specify the name of the primary band that will be used for reconstruction. It's recommended to choose a band which has sharp details and is in focus. Default: %(default)s");
_("DSM/DTM resolution in cm / pixel. Note that this value is capped by a ground sampling distance (GSD) estimate. To remove the cap, check --ignore-gsd also. Default: %(default)s");
_("Choose the algorithm for extracting keypoints and computing descriptors. Can be one of: %(choices)s. Default: %(default)s");
_("Average number of images per submodel. When splitting a large dataset into smaller submodels, images are grouped into clusters. This value regulates the number of images that each cluster should have on average. Default: %(default)s");
_("Matcher algorithm, Fast Library for Approximate Nearest Neighbors or Bag of Words. FLANN is slower, but more stable. BOW is faster, but can sometimes miss valid matches. Can be one of: %(choices)s. Default: %(default)s");
_("Filters the point cloud by keeping only a single point around a radius N (in meters). This can be useful to limit the output resolution of the point cloud and remove duplicate points. Set to 0 to disable sampling. Default: %(default)s");
_("Path to the image geolocation file containing the camera center coordinates used for georeferencing. Note that omega/phi/kappa are currently not supported (you can set them to 0). The file needs to use the following format: EPSG:<code> or <+proj definition>image_name geo_x geo_y geo_z [omega (degrees)] [phi (degrees)] [kappa (degrees)] [horz accuracy (meters)] [vert accuracy (meters)]Default: %(default)s");
_("Choose what to merge in the merge step in a split dataset. By default all available outputs are merged. Options: %(choices)s. Default: %(default)s");
_("Perform ground rectification on the point cloud. This means that wrongly classified ground points will be re-classified and gaps will be filled. Useful for generating DTMs. Default: %(default)s");
_("Path to the file containing the ground control points used for georeferencing. The file needs to use the following format: EPSG:<code> or <+proj definition>geo_x geo_y geo_z im_x im_y image_name [gcp_name] [extra1] [extra2]Default: %(default)s");
_("Export the georeferenced point cloud in LAS format. Default: %(default)s");

Wyświetl plik

@ -55,11 +55,27 @@
<link rel="stylesheet" type="text/x-scss" href="{% static 'app/css/theme.scss' %}" />
{% endcompress %}
{% is_desktop_mode as desktop_mode %}
{% if desktop_mode %}
<!-- Hide top nav bar -->
<style type="text/css">
.navbar-header { display: none; }
#navbar-top .navbar-default.sidebar{ top: 0; position: fixed; margin-top: 1px; }
#navbar-top { height: 0; min-height: 0; }
.map-view { height: calc(100% + 30px) !important; }
.model-view { height: calc(100% + 50px) !important; }
</style>
{% endif %}
<style type="text/css">
{{ SETTINGS.theme.css|safe }}
</style>
</head>
<body data-admin-utc-offset="{% now "Z" %}">
{% if desktop_mode %}
<div class='topLine' style="background: #e7e7e7; position: absolute; left: 0; right: 0; height: 1px;"></div>
{% endif %}
{% block body %}
<!--[if lt IE 8]>
<p class="browserupgrade">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
@ -97,11 +113,18 @@ $(function(){
$('#side-menu').metisMenu();
$(window).bind("load resize", function() {
{% if desktop_mode %}
var topOffset = 0;
{% else %}
var topOffset = 50;
{% endif %}
var width = (this.window.innerWidth > 0) ? this.window.innerWidth : this.screen.width;
if (width < 768) {
$('div.navbar-collapse').addClass('collapse');
{% if not desktop_mode %}
topOffset = 100; // 2-row-menu
{% endif %}
} else {
$('div.navbar-collapse').removeClass('collapse');
}

Wyświetl plik

@ -12,7 +12,7 @@
<form class="form-inline" style="margin-top: 32px;">
<strong>{% trans 'Current Locale:' %}</strong> {{ current_locale }}<br/>
<small>{% trans "To change locale, modify your browser's locale settings, then refresh the page." %}</small>
<small>{% trans "To change locale, modify your browser's locale settings, then refresh the page, or use the set locale button below." %}</small>
<br/><br/>
<div class="form-group margin-bottom">
<label for="transFiles">{% trans 'Translation Files (.zip):' %}</label>
@ -22,6 +22,13 @@
<button type="button" class="btn btn-danger" onClick="javascript:execute(this, 'reloadTranslation', document.getElementById('transFiles').value)"><i class="fa fa-language"></i> {% trans 'Download and Replace Translation Files' %}</button>
</div>
</form>
<form class="form-inline" style="margin-top: 32px;" onsubmit="return false;">
<div class="form-group margin-bottom">
<label for="targetLocale">{% trans 'Set locale:' %}</label>
<input id='targetLocale' type="text" class="form-control" size="6" value="it-IT">
<button class="btn btn-primary" onclick="window.setLocale(document.getElementById('targetLocale').value);"><i class="fa fa-globe"></i> {% trans 'Apply' %}</button>
</div>
</form>
<div id="action-loading" style="display: none; margin-top: 12px">
<i class="fa fa-circle-notch fa-spin fa-fw"></i> {% trans 'Executing… do not refresh the page! This could take a while.' %}
</div>

Wyświetl plik

@ -11,6 +11,10 @@ logger = logging.getLogger('app.logger')
def is_single_user_mode():
return settings.SINGLE_USER_MODE
@register.simple_tag
def is_desktop_mode():
return settings.DESKTOP_MODE
@register.simple_tag
def is_dev_mode():
return settings.DEV

Wyświetl plik

@ -44,6 +44,7 @@ urlpatterns = [
# TODO: add caching: https://docs.djangoproject.com/en/3.1/topics/i18n/translation/#note-on-performance
url(r'^jsi18n/', JavaScriptCatalog.as_view(packages=['app']), name='javascript-catalog'),
url(r'^i18n/', include('django.conf.urls.i18n')),
]
handler404 = app_views.handler404

Wyświetl plik

@ -71,7 +71,8 @@ def map(request, project_pk=None, task_pk=None):
'params': {
'map-items': json.dumps(mapItems),
'title': title,
'public': 'false'
'public': 'false',
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true'
}.items()
})
@ -95,7 +96,8 @@ def model_display(request, project_pk=None, task_pk=None):
'title': title,
'params': {
'task': json.dumps(task.get_model_display_params()),
'public': 'false'
'public': 'false',
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true'
}.items()
})

Wyświetl plik

@ -68,10 +68,8 @@ def dev_tools(request, action):
logger.info("Moving %s to %s..." % (locale_path, webodm_locale_dir))
copymerge(locale_path, webodm_locale_dir)
logger.info("Running translate.sh extract && translate.sh build safe")
translate_script = os.path.join(settings.BASE_DIR, 'translate.sh')
subprocess.call(['bash', '-c', '%s extract && %s build safe' % (translate_script, translate_script)], cwd=settings.BASE_DIR)
logger.info("Running python manage.py translate extract && python manage.py translate build --safe")
subprocess.call(['bash', '-c', 'python manage.py translate extract && %s python manage.py translate build --safe'], cwd=settings.BASE_DIR)
return JsonResponse({'message': _("Translation files reloaded!"), 'reload': True})
except Exception as e:

Wyświetl plik

@ -8,6 +8,7 @@ from django.shortcuts import render
from app.api.tasks import TaskSerializer
from app.models import Task
from django.views.decorators.csrf import ensure_csrf_cookie
from webodm import settings
def get_public_task(task_pk):
"""
@ -27,7 +28,8 @@ def handle_map(request, template, task_pk=None, hide_title=False):
'params': {
'map-items': json.dumps([task.get_map_items()]),
'title': task.name if not hide_title else '',
'public': 'true'
'public': 'true',
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true'
}.items()
})
@ -45,7 +47,8 @@ def handle_model_display(request, template, task_pk=None):
'title': task.name,
'params': {
'task': json.dumps(task.get_model_display_params()),
'public': 'true'
'public': 'true',
'share-buttons': 'false' if settings.DESKTOP_MODE else 'true'
}.items()
})

Wyświetl plik

@ -1,6 +1,6 @@
{
"name": "WebODM",
"version": "1.8.3",
"version": "1.9.0",
"description": "User-friendly, extendable application and API for processing aerial imagery.",
"main": "index.js",
"scripts": {

Wyświetl plik

@ -51,7 +51,7 @@ if [ "$1" = "--setup-devenv" ] || [ "$2" = "--setup-devenv" ]; then
pip install -r requirements.txt
echo Build translations...
./translate.sh build safe
python manage.py translate build --safe
echo Setup webpack watch...
webpack --watch &
@ -61,11 +61,16 @@ echo Running migrations
python manage.py migrate
if [[ "$WO_DEFAULT_NODES" > 0 ]]; then
echo -e "from nodeodm.models import ProcessingNode\nfor node_index in map(str, range(1, $WO_DEFAULT_NODES + 1)):\n\t ProcessingNode.objects.update_or_create(hostname='webodm_node-odm_' + node_index, defaults={'hostname': 'webodm_node-odm_' + node_index, 'port': 3000, 'label': 'node-odm-' + node_index})" | python manage.py shell
i=0
while [ $i -ne "$WO_DEFAULT_NODES" ]
do
i=$(($i+1))
python manage.py addnode webodm_node-odm_$i 3000 --label node-odm-$i
done
fi
if [[ "$WO_CREATE_MICMAC_PNODE" = "YES" ]]; then
echo "from nodeodm.models import ProcessingNode; ProcessingNode.objects.update_or_create(hostname='node-micmac-1', defaults={'hostname': 'node-micmac-1', 'port': 3000})" | python manage.py shell
python manage.py addnode node-micmac-1 3000
fi
export WO_HOST="${WO_HOST:=localhost}"

Wyświetl plik

@ -1,34 +0,0 @@
#!/bin/bash
LOCALES=$(cat LOCALES)
if [[ "$1" == "extract" ]]; then
echo "Extracting .po files from Django/React"
locale_param=""
for lang in $LOCALES
do
locale_param="--locale=$lang $locale_param"
done
mkdir -p locale
python3 app/scripts/extract_potree_strings.py app/static/app/js/vendor/potree/build/potree/resources/lang/en/translation.json app/static/app/js/translations/potree_autogenerated.js
python3 app/scripts/extract_odm_strings.py https://raw.githubusercontent.com/OpenDroneMap/ODM/master/opendm/config.py app/static/app/js/translations/odm_autogenerated.js
python3 app/scripts/extract_plugin_manifest_strings.py plugins/ app/translations/plugin_manifest_autogenerated.py
django-admin makemessages --keep-pot $locale_param --ignore=build --ignore=app/templates/app/registration/*
python manage.py makemessages_djangojs --keep-pot $locale_param -d djangojs --extension jsx --extension js --ignore=build --ignore app/static/app/js/vendor --ignore app/static/app/bundles --ignore node_modules --language Python
fi
if [[ "$1" == "build" ]]; then
if [[ "$2" == "safe" ]]; then
for lang in $LOCALES
do
echo "Building $lang .po files into .mo"
django-admin compilemessages --locale=$lang
done
else
echo "Building .po files into .mo"
django-admin compilemessages
fi
fi

Wyświetl plik

@ -68,6 +68,11 @@ SINGLE_USER_MODE = False
# URL to redirect to if there are no processing nodes when visiting the dashboard
PROCESSING_NODES_ONBOARDING = None
# Enable desktop mode. In desktop mode some styling changes
# are applied to make the application look nicer on desktop
# as well as disabling certain features (e.g. sharing)
DESKTOP_MODE = False
# Default CSS to add to theme
DEFAULT_THEME_CSS = ''