Skip to content

Commit

Permalink
More build tweaks
Browse files Browse the repository at this point in the history
  • Loading branch information
morehawes committed Aug 11, 2022
1 parent c11828e commit ffd7575
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 8 deletions.
20 changes: 13 additions & 7 deletions Gruntfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ module.exports = function(grunt) {

var assets_path = 'assets/';

var copy_php_files = {};
var copy_plugin_files = {};
var replace_files = {};
var joe_replacements = [];

Expand All @@ -34,7 +34,7 @@ module.exports = function(grunt) {
//Copy
var to_path = String(build_path + joe_path + file_name);
var from_path = String(joe_inc_path + file_name);
copy_php_files[to_path] = [ from_path ];
copy_plugin_files[to_path] = [ from_path ];

//String Replace
var class_name = file_name.replace('.php', '');
Expand All @@ -52,11 +52,16 @@ module.exports = function(grunt) {
// return false;

//App

//Readme
var to_path = String(build_path + 'readme.txt');
var from_path = String('readme.txt');
copy_plugin_files[to_path] = [ from_path ];

//Main
var to_path = String(build_path + main_file_name);
var from_path = String(main_file_name);
copy_php_files[to_path] = [ from_path ];
copy_plugin_files[to_path] = [ from_path ];
replace_files[to_path] = [ to_path ];

//Includes
Expand All @@ -65,7 +70,7 @@ module.exports = function(grunt) {
var to_path = String(build_path + app_path + file_name);
var from_path = String(app_path + file_name);

copy_php_files[to_path] = [ from_path ];
copy_plugin_files[to_path] = [ from_path ];
replace_files[to_path] = [ to_path ];
}

Expand Down Expand Up @@ -108,6 +113,7 @@ module.exports = function(grunt) {
potHeaders: {
poedit: true
},
updateTimestamp: false,
// processPot: null,
}
}
Expand All @@ -123,8 +129,8 @@ module.exports = function(grunt) {
},

copy: {
php: {
files: copy_php_files
plugin_files: {
files: copy_plugin_files
},
joe_assets: {
files: [{
Expand Down Expand Up @@ -248,7 +254,7 @@ module.exports = function(grunt) {
]);

grunt.registerTask('build_plugin', [
'copy:php',
'copy:plugin_files',
'copy:joe_assets',
'copy:app_assets',
'string-replace:php',
Expand Down
2 changes: 1 addition & 1 deletion build/inreach-mapshare.pot
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ msgid ""
msgstr ""
"Project-Id-Version: inReach MapShare 1.0\n"
"Report-Msgid-Bugs-To: https://wordpress.org/support/plugin/build\n"
"POT-Creation-Date: 2022-08-11 22:26:27+00:00\n"
"POT-Creation-Date: 2022-08-11 22:36:19+00:00\n"
"MIME-Version: 1.0\n"
"Content-Type: text/plain; charset=utf-8\n"
"Content-Transfer-Encoding: 8bit\n"
Expand Down
93 changes: 93 additions & 0 deletions build/readme.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,93 @@
=== inReach MapShare ===
Contributors: morehawes
Tags: inreach, mapshare, embed, map, share, location
Requires at least: 4.6
Tested up to: 6.0
Requires PHP: 7.4
Stable tag: 1.0
License: GPLv2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html

Display Your Live inReach MapShare Data on Your WordPress Site.

== Description ==

This plugin enables users of Garmin inReach devices to display their *live* <a href="https://support.garmin.com/?faq=p2lncMOzqh71P06VifrQE7">MapShare</a> data using a simple Shortcode:

`
[inreach-mapshare mapshare_identifier="your_identifier"]
`

By default only your most recent location is displayed. To display more data, Start and end dates can be provided through the Shortcode like this:

`
[inreach-mapshare mapshare_identifier="your_identifier" mapshare_date_start="2022-06-15T00:00" mapshare_date_end="2022-07-31T23:59"]
`

The MapShare feature must be enabled in the <a href="https://explore.garmin.com/Social">Social</a> tab of your Garmin Explore account.

Features:

* Embed an interactive Map and timeline containing track points and messages shared with your MapShare page.
* Each point displayed contains the following information:
* Time UTC
* Time (local)
* Event (e.g. a message, or track point)
* Text (for messages)
* Latitude
* Longitude
* Elevation
* Velocity
* Valid GPS Fix
* The plugin updates your MapShare every 15 minutes and is cached to improve performance (adjustable in Settings).
* Use the in-built demo to preview how your MapShare will display (`[inreach-mapshare mapshare_identifier="demo"]`).
* Customise in WP Admin > Settings > inReach MapShare.
* Appearance settings:
* Basemap - <a href="https://www.openstreetmap.org/fixthemap">OpenStreetMap</a> by default, lots of <a href="https://leaflet-extras.github.io/leaflet-providers/preview/">other providers</a> supported.
* Colour - pick a colour to suit your theme.
* Icons - use SVG images as icons.
* Content is responsive, and adapts to suit devices both small and large.
* Customise content with your own CSS rules.
* Translation ready :)

If you experience any issues with the plugin, ensure that your MapShare page (i.e. share.garmin.com/[your_identifier]) is displaying data. This is important - this plugin can only display data available to your MapShare.

**Important! Even if you have a MapShare password set, this plugin simply uses it to request your data; it does not protect it from being viewed. You are responsible for <a href="https://wordpress.org/support/article/using-password-protection/">protecting access</a> if needed.**

Please report issues or make suggestions by creating either a <a href="https://wordpress.org/support/plugin/inreach-mapshare/">support topic</a>, or <a href="https://github.com/morehawes/inreach-mapshare/issues">GitHub issue</a>.

*This plugin is free, open-source software and is not maintained by Garmin. Data is requested from the Garmin <a href="https://support.garmin.com/?faq=tdlDCyo1fJ5UxjUbA9rMY8">inReach KML Feeds</a> service.*

== Installation ==

- Ensure MapShare is enabled in the <a href="https://explore.garmin.com/Social">Social</a> tab of your Garmin Explore account.
- Take note of your unique MapShare Address (i.e. share.garmin.com/[your_identifier]). If you have set a password to protect your MapShare page, you will also need to take note of this.
- Visit your MapShare address in your browser and verify that there is MapShare data (i.e. a message or track point) displaying. Any test message <a href="https://support.garmin.com/?faq=p2lncMOzqh71P06VifrQE7">shared with your MapShare page</a> will work.
- With this plugin is activated, go to WP Admin > Settings > inReach MapShare.
- Enter your MapShare address and submit.
- You should see your most recent location, or multiple locations if you supplied a date range.
- Add the provided Shortcode anywhere Shortcodes are supported to display the content on your site.

== Frequently Asked Questions ==

= What is an inReach device? =

<a href="https://discover.garmin.com/inreach/personal/">These</a> are small handheld "satellite communicators" which allow users (with an active <a href="https://www.garmin.com/p/837461">subscription</a>) the ability to send tracking and text/email messages from remote areas, unserved by other means of communication.

= What is MapShare? How do I set it up? =

<a href="https://support.garmin.com/?faq=p2lncMOzqh71P06VifrQE7">MapShare</a> is an inReach feature which allows friends or loved ones the ability follow progress in real time online.

= What does this plugin Do? =

This plugin requests data from your MapShare page and embeds it anywhere Shortcodes are supported.

== Screenshots ==

1.

== Changelog ==

= 1.0 =

Initial plugin release.
Binary file modified inreach-mapshare.zip
Binary file not shown.

0 comments on commit ffd7575

Please sign in to comment.