Merge master
This commit is contained in:
commit
7ebb3d721c
411 changed files with 21814 additions and 8717 deletions
|
@ -89,7 +89,7 @@ function GenerateDocumentationForTheme(theme: LayoutConfig): BaseUIElement {
|
|||
new Combine([
|
||||
theme.title,
|
||||
"(",
|
||||
new Link(theme.id, "https://mapcomplete.osm.be/" + theme.id),
|
||||
new Link(theme.id, "https://mapcomplete.org/" + theme.id),
|
||||
")",
|
||||
]),
|
||||
2
|
||||
|
@ -276,14 +276,14 @@ function generateWikipage() {
|
|||
const languages = languagesInDescr.map((ln) => `{{#language:${ln}|en}}`).join(", ")
|
||||
let auth = "Yes"
|
||||
return `{{service_item
|
||||
|name= [https://mapcomplete.osm.be/${layout.id} ${layout.id}]
|
||||
|name= [https://mapcomplete.org/${layout.id} ${layout.id}]
|
||||
|region= Worldwide
|
||||
|lang= ${languages}
|
||||
|descr= A MapComplete theme: ${Translations.T(layout.shortDescription)
|
||||
.textFor("en")
|
||||
.replace("<a href='", "[[")
|
||||
.replace(/'>.*<\/a>/, "]]")}
|
||||
|material= {{yes|[https://mapcomplete.osm.be/ ${auth}]}}
|
||||
|material= {{yes|[https://mapcomplete.org/ ${auth}]}}
|
||||
|image= MapComplete_Screenshot.png
|
||||
|genre= POI, editor, ${layout.id}
|
||||
}}`
|
||||
|
|
|
@ -239,7 +239,7 @@ async function createLandingPage(layout: LayoutConfig, manifest, whiteIcons, alr
|
|||
<meta property="og:title" content="${ogTitle}">
|
||||
<meta property="og:description" content="${ogDescr}">
|
||||
<meta name="twitter:card" content="summary_large_image">
|
||||
<meta name="twitter:site" content="@mapcomplete.osm.be">
|
||||
<meta name="twitter:site" content="@mapcomplete.org">
|
||||
<meta name="twitter:creator" content="@pietervdvn">
|
||||
<meta name="twitter:title" content="${ogTitle}">
|
||||
<meta name="twitter:description" content="${ogDescr}">
|
||||
|
|
|
@ -70,7 +70,7 @@ export class GenerateLicenseInfo extends Script {
|
|||
license: "CC0",
|
||||
sources: [
|
||||
"https://toerismevlaanderen.be/pinjepunt",
|
||||
"https://mapcomplete.osm.be/toerisme_vlaanderenn",
|
||||
"https://mapcomplete.org/toerisme_vlaanderenn",
|
||||
],
|
||||
})
|
||||
knownLicenses.set("tvf", {
|
||||
|
|
32
scripts/generateRedirectFiles.ts
Normal file
32
scripts/generateRedirectFiles.ts
Normal file
|
@ -0,0 +1,32 @@
|
|||
import Script from "./Script"
|
||||
import ScriptUtils from "./ScriptUtils"
|
||||
import { writeFileSync } from "fs"
|
||||
import { AllKnownLayouts } from "../src/Customizations/AllKnownLayouts"
|
||||
|
||||
class CreateRedirectFiles extends Script {
|
||||
constructor() {
|
||||
super(
|
||||
"Creates a redirect html-file in the 'mapcomplete-osm-be' repository for every .html file and every known theme"
|
||||
)
|
||||
}
|
||||
async main(args: string[]): Promise<void> {
|
||||
const htmlFiles = ScriptUtils.readDirRecSync(".", 1)
|
||||
.filter((f) => f.endsWith(".html"))
|
||||
.map((s) => s.substring(2, s.length - 5))
|
||||
const themes = Array.from(AllKnownLayouts.allKnownLayouts.keys())
|
||||
htmlFiles.push(...themes)
|
||||
console.log("HTML files are:", htmlFiles)
|
||||
for (const htmlFile of htmlFiles) {
|
||||
let path = ""
|
||||
if (htmlFile !== "index") {
|
||||
path = htmlFile
|
||||
}
|
||||
writeFileSync(
|
||||
"../mapcomplete-osm-be/" + htmlFile + ".html",
|
||||
`<meta http-equiv="Refresh" content="0; url='https://mapcomplete.org/${path}'" />`
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
new CreateRedirectFiles().run()
|
|
@ -36,7 +36,7 @@ export default class GenerateReviewsAnalysis extends Script {
|
|||
client.searchParams.get("layout") ??
|
||||
client.searchParams.get("userlayout")
|
||||
}
|
||||
theme = "https://mapcomplete.osm.be/" + theme
|
||||
theme = "https://mapcomplete.org/" + theme
|
||||
themeHist[theme] = (themeHist[theme] ?? 0) + 1
|
||||
|
||||
const language = client.searchParams.get("language")
|
||||
|
|
|
@ -90,7 +90,7 @@ function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any[] {
|
|||
} else {
|
||||
descr += " shows and asks freeform values for"
|
||||
}
|
||||
descr += ` key '${key}' (in the MapComplete.osm.be theme '${layout.title.txt}')`
|
||||
descr += ` key '${key}' (in the mapcomplete.org theme '${layout.title.txt}')`
|
||||
result.push(generateTagOverview({ k: key, v: undefined }, descr + condition))
|
||||
}
|
||||
|
||||
|
@ -109,7 +109,7 @@ function generateLayerUsage(layer: LayerConfig, layout: LayoutConfig): any[] {
|
|||
) {
|
||||
descr += " and allows to pick this as a default answer"
|
||||
}
|
||||
descr += ` (in the MapComplete.osm.be theme '${layout.title.txt}')`
|
||||
descr += ` (in the mapcomplete.org theme '${layout.title.txt}')`
|
||||
for (const kv of mapping.if.asChange({})) {
|
||||
let d = descr
|
||||
if (q != undefined && kv.v == "") {
|
||||
|
@ -155,9 +155,9 @@ function generateTagInfoEntry(layout: LayoutConfig): any {
|
|||
project: {
|
||||
name: "MapComplete " + layout.title.txt, // name of the project (required)
|
||||
description: layout.shortDescription.txt, // short description of the project (required)
|
||||
project_url: "https://mapcomplete.osm.be/" + layout.id, // home page of the project with general information (required)
|
||||
project_url: "https://mapcomplete.org/" + layout.id, // home page of the project with general information (required)
|
||||
doc_url: "https://github.com/pietervdvn/MapComplete/tree/master/assets/themes/", // documentation of the project and especially the tags used (optional)
|
||||
icon_url: "https://mapcomplete.osm.be/" + icon, // project logo, should work in 16x16 pixels on white and light gray backgrounds (optional)
|
||||
icon_url: "https://mapcomplete.org/" + icon, // project logo, should work in 16x16 pixels on white and light gray backgrounds (optional)
|
||||
contact_name: "Pieter Vander Vennet", // contact name, needed for taginfo maintainer (required)
|
||||
contact_email: "pietervdvn@posteo.net", // contact email, needed for taginfo maintainer (required)
|
||||
},
|
||||
|
|
|
@ -132,7 +132,7 @@ function addMaprouletteTags(properties: GeoJsonProperties, item: any): GeoJsonPr
|
|||
If it doesn't match any other OSM item, you can create a new one.
|
||||
Here is a list of tags that can be added:
|
||||
${properties["tags"].split(";").join("\n")}
|
||||
You can also easily import this item using MapComplete: https://mapcomplete.osm.be/onwheels.html#${
|
||||
You can also easily import this item using MapComplete: https://mapcomplete.org/onwheels.html#${
|
||||
properties["id"]
|
||||
}`
|
||||
return properties
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue