Skip to content

Commit cd8b0a0

Browse files
authored
Merge branch 'main' into patch-1
2 parents 4a45f2f + 06f390c commit cd8b0a0

File tree

587 files changed

+13757
-647
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

587 files changed

+13757
-647
lines changed

.github/workflows/build.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,10 @@ jobs:
126126
HTTPS_URL: https://developer.rebble.io
127127
JEKYLL_ENV: production
128128
DOCS_URL: /tmp/docs/
129+
ALGOLIA_APP_ID: ${{ secrets.ALGOLIA_APP_ID }}
130+
ALGOLIA_API_KEY: ${{ secrets.ALGOLIA_API_KEY }}
131+
ALGOLIA_SEARCH_KEY: ${{ secrets.ALGOLIA_SEARCH_KEY }}
132+
ALGOLIA_PREFIX: developer-rebble-io-prod-
129133

130134
- name: Upload artifact
131135
uses: actions/upload-pages-artifact@v3

_config.yml

Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,15 @@ links:
7777

7878
# Jekyll collections.
7979
collections:
80+
community_tools:
81+
output: true
82+
permalink: /community/tools/:path/
83+
community_apps:
84+
output: true
85+
permalink: /community/apps/:path/
86+
community_libraries:
87+
output: true
88+
permalink: /community/libraries/:path/
8089
guides:
8190
output: true
8291
permalink: /guides/:path/
@@ -103,6 +112,27 @@ defaults:
103112
guide_group:
104113
guide_subgroup:
105114
menu_section: guides
115+
- scope:
116+
path: ""
117+
type: community_tools
118+
values:
119+
layout: community/resource
120+
menu_section: community
121+
menu_subsection: tools
122+
- scope:
123+
path: ""
124+
type: community_apps
125+
values:
126+
layout: community/resource
127+
menu_section: community
128+
menu_subsection: apps
129+
- scope:
130+
path: ""
131+
type: community_libraries
132+
values:
133+
layout: community/resource
134+
menu_section: community
135+
menu_subsection: libraries
106136
- scope:
107137
path: ""
108138
type: changelogs

plugins/generator_algolia.rb

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ def get_config
7979
def generate_all
8080
requests = [].concat(generate_blog_posts,
8181
generate_guides,
82+
generate_community_resources,
8283
generate_documentation,
8384
generate_none_guide_guides,
8485
generate_other).compact
@@ -132,6 +133,31 @@ def generate_documentation
132133
end.compact
133134
end
134135

136+
def generate_community_resources
137+
resources = %w[community_tools community_apps community_libraries]
138+
139+
resources.flat_map do |type|
140+
collection = @site.collections[type]
141+
return [] if collection.nil?
142+
143+
collection.docs.map do |resource|
144+
Algolia::Search::MultipleBatchRequest.new(
145+
action: 'addObject',
146+
index_name: "#{@prefix}community-resources",
147+
body: {
148+
'objectID' => resource.url,
149+
'title' => resource.data['name'],
150+
'url' => resource.url,
151+
'content' => HTMLEntities.new.decode(resource.get_output),
152+
'resourceType' => type,
153+
'type' => 'community resource',
154+
'randomCode' => @random_code
155+
}
156+
)
157+
end
158+
end
159+
end
160+
135161
def generate_blog_posts
136162
@site.posts.docs.flat_map do |post|
137163
# Calculate the age of the post so we can prioritise newer posts

plugins/generator_redirects.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,13 @@ def create_old_path_redirect(page)
5050
if page.url.end_with?('/')
5151
@site.pages <<
5252
RedirectPage.new(@site, @site.source, "/developer.pebble.com#{page.url}", 'index.html', page.url)
53+
@site.pages <<
54+
RedirectPage.new(@site, @site.source, "/developer.getpebble.com#{page.url}", 'index.html', page.url)
5355
else
5456
@site.pages <<
5557
RedirectPage.new(@site, @site.source, File.dirname("/developer.pebble.com#{page.url}"), File.basename(page.url), page.url)
58+
@site.pages <<
59+
RedirectPage.new(@site, @site.source, File.dirname("/developer.getpebble.com#{page.url}"), File.basename(page.url), page.url)
5660
end
5761
end
5862
end

source/_community_apps/Hello.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
name: Hello
3+
creator: James Mattis
4+
license: MIT
5+
link: https://github.com/jamesmattis/Hello
6+
tags:
7+
- watchapp
8+
- ios
9+
- messaging
10+
---
11+
12+
_**Hello**_ demonstrates a fairly complete Pebble watch app appMessage implementation including error handling. It outputs a vareity of statistics, and provides convenient settings switches to control some of the app parameters and settings.
13+
14+
The basic appMessage demo apps provided by Pebble demonstrate the key features of the App Message system, but don't illustrate all of the potential errors, warning, and errata that you might encounter on a production app trying to send high rates of data to the Pebble Watch via App Message. The Hello watch app demo attempts to provide a more thorough example. Complete details of the iOS and Watch app implementation can be found in the NOTES.md file.
15+
16+
There is probably some silly bug in here somewhere. If you find something, let me know about it. Thanks!

