Skip to content

Commit

Permalink
Complete rebranding to Genie
Browse files Browse the repository at this point in the history
  • Loading branch information
gcampax committed Nov 22, 2021
1 parent f958f45 commit a85054b
Show file tree
Hide file tree
Showing 38 changed files with 82 additions and 88 deletions.
12 changes: 6 additions & 6 deletions data/thingengine.server.tt
@@ -1,10 +1,10 @@
class @org.thingpedia.builtin.thingengine.server
#_[thingpedia_name="Almond Smart Speaker"]
#_[thingpedia_description="Commands that are specific to using Almond as a smart-speaker device."]
#_[name="Almond Smart Speaker"]
#_[description="Commands that are specific to using Almond as a smart-speaker device."]
#_[canonical="almond smart speaker"]
#[repository="https://github.com/stanford-oval/almond-server"]
#_[thingpedia_name="Genie Smart Speaker"]
#_[thingpedia_description="Commands that are specific to using Genie as a smart-speaker device."]
#_[name="Genie Smart Speaker"]
#_[description="Commands that are specific to using Genie as a smart-speaker device."]
#_[canonical="genie smart speaker"]
#[repository="https://github.com/stanford-oval/genie-server"]
#[subcategory="service"]
#[license="Apache-2.0"]
#[license_gplcompatible=true]
Expand Down
4 changes: 2 additions & 2 deletions public/javascripts/conversation.js
Expand Up @@ -461,15 +461,15 @@ $(() => {
$.get(baseUrl + '/recording/log/' + conversationId + '.txt').then((res) => {
$('#recording-log').text(res);
const email = 'oval-bug-reports@lists.stanford.edu';
const subject = 'Almond Conversation Log';
const subject = 'Genie Conversation Log';
const body = encodeURIComponent(res);
$('#recording-share').prop('href', `mailto:${email}?subject=${subject}&body=${body}`);
$('#recording-save').modal('toggle');
});
});

$('#recording-download').click(() => {
window.open(baseUrl + '/recording/log/' + conversationId + '.txt', "Almond Conversation Log");
window.open(baseUrl + '/recording/log/' + conversationId + '.txt', "Genie Conversation Log");
});

$('#recording-save-done').click(() => {
Expand Down
6 changes: 0 additions & 6 deletions public/javascripts/shared.js
@@ -1,11 +1,5 @@
"use strict";
$(function() {
window.Almond = {
getThingpedia: function() {
return 'https://thingpedia.stanford.edu';
}
};

const top = window.parent;
const url = new URL(top.location.href);
const params = url.searchParams;
Expand Down
18 changes: 9 additions & 9 deletions src/config.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2017-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand All @@ -19,9 +19,9 @@
// Author: Giovanni Campagna <gcampagn@cs.stanford.edu>

/**
The URL prefix at which all almond-server APIs and pages are exposed.
The URL prefix at which all genie-server APIs and pages are exposed.
This configuration is provided to simplify reverse-proxying almond-server.
This configuration is provided to simplify reverse-proxying genie-server.
If set, it should start with a slash, not end in a slash, and have no two consecutive slashes.
Good: /foo /foo/bar
Expand All @@ -30,9 +30,9 @@
export const BASE_URL = process.env.THINGENGINE_BASE_URL || '';

/**
Set this to true if Almond is served behind a reverse proxy.
Set this to true if Genie is served behind a reverse proxy.
If true, Almond will trust the X-Forwarded-* headers, the default host-based authentication
If true, Genie will trust the X-Forwarded-* headers, the default host-based authentication
will be "proxied-ip", and the default origin will not use a port.
*/
export const HAS_REVERSE_PROXY = !!process.env.THINGENGINE_HAS_REVERSE_PROXY;
Expand All @@ -41,7 +41,7 @@ export const HAS_REVERSE_PROXY = !!process.env.THINGENGINE_HAS_REVERSE_PROXY;
Enable host-based authentication.
Host-based authentication is an alternative authentication scheme that allows connections
from localhost. It is useful to integrate Almond with other software, for example to build
from localhost. It is useful to integrate Genie with other software, for example to build
a smart gateway or smart speaker product.
The following options are allowed:
Expand Down Expand Up @@ -81,6 +81,6 @@ export const ENABLE_DB_ENCRYPTION = false;
export const IN_HOME_ASSISTANT_ADDON = !!process.env.THINGENGINE_IN_HOME_ASSISTANT_ADDON;

export const NLP_URL = process.env.THINGENGINE_NLP_URL || 'https://nlp-staging.almond.stanford.edu';
export const THINGPEDIA_URL = process.env.THINGPEDIA_URL || 'https://dev.almond.stanford.edu/thingpedia';
export const CLOUD_SYNC_URL = process.env.THINGENGINE_CLOUD_SYNC_URL || 'https://dev.almond.stanford.edu';
export const OAUTH_REDIRECT_URL = process.env.THINGENGINE_CLOUD_SYNC_URL || 'https://dev.almond.stanford.edu';
export const THINGPEDIA_URL = process.env.THINGPEDIA_URL || 'https://dev.genie.stanford.edu/thingpedia';
export const CLOUD_SYNC_URL = process.env.THINGENGINE_CLOUD_SYNC_URL || 'https://dev.genie.stanford.edu';
export const OAUTH_REDIRECT_URL = process.env.THINGENGINE_CLOUD_SYNC_URL || 'https://dev.genie.stanford.edu';
4 changes: 2 additions & 2 deletions src/frontend.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2017-2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down Expand Up @@ -216,7 +216,7 @@ export default class WebFrontend extends events.EventEmitter {
this._app.use((req, res) => {
// if we get here, we have a 404 response
res.status(404).render('error', {
page_title: req._("Almond - Page Not Found"),
page_title: req._("Genie - Page Not Found"),
message: req._("The requested page does not exist.")
});
});
Expand Down
2 changes: 1 addition & 1 deletion src/main.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/api.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/apps.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/config.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/conversation.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/devices.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/index.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/recording.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/routes/user.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/service/client-manager.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2021 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/service/platform/graphics.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2017-2018 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/service/platform/index.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/service/platform/thingengine.server.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019-2021 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/service/platform/utils.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
14 changes: 7 additions & 7 deletions src/util/error_handling.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand All @@ -24,19 +24,19 @@ import * as Tp from 'thingpedia';
export function html(err : any, req : express.Request, res : express.Response, next : express.NextFunction) {
if (err instanceof Tp.OAuthError || err instanceof Tp.ImplementationError) {
res.status(500).render('error', {
page_title: req._("Almond - Error"),
page_title: req._("Genie - Error"),
message: req._("There is a problem with the Thingpedia account or device you are trying to configure: %s. Please report this issue to the developer of Thingpedia device.").format(err.message)
});
} else if (typeof err.status === 'number') {
// oauth2orize errors, bodyparser errors
res.status(err.status).render('error', {
page_title: req._("Almond - Error"),
page_title: req._("Genie - Error"),
message: err.expose === false ? req._("Code: %d").format(err.status) : err
});
} else if (err.code === 'EBADCSRFTOKEN') {
// csurf errors
res.status(403).render('error', {
page_title: req._("Almond - Forbidden"),
page_title: req._("Genie - Forbidden"),
message: err,

// make sure we have a csrf token in the page
Expand All @@ -48,7 +48,7 @@ export function html(err : any, req : express.Request, res : express.Response, n
// util/db errors
// if we get here, we have a 404 response
res.status(404).render('error', {
page_title: req._("Almond - Page Not Found"),
page_title: req._("Genie - Page Not Found"),
message: req._("The requested page does not exist.")
});
} else if (err.code === 'EPERM' || err.code === 'EACCESS') {
Expand All @@ -68,14 +68,14 @@ export function html(err : any, req : express.Request, res : express.Response, n
// who fuzzes and looks for 500 errors.
console.error(err);
res.status(403).render('error', {
page_title: req._("Almond - Error"),
page_title: req._("Genie - Error"),
message: req._("You do not have permission to perform the requested operation.")
});
} else {
// bugs
console.error(err);
res.status(500).render('error', {
page_title: req._("Almond - Internal Server Error"),
page_title: req._("Genie - Internal Server Error"),
message: req._("Code: %s").format(err.code || err.sqlState || err.errno || err.name)
});
}
Expand Down
2 changes: 1 addition & 1 deletion src/util/errors.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/util/i18n.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2017-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/util/random.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2018 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion src/util/secret_key.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
8 changes: 4 additions & 4 deletions src/util/user.ts
@@ -1,6 +1,6 @@
// -*- mode: typescript; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2016-2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down Expand Up @@ -190,8 +190,8 @@ export function requireLogIn(req : express.Request, res : express.Response, next
res.redirect(Config.BASE_URL + '/user/configure');
} else {
res.status(401).render('error', {
page_title: "Almond - Error",
message: "You must complete the initial configuration of your Almond before you can perform this action."
page_title: "Genie - Error",
message: "You must complete the initial configuration of your Genie before you can perform this action."
});
}
} else if (!req.user) {
Expand All @@ -202,7 +202,7 @@ export function requireLogIn(req : express.Request, res : express.Response, next
req.session.redirect_to = req.originalUrl;
res.redirect(Config.BASE_URL + '/user/login');
} else {
res.status(401).render('login_required', { page_title: "Almond - Error" });
res.status(401).render('login_required', { page_title: "Genie - Error" });
}
} else {
next();
Expand Down
2 changes: 1 addition & 1 deletion tests/linkcheck.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/test_website_selenium.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/unit/index.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/util/csrf.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/util/minidom.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/website/index.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2019-2020 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down
2 changes: 1 addition & 1 deletion tests/website/login.js
@@ -1,6 +1,6 @@
// -*- mode: js; indent-tabs-mode: nil; js-basic-offset: 4 -*-
//
// This file is part of Almond
// This file is part of Genie
//
// Copyright 2018-2019 The Board of Trustees of the Leland Stanford Junior University
//
Expand Down

0 comments on commit a85054b

Please sign in to comment.