-
Notifications
You must be signed in to change notification settings - Fork 159
Contributing
If you don't understand the explanation below, feel free to post an Issue to describe your community resources. That page contains some pointers to help you fill in all the info we need. You do need a Github account to be able to post an Issue.
There are 2 kinds of files in this project:
- Under
resources/
there are.json
files to describe the community resources - Under
features/
there are custom.geojson
files
To add your community resource to the index:
- Add resource
.json
files under theresources/
folder- Each file contains info about what the resource is (slack, forum, mailinglist, facebook, etc.)
- Each file also contains info about which locations the resource is active. The locations can be country or region codes, points, or custom
.geojson
files in thefeatures/*
folder. - You can copy and change an existing file to get started.
- run
npm install
- run
npm run test
- This will check the files for errors and make them pretty.
- If you don't have Node installed, you can skip this step and we will do it for you.
- If there are no errors, submit a pull request.
These are *.json
files found under the resources/
folder.
Each resource file contains a single JSON object with information about the community resource.
Resource files look like this:
{
"id": "OSM-US-Slack",
"type": "slack",
"locationSet": {"include": ["us"]},
"languageCodes": ["en"],
"order": 4,
"strings": {
"community": "OpenStreetMap US",
"description": "All are welcome! Sign up at {signupUrl}",
"signupUrl": "https://slack.openstreetmap.us/",
"url": "https://osmus.slack.com"
},
"contacts": [
{"name": "Barney Rubble", "email": "[email protected]"}
],
"events": [
{
"id": "mappingusa2022",
"i18n": true,
"name": "Mapping USA 2022",
"description": "This virtual event is a celebration of all things OpenStreetMap and our community. This year, we will take a virtual road trip through OpenStreetMap across the United States.",
"where": "online",
"when": "2022-nov-10",
"url": "https://pretix.eu/openstreetmapus/wcna-mappingusa/"
}
]
}
Here are the properties that a resource file can contain:
-
id
- (required) A unique identifier for the resource. -
locationSet
- (required) Where the community resource is active (see below for details). -
type
- (required) Type of community resource (see below for list). -
account
- (optional) String containing the account information (e.g.talk-af
) -
languageCodes
- (optional) Array of two letter or three letter codes for languages spoken by this community -
order
- (optional) When several resources with same geography are present, this adjusts the display order (default = 0, higher numbers display more prominently) -
strings
- (required) Text strings describing this resource (see below for details). -
contacts
- (optional) Contact information for people who are responsible for the resource (see below for details). -
events
- (optional) Upcoming events that the resource wants to promote (see below for details).
Each item requires a locationSet
to define where the resource is available. You can define the locationSet
as an Object with include
and exclude
properties:
"locationSet": {
"include": [ Array of locations ],
"exclude": [ Array of locations ]
}
The "locations" can be any of the following:
-
Strings recognized by the country-coder library.
These include ISO 3166-1 2 or 3 letter country codes, UN M.49 numeric codes, and supported Wikidata QIDs.
Examples:"de"
,"001"
,"conus"
,"gb-sct"
,"Q620634"
👉 A current list of supported codes can be found at https://ideditor.codes -
Filenames for custom
.geojson
features. If you want to use your own features, you need to add them under thefeatures/*
folder of this project (see Feature Files for details)
EachFeature
must have anid
that ends in.geojson
.
Examples:"de-hamburg.geojson"
,"new_jersey.geojson"
-
Circular areas defined as
[longitude, latitude, radius?]
Array.
Radius is specified in kilometers and is optional. If not specified, it will default to a 25km radius.
Examples:[8.67039, 49.41882]
,[-88.3726, 39.4818, 32]
locationSet
Tips:
- The M49 code for the whole world is
"001"
- A current list of supported codes can be found at https://ideditor.codes
- You can view examples and learn more about working with
locationSets
in the @ideditor/location-conflation project. - You can test locationSets on this interactive map: https://ideditor.github.io/location-conflation/
Each resource must have a type
. The following values are supported:
Type | Icon | Description |
---|---|---|
aparat |
An Aparat video channel.account should contain the channel name. |
|
discord |
A Discord chat server.account should contain the server name. |
|
discourse |
A Discourse forum. For forums hosted on https://community.openstreetmap.org, account should contain the forum identifier number or string. |
|
facebook |
A Facebook group/account.account should contain the group/account name. |
|
fediverse |
A generic social website that shares its content via federation, see Fediverse for examples. | |
forum |
A generic web forum. | |
github |
A GitHub organization.account should contain the organization name. |
|
gitlab |
A GitLab organization.account should contain the organization name. |
|
group |
A generic non-OpenStreetMap local group with a url (e.g. Maptime chapter). |
|
instagram |
An Instagram account.account should contain account name. |
|
irc |
An IRC channel.url should be a clickable web join link, server details can go in description .account should contain the channel name (without leading '#'). |
|
linkedin |
A LinkedIn organization.account should contain the organization name. |
|
mailinglist |
A mailing list.url should be a link to the listinfo page, e.g. https://lists.openstreetmap.org/listinfo/talk-et .account should contain the mailing list name (e.g. 'talk-et'). |
|
mastodon |
A Mastodon account.url should be a link to the server and account page, e.g. https://en.osm.town/@osm_be
|
|
matrix |
A Matrix chat, e.g. Riot Chat. For resources available via the matrix.org server, account should contain the room or community identifier (with leading '#' or '+' as needed). |
|
meetup |
A Meetup group.account should contain the group account name. |
|
newsletter |
A newsletter that people can subscribe to.url should link to information about the newsletter. |
|
osm |
A url for an OpenStreetMap group. | |
osm-lc |
A url for an official OpenStreetMap Local Chapter. | |
reddit |
A subreddit on Reddit.account should contain the subreddit name (without leading '/r/'). |
|
signal |
A Signal group chat.url should contain the Group link. |
|
slack |
A Slack workspace.url should link to the workspace itself, and signupUrl can link to an inviter service (see example above). |
|
telegram |
A Telegram channel/group.account should contain the channel/group name. |
|
threads |
A Threads account.account should contain account name (without leading '@'). |
|
tiktok |
A TikTok account.account should contain account name (without leading '@'). |
|
twitter or x
|
An 𝕏 account.account should contain account name (without leading '@').Note that twitter and x types do the same thing. It doesn't matter which one you use. |
|
url |
A generic catchall for anything with a url . |
|
wiki |
An OpenStreetMap WikiProject page | |
xmpp |
An XMPP/Jabber channel.url should be a clickable web join link, server details can go in description . |
|
youthmappers |
A YouthMappers chapter. | |
youtube |
A YouTube channel.account should contain the channel name. |
|
zulip |
A Zulip group chat.url should contain the group chat link. |
The strings
object contains text strings that describe the community resource.
Strings should be supplied in US English, and they will be sent to Transifex for translation to other languages.
(see Translations)
"strings": {
"community": "OpenStreetMap US",
"communityID": "openstreetmapus",
"description": "All are welcome! Sign up at {signupUrl}",
"signupUrl": "https://slack.openstreetmap.us/",
"url": "https://osmus.slack.com"
}
Properties:
-
community
- (optional) Display name for the community (e.g. "OpenStreetMap Ethiopia") -
communityID
- (generated - do not edit) A simplified version of the name, used as a translation key (e.g. "openstreetmapethiopia") -
name
- (optional) Display name for this community resource (e.g. "OpenStreetMap Ethiopia on Facebook") -
description
- (optional) One line description of the community resource -
extendedDescription
- (optional) Longer description of the community resource -
url
- (optional) A url link to visit the community resource -
signupUrl
- (optional) A url link to sign up for the community resource
Also, all string properties support the following replacement tokens:
-
{account}
- Will be replaced with theaccount
value
(e.g. "The {account} mailing list" -> "The talk-et mailing list") -
{community}
- Will be replaced with thecommunity
value
(e.g. "{community} on Facebook" -> "OpenStreetMap Ethiopia on Facebook") -
{url}
- Will be replaced with theurl
value
(e.g. "Visit {url} to learn more" -> "Visithttp://example.com
to learn more ") -
{signupUrl}
- Will be replaced with thesignupUrl
value
(e.g. "Signup at {signupUrl}" -> "Sign up athttp://example.com
")
Most resource types support default string values. These can be found in defaults.json
, for example:
"facebook": {
"name": "{community} on Facebook",
"description": "Join our community on Facebook",
"url": "https://facebook.com/{account}"
},
"mailinglist": {
"name": "{account} Mailing List",
"description": "The official mailing list for {community}",
"url": "https://lists.openstreetmap.org/listinfo/{account}"
},
…
Although all string properties are optional, each resource must be able to resolve a name
, description
, and url
, either by specifying these strings directly or generating them from default values and replacement tokens.
Each community resource should have at least one contact person. This is optional.
"contacts": [
{"name": "Barney Rubble", "email": "[email protected]"}
],
Properties:
-
name
- (required) The contact person's name -
email
- (required) The contact person's email address
Resources may have upcoming events. These are optional.
"events": [
{
"id": "mappingusa2022",
"i18n": true,
"name": "Mapping USA 2022",
"description": "Join us for a free virtual conference in celebration of the Wiki and OpenStreetMap communities across North America!",
"where": "online",
"when": "2022-nov-10",
"url": "https://pretix.eu/openstreetmapus/wcna-mappingusa/"
}
]
Properties:
-
i18n
- (optional) if true,name
,description
andwhere
will be translated -
id
- (required ifi18n=true
) A unique identifier for the event -
name
- (required) Name of the event -
description
- (required) One line description of the event -
where
- (required) Where the event is -
when
- (required) When the event is (Should be a string parseable by Date.parse, and assumed to be local time zone for the event) -
url
- (optional) A url link for the event