source/_community_apps/caltrain.md

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
---
2+
name: Caltrain
3+
creator: Katharine Berry
4+
license: mit
5+
link: https://github.com/Katharine/pebble-caltrain/
6+
appstore: 53eb5caf6743f7a863000201
7+
tags:
8+
- watchapp
9+
- js
10+
- storage
11+
---
12+
13+
Caltrain is a Pebble app that displays upcoming trains at a station, and where
14+
those trains will stop along the remainder of each of their routes.
15+
16+
It stores the schedule locally in ``resources``, and makes heavy use of
17+
``resource_load_byte_range`` to read in the required data without running out
18+
of RAM. This is wrapped in a block reading API for performance reasons; without
19+
that it takes several seconds to load each window.
20+
21+
It also uses [`Persistent Storage`](``Storage``) to store the state of the UI,
22+
so it can be restored to the state in which you left it when you return to the
23+
app.
24+
25+
Finally, it uses PebbleKit JS to retrieve your location on launch. If it gets a
26+
response before you manually choose a station, it will automatically show the
27+
station closest to you.
28+
29+
The windows were built using [CloudPebble's UI Editor][ui-editor].
30+
31+
A python script is included to convert from the Caltrain GTFS data to the
32+
compressed format it uses.
33+
34+
Screenshots:
35+
36+
![](http://i.imgur.com/iGGxV9q.png)
37+
![](http://i.imgur.com/RNeaSQ1.png)
38+
![](http://i.imgur.com/23kD7ie.png)
39+
![](http://i.imgur.com/mHFaUMy.png)
40+
41+
[ui-editor]: /blog/2014/08/08/CloudPebble-Graphical-UI-Editor/

source/_community_apps/heroboard.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
name: HeroBoard
3+
creator: Rodrigo Mesquita
4+
license: mit
5+
link: https://github.com/rmesquit/HeroBoard
6+
language: c
7+
appstore: 54f3398f2af981c827000058
8+
tags:
9+
- watchapps
10+
- graphics
11+
- animation
12+
---
13+
Guitar Hero-based keyboard for Pebble
14+
15+
This is a Pebble app keyboard based on the game Guitar Hero. It is NOT a final product/watchapp. It is meant to be used with T3/T9 text prediction scripts. When complete, it could be implemented as an exclusive keyboard for Pebble.

source/_community_apps/multi-timer.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
name: Multi Timer
3+
creator: Matthew Tole
4+
license: mit
5+
link: https://github.com/smallstoneapps/multi-timer
6+
appstore: 52d30a1d19412b4d84000025
7+
tags:
8+
- watchapp
9+
- js
10+
- storage
11+
- config
12+
---
13+
14+
Multi Timer is a Pebble watchapp that allows you to run several timers and
15+
stopwatches simultaneously.
16+
17+
It uses [`Persistent Storage`](``Storage``) on the watch to remember your
18+
timers, and even fakes the timers running in the background by calculating how
19+
much time has elapsed since the app was last run and adding / removing this
20+
amount of time from any running timers.
21+
22+
Some parts of the C and JS code are tested, and are run automatically using
23+
[Travis CI][1].
24+
25+
The current build status of the app is: [![Build Status](https://travis-ci.org/smallstoneapps/multi-timer.png?branch=master)][2]
26+
27+
Here is what the app looks like:
28+
29+
![Multi Timer Screenshot #1 >{pebble-screenshot,pebble-screenshot--steel-black}](https://raw.githubusercontent.com/smallstoneapps/multi-timer/master/marketing/screenshots/2.7/multi-timer_2-7_01.png)
30+
31+
[1]: https://travis-ci.org/
32+
[2]: https://travis-ci.org/smallstoneapps/multi-timer/
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Resistor Time
3+
creator: Ben Combee
4+
license: mit
5+
link: https://github.com/unwiredben/resistor-time
6+
language: c
7+
appstore: 55561ff444dad6e1470000df
8+
tags:
9+
- watchface
10+
- js
11+
- config
12+
- storage
13+
- messaging
14+
---
15+
This shows the current time as a resistor with the color code matching the time of day in 24-hour time.
16+
17+
Configuration is done through a static HTML page hosted on github pages and some PebbleKit JS code that handles
18+
communication with the configuration page.
19+
20+
This only works on the Basalt color platform, as there's no point trying to show color codes on a black and white watch.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Color Selector
3+
creator: Jason Brand
4+
license: mit
5+
link: https://github.com/jas-b/color_select_lib/
6+
language: c
7+
---
8+
9+
##Description
10+
This library opens a seperate window for color selections.
11+
Useful for converting existing apps to color.
12+
13+
##Usage
14+
15+
#### 1. Add color_sel_lib.h and color_sel_lib.c to your Pebble project.
16+
```c
17+
#include "color_sel_lib.h"
18+
```
19+
#### 2. Define a handler to use the selected color:
20+
```c
21+
void handle_CS_close(int color_argb) {
22+
GColor color = (GColor){.argb = color_argb};
23+
// Do something
24+
25+
// or use directly
26+
text_layer_set_background_color(text_layer_name, (GColor){.argb = color_argb});
27+
}
28+
```
29+
#### 3. Create the window and show it:
30+
```c
31+
CSWindow * myCSWindow = cswindow_create(
32+
default_color, false,
33+
(CSCloseHandler)handle_CS_close);
34+
35+
cswindow_show(myCSWindow, true);
36+
```
37+
38+
|Parameter|Description|
39+
|---|---|
40+
|**default_color**|The default color that the window will try to match.|
41+
|**full_palette**|true to use all 64 color, false to use a subset of 11 main colors. The user can switch between the two palettes by holding the select button.|
42+
|**closeHandler**|The CSCloseHandler to fire when the keyboard closes.|

0 commit comments

Comments
 (0)