Skip to content
Bryan Housel edited this page May 24, 2024 · 23 revisions

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

 

tl;dr

To add your community resource to the index:

  • Add resource .json files under the resources/ 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 the features/* 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.

 

Resource Files

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).

 

locationSet (required)

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 the features/* folder of this project (see Feature Files for details)
    Each Feature must have an id 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:

 

type (required), account (optional)

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.

 

strings (required)

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 the account value
    (e.g. "The {account} mailing list" -> "The talk-et mailing list")
  • {community} - Will be replaced with the community value
    (e.g. "{community} on Facebook" -> "OpenStreetMap Ethiopia on Facebook")
  • {url} - Will be replaced with the url value
    (e.g. "Visit {url} to learn more" -> "Visit http://example.com to learn more ")
  • {signupUrl} - Will be replaced with the signupUrl value
    (e.g. "Signup at {signupUrl}" -> "Sign up at http://example.com ")

String Defaults

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.

 

contacts (optional)

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

 

events (optional)

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 and where will be translated
  • id - (required if i18n=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

Home

For Contributors

For Developers

Information for developers using the osm-community-index in another project.

For Maintainers

Information for maintainers, including how to clone and build the project.

 

Clone this wiki locally