~mil/mepo

1.3.3 2 months ago .tar.gz browse log

This was a minor patch release for just one change:
- Remove unneeded cast, use curl.curl_off_t for progress_dl_{now,total} directly

1.3.2 2 months ago .tar.gz browse log

This was a minor patch release to fix 3 small issues:

- Fixes mobroute script CLI compatability to work against mobroute CLI 0.7.0
- Explicitly cast curl_off_t values to avoid cross build errors
  (thanks @tranzystorekk)
- A few small code nits around @This and unused params
  (thanks @Nguyễn Gia Phong)

1.3.1 4 months ago .tar.gz browse log

This was a minor patch release to fix two small issues:
  - Zero initialize all arguments in jsonapi_execute_parseargs
    (Relevant for -Doptimize=ReleaseSafe)
  - Fix memory leak; use arena allocator within jsonapi_execute

1.3.0 4 months ago .tar.gz browse log

This release was focused on several changes to improve the application's
overall UX. The major changes applied are:

- JSON API Added to Replace Mepolang DSL
- Cancellable & Non-blocking shellpipe_sync (thanks to: Nguyễn Gia Phong)
- GeoJSON Import & Mobroute GTFS Routing Support
- Codebase Updated to Build Against Zig 0.13.0 (thanks to: lauren n. liberda)
- Misc QA & Usability Updates

----

1. JSON API Added to Replace Mepolang DSL
The former 'Mepolang' DSL has been replaced by a standard JSON API. This
was motivated largely by long-term maintainability concerns and user
feedback. One of the major pieces of feedback I've received about Mepo
over time is that the DSL aspect was both difficult to understand and
work with. The new JSON API has the same functionality as the old Mepolang
DSL in that it is just a simple way for you to configure the application
(via ~/.config/mepo/config.json) & pass arbitrary commands to mepo at
runtime in scripts. However the new JSON API both in configuration and
scripting should be much easier to work with (being standard JSON and no
special DSL syntax to learn). All commands and arguments for the JSON API
(formerly Mepolang) have stayed the same for the most part and this is
largely just a syntax / usability update.

In the former Mepolang DSL syntax you would write:
prefset_n lat 33.33;

And now rather, in the new JSON API syntax you write:
[{
  "cmd": "prefset_n",
  "args": {"pref": "lat", "value": 33.33}
}]

More details are available at the new JSON API doc at:
- https://mepo.lrdu.org/jsonapi.html

2. Cancellable & Non-blocking shellpipe_sync (thanks to: Nguyễn Gia Phong)
Nguyễn Gia Phong (~cnx) has graciously taken care of the longstanding
ticket for #65 concerning the fact formerly the entire UI would freeze up
upon launching a command or script via shellpipe_sync. The former model
has been updated in that shellpipe_sync scripts now don't interrupt /
freeze the SDL loop itself and are asynchronously launched. Further and
importantly external shellpipe_sync scripts are now cancellable via a
UI button. Upon launching a script the UI is greyed out and a cancel
button appears. Pressing cancel send a SIGTERM signal to the external
process. Much thanks to ~cnx for taking care of this feature. With this
update, the UX of externally launched scripts is vastly improved.

3. GeoJSON Import & Mobroute GTFS Routing Support
A rudimentary GeoJSON import script has been added
(mepo_geojson_import.sh) which converts each standard GeoJSON Point
to a pin_add mepo JSON API command. This GeoJSON import script may
be used standalone and in addition the geojson script is used by a
new interactive script enabling routing via Mobroute (which outputs
GeoJSON). For the interactive script allowing routing via Mobroute
(mepo_ui_menu_route_mobroute.sh) you can select this item from the central
menu. If you have 2 pins in the currently active pingroup, this script
given a GTFS Feed ID will route between these points. You will need to
be patient as if GTFS data is not loaded for the specified GTFS Feed ID,
the GTFS data will be fetched and prepared upon first usage. See more
details on the new GeoJSON import script & Mobroute GTFS Routing support
at the updated userguide:

- https://mepo.lrdu.org/userguide.html#routing
- https://mepo.lrdu.org/userguide.html#geojson-import

4. Codebase Updated to Build Against Zig 0.13.0 (thanks to: lauren n. liberda)
The codebase has been updated build against zig 0.13.0 via lauren
n. liberda. Packagers should be aware to update the build dependency as
such. Thank you to lauren for taking care of the zig version update.

5. Misc QA & Usability Updates
A number of smaller but important QA and usability updates have been
made which are mentioned in short below:

- User configuration has been moved to ~/.config/mepo/config.json

- Autosave/load functionality in the default configuration has been removed
  and new scripts have been added to save/load state. Buttons for Save/Load
  have been added in the defaults.

- The complex async pin editing script has been removed and replaced by a
  simple 'drop pin' script bound to the 'f' key keybinding. More complex
  pin configuration and bookmarks can be accomplished through the user
  configuration if desired.

- The -ndc commandline flag to disable default configuration has been
  removed. Users who wish to enable custom functionality are encouraged to
  override keybindings & other defaults via their ~/.config/mepo/config.json
  file.

- The -docman commandline flag to generate manpage documentation for the
  Mepolang DSL has been removed. The documentation website at
  http://mepo.lrdu.org is the defacto documentation source for mepo &
  its JSON API.

- The -i commandline flag has been updated to parse JSON API commands. The
  delimiter for each set (array) of JSON commands in the newline. See docs
  for further details.

- The shellpipe_sync command now saves the state of the application
  (equivalent to filedump command) to ~/.cache/mepo/shellpipe_savestate.json
  This state can be parsed through for advanced shellpipe scripts.

- The functionality of the GraphHopper script was changed to match the Mobroute
  script in that it will route between the first 2 pins the current pin group.

- The center button has been removed from the default configuration. Mozilla
  Location Services (MLS) public instance has been deprecated upstream and
  thus this script may no longer function properly. A long term fix is needed.

- A number of small memory leaks have been identified and corrected thanks
  to Nguyễn Gia Phong.

- Findutils has been removed as a dependency thanks to Hugo Osvaldo
  Barrera. (Findutils was only needed in one edgecase in scripts which has
  been removed)

- A few keybindings have changed in the default config: `f` drops a pin,
  `i` saves state, `u` reloads states, `r` routes via Mobroute, `R` routes
  via GraphHopper. See the documentation site / JSON API doc for details
  on default config keybindings.

- As a good amount of default functionality has been changed and with
  the introduction of the JSON API, the documentation has been reworked
  in large part. I've also moved the official documentation site to be
  located at: http://mepo.lrdu.org

1.2.1 7 months ago .tar.gz browse log

This is a minor release in order to update the codebase to build against
zig 0.12.x. This release tag, 1.2.1, builds against zig 0.12.x.

1.2.0 1 year, 3 months ago .tar.gz browse log

This release addresses several long-standing but important performance
improvements and bugfixes. Most notably this release drastically
improves performance of rendering with large number of pins onscreen
(addressing ticket #26) by implementing a caching layer for pin
rendering. Additionally, this release updates the codebase to build
against Zig 0.11.x. Major changes listed below:

1. Implementation of a caching layer for pin rendering
Pin rendering since initial implementation has been based on a naive
rendering per-frame strategy. As a result, in 1.1 and earlier versions,
dragging the screen forces (an often) slowed / lagged performance
depending on the number of pins onscreen. This was most noticeable with
a large number of pins on the screen in an activated unordered group
(due to slow font rendering for each pin's label) and ordered groups
(due to the underlying antialiased connecting line drawing function
being a relatively expensive operation).

To address this performance hit, in this release an intermediate caching
layer has been implemented for pin rendering. The implementation is
similar to how PNG caching operates for OSM tiles. For pins, however,
*transparent* tiles are computed with the graphical rendered pin data
(e.g. pin, connecting paths, font text, etc.); and this data is cached
as a SDL texture just as PNG OSM tiles are similarly cached on an XYZ
basis. Accordingly, when dragging the viewport, pin layer (re)rendering
only applies if there is a change (e.g. a new pin, etc.) or the pin tile
is absent from the cache. In most cases, the cache is utilized to pull
the computed pin 'overlay tile'. The net effect end-users will notice
is that dragging is smoother when a large number of pins are present
on screen. The most noticeable on mobile devices where performance
was previously bottlenecked in the old/removed per-frame pin rendering
strategy / implementation.

This closes (#26).

2. Switch to select SDL auto renderer by default & -hw & -tw CLI flags
Rather then by default attempting to force the SDL hardware renderer,
now 0 is used for the SDL_CreateRenderer default flags. This select the
hardware renderer when available and falls back to software renderering
when hardware rendering is not available. This fixes the inconvenient
functionality where you would need to manually pass the -sw flag when
the hardware rendering would fail to initialize on certain platforms.

In addition to switching to use the SDL auto renderer, two new CLI flags
have been added related to SDL renderering:

-hw: The new -hw flag mirrors the -sw flag in that the -hw flag forces
the hardware renderer rather then the default auto renderer functionality.

-tx: And, the new -tx flag allows you to specify the number of textures
to be loaded into memory for the OSM tile and new pin overlay tile
caches. By default this is set to 200 textures. Specify -tx# to change
this as desired.  For example, to reduce the number of textures cached
to be 100, you could run `mepo -tx100`.

3. Update to Zig 0.11.x and Unpinning Zig patch number
The codebase has been updated to build against Zig 0.11.x thanks to
Nguyễn Gia Phong (cnx). Additionally, it was pointed out by laalsaas
that Zig patch numbers won't break builds so from now on, our builds
don't depend on a specific zig patch number (e.g. 0.11.0); but rather
only on the major/minor revision (e.g. 0.11.x).

4. Misc updates: PNG errorcheck, Init STDERR debug, contributor fixes
Lastly, a few minor additional bugfixes & updates have been addressed in
this release I'll mention here. Firstly, in previous releases invalid
PNG data loaded from tileservers could be downloaded and inadvertently
saved to the filesystem. This has been resolved and now only valid PNG
data (checked before write) will be saved to the filesystem. Secondly,
debug STDERR messages in the early application initialization stage are
now shown by default which should enable easier debugging in early boot
stages of the application. And finally contributors sent a few fixes
which have been merged; git shortlog from contributors below:

Nguyễn Gia Phong (5):
      Specify build for Zig 0.11
      Refactor redundant pin cycling logic
      Replace deprecated std cstr.cmp with mem.orderZ
      Use Zig 0.11 syntax for captured index in for loop
      Port to Zig 0.11 builtins with type inference

laalsaas (1):
      unpin zig patch number

lpt (1):
      mepo_ui_menu_user_pin_updater.sh: fix == in place of =

Jan Beich (1):
      Use OS-independent sigaction after fc6156a833bb

1.1.2 1 year, 10 months ago .tar.gz browse log

This is a minor release in order to update the codebase to build against
zig 0.10.1.  This release tag, 1.1.2, builds against zig 0.10.1.

1.1.1 2 years ago .tar.gz browse log

This is a minor release in order to update the codebase to build against
zig 0.10.0.  The mepo 1.1 tag was built against zig 0.9.1.  This release
tag, 1.1.1, builds against zig 0.10.0.

In addition to the build update to update to zig 0.10.0, the following
small bugfixes have been included:

- make userpin updater less verbose (thanks to laalsaas)
- fix user_pin_updater on all locales (thanks to laalsaas)
- Use TTF_RenderUTF8_Blended instead of TTF_RenderText_Blended, which
  fixes the rendering of non-ascii text entities. (#57)
  (thanks to hummer12007 for reporting this issue)

1.1 2 years ago .tar.gz browse log

This release was focused on several feature and quality improvements
including: the addition of new pin_transfer & pin delete commands,
improvements to the bind_button command, switching to use for zenity
for menuing in all environments, and several other minor bugfixes and
feature updates.  Major changes in this release cycle are described below:

1. Addition of new pin_transfer & pin_delete commands
A new command, pin_transfer, has been added which allows the user to
transfer pins from one group to another. This command makes saving &
combining target search resultsets (such as from Nominatim, Overpass
etc.) in the default configuration much simpler as you can simply move
pins from the search results (e.g. pin group 0) to other pin groups 0-9.
The pin_transfer command supports both moving a single pin from one group
to another, in addition to moving all pins in the group to another target
group. See either the manpage documentation or the mepolang documentation
website for information on using this command.

Additionally, another new command, pin_delete, has been added which
allows the user to delete a target pin by handle and also supports
deleting the currently active pin.

The pin_transfer & pin_delete commands are used in conjunction in the
default configuration with updates to the bind_button command (described
below) to expose this functionality to end-users in the UI. These two
commands are also exposed as keybindings; the new keybindings are covered
in the last section of these release notes.

2. Top UI buttons & bind_button improvements
The bind_button command's functionality has been greatly improved in this
release in three ways: 1) bind_button's visible_only_when_pin_active
argument now automatically positions buttons along the top of the UI
(above the pin detail overlay) when a pin is active, 2) bind_button now
allows associating a group number with the button (and thus indicating
the pin group color on the button and also highlighting the button when
the associated pin group is active), and 3) supporting click vs hold
functionality to dispatch different mepolang code if the button is held
versus clicked.

These 3 changes open up numerous usecases for end-users; and in the
default configuration, end-users will note this functionality has been
utilized so that 0-9 buttons are now visible in the top bar alongside
the pin details overlay. Clicking 0-9 will transfer the currently active
pin to the target group and holding 0-9 will transfer all pins in the
current group to the target group. The colors for each group are shown
in the top bar and it is now easier to determine which group you're
currently activated on and move pins between groups. In addition, `Del`
and `~` buttons have been added to the new top button bar to allow for
deleting the currently active pin and toggling the verbosity of the pin
detail overlay respectively. The buttons for switching between pins &
purging the current pin group have been moved from the bottom button bar
to the top button bar as well. The userguide has been updated to detail
these end-users changes.

3. Menuing switched to use zenity for all environments; dmenu/bemenu dep removed
Zenity has been switched to be the sole menuing option for mepo's scripts
after determining this method is well supported in all environments in
testing based on the last release cycle. Zenity provides a separate
window for user input and list selection, rather then a dock window,
which provides good cross-environment compatibility for Phosh, Sxmo,
Plasma Mobile, desktop X, and desktop Wayland environments.

Using zenity, dependencies on dmenu & bemenu have been removed and
packaging & end-user installation is now simplified as users do not have
to determine the menuing system to use. To this end, the logic for dmenu
& bemenu menuing has been removed entirely, however it should be noted
for end-users who would prefer legacy style dmenu or bemenu menuing
the `MEPO_MENUING` env variable may be used with a custom script in
if desired.

The polishing and completeness around zenity's integration has also
been improved. In the 1.0 release, zenity had icon glyphs not shown
properly. The icon glyphs used for zenity used are now more common &
available with the default monospace font on Alpine Linux. Additionally,
in 1.0, the overpass script presented so many options that the zenity
menuing had to show multiple pages for item selection; to address this,
the number of results has been reduced and only a single page is shown
for the overpass POI search script. And finally on zenity integration
polishing, on X-based environments where zenity is set to be a floating
window, xwininfo is used to automatically determine and place the sizing
of the window.

In this release, packagers should note to remove dependencies on: bemenu,
xdotool, dmenu, and font-inconsolata-nerd. And packagers should add
dependencies for zenity, findutils, and xwininfo.

4. Misc bugfixes & feature improvements
A few other miscellaneous bugfixes and feature improvements have been
made in this release cycle I'd like to mention here:

Firstly, an outstanding bug relating to the geolocation / user pin updater
script has been made such that Geoclue and MLS are now preferred over
GPSd as the default geolocation positioning provider. In prior releases
if you used the user pin updater script (e.g. by pressing `Center`
in the UI) and had not properly configured GPSd, the entire UI would
freeze up.  The reason for this is that in most scenarios GPSd needs to
be configured by end-users manually and without quick fix acquisition (as
is an ongoing issue with the Pinephone and eg25manager), it's better for
us to use Geoclue by default and allow Geoclue to dispatch the provider
used automatically.  MLS is the second fallback now, and GPSd is last.
It should be noted, Geoclue will use GPSd in anycase if configured and
available on the user's system. For end-users who want to customize
the provider function used for geolocation lookups, they may use the
new `MEPO_GEOLOCATE_COORDSVIAMETHOD` env variable which is documented in
the userguide.

Secondly, some preferences have been changed in the default configuration
such as for pin group colors, pin group ordering, and a new preference,
overlay_pindetails_expanded, has been introduced to allow the user to
toggle the verbose of the pin detail overlay. If you notice strangeness
when upgrading to this release (with pin groups), it's recommended
to purge your savestate cache at ~/.cache/mepo/savestate which may
incorporate 1.0 defaults and override the 1.1 defaults. The 1.1 defaults
will be automatically installed if ~/.cache/mepo/savestate is missing.

Thirdly, the display for pins has changed slightly such that the active
pin now shows its label with a gray background and with the pin having
a red outline then being fully red. This change was made to make the
the active pin & pin group more clear to end-users. When transferring
the active pin between groups, as is now a simple operation in the UI
with changes mentioned above in (2), there is a clear visual indication
of this.

And finally, the default configuration has been updated to incorporate
a few new hotkeys based on new application functionality added in
this release cycle: shift + 0-9 will move a pin to the target group,
control + shift + 0-9 will move all pins in your current group to the
target group using pin_transfer, the d hotkey now deletes the current
pin, shift d deletes all pins in the current group, and shift -/+ now
adjusts the UI fontsize. These hotkeys may be referenced further by
examining the bind_key commands set in the default configuration which
may be referenced either in the manpage or the documentation website.

1.0 2 years ago .tar.gz browse log

This release was focused on completing documentation and polishing
features to finalize the roadmap and address Milestone 6. In addition,
this release also added support for Plasma Mobile and alternative UI
environments by way of adding support for menuing to mepo's scripts via
zenity to address Milestone 8. A manpage documentation generator has been
added under a CLI flag and the markdown API documentation generator CLI
flag has been reworked to be more exhaustive. End-user documentation has
been moved to a separate repository mepo_website as part of the launch of
the new documentation website http://mepo.milesalan.com. Major features
changes in this release cycle are described below:

1. Mepo scripts customizable ENV variables
All ENV variables considered potentially privacy-concerning such as
URL endpoints connected to the default public instances of Nominatim,
Overpass, and GraphHopper have been updated to be user-customizable
rather then being hardcoded. These environment variables all start with
`MEPO_` and can be seen documented along with default values on the new
mepo documentation website's user guide or can be referenced from each
script directly.

In addition to URL endpoints and API keys now being customizable, a
number of feature-related ENV variables have been introduced such as
MEPO_USERPIN_ENABLED which allows for the enabling or disabling of the
default user pin location updating script. MEPO_USERPIN_ENABLED may be set
to 0 to disable the default user positioning pin dropping. Additionally,
a newly introduced  environment variable, MEPO_MENUING, allows for
customization of the menuing program (bemenu, dmenu, or zenity) used
for menuing and user input in scripts. The user may set MEPO_MENUING
to either inputbemenu, inputdmenu, or inputzenity to use bemenu, dmenu,
or zenity respectively.

2. Plasma Mobile & Alternative environments support: Zenity & OSK detection
Zenity has been added as a menuing/user input method for mepo's
scripts. Primarily the motivation behind adding zenity support is that
compatibility on Plasma Mobile is best with a proper separate window
rather then a dock menu. In addition, zenity is now used as a fallback
method where bemenu or dmenu is not available. As mentioned in (1),
the new MEPO_MENUING environment variable has been introduced to support
user customization of their preferred menuing method. Zenity is generally
the most UI platform cross-compatible menuing option and is additionally
used as the default in the newly added mepo flatpak.

In addition to changes made to support zenity, which is used for Plasma
Mobile..  testing has also taken place and minor changes have been made
in the Zig codebase similar to changes for Phosh to automatically hide
the onscreen keyboard when not necessary on Plasma Mobile.

These two changes (menuing support via zenity; and tweaks for Plasma
Mobile's OSK), makes Plasma Mobile a first-class supported target
for mepo. The 3 major mobile environments which mepo now supports
match postmarketOS's 3 major mobile UI environments of: Sxmo, Phosh,
and Plasma Mobile. Other environments will likely benefit as well from
zenity support too.

3. Manpage & Markdown API documentation generation
A new commandline flag -docman had been added to allow for the generation
of a manpage which covers all mepolang commands, preferences, commandline
flags, and the default config.  While the website is more exhaustive in
covering user guides, integrating images and demo videos; the manpage
can serve as a good entrypoint for beginner or advanced users who do
not wish to use the documentation website.

Packagers should use the manpage generator flag and save to a `.1` file
in the build process for the manpage to be distributed in documentation
packaging. For example: `mepo -docman > /usr/share/man/man1/mepo.1`. As
for end users, in distributions which documentation may not have been
properly installed, having the manpage doc be generated directly from
the binary now also allows direct viewing from mepo's CLI via man using
man's `-l` flag. For example to view the manpage directly from the mepo
CLI you can now simply run: `mepo -docman | man -l`.

In addition to the new -docman flag, the -docmd flag available in prior
versions of mepo which generates dynamic mepolang documentation has been
extended upon to include preference table generation, commandline flags
and the default config documentation to have parity with the generated
manpage. The markdown document generated from the -docmd commandline flag
is used in the build system for the new mepo documentation website and the
rendered result can be seen at http://mepo.milesalan.com/mepolang.html.

4. Documentation guides moved to mepo_website repository
All markdown-based documentation which previously resided
in the `doc/` folder has been moved to be hosted within the
new mepo_website repository. This repository is available at
http://sr.ht/~mil/mepo_website and is responsible for generating the
static site for http://mepo.milesalan.com

The new documentation mepo website at http://mepo.milesalan.com covers
an install guide, user guide, scripting guides, and more. Demo videos and
new screencasts have been created which are hosted at this site as well.
This new website is the official 'source-of-truth' for all things mepo
documentation rather then the previous `doc/` folder within the mepo
repository.
1 / 2

Branches

master
246ff115 — Dimitri Kaparis 22 days ago
cnx-shellpipe-plus-rebase
mobroute-integration
async-shellpipe-noncontinual
nonblock-fileio-rendering
transfer-all-button-hold
test-rand-ids-for-sdl-threadname
move-sdl-user-eventtypes-to-utilsdl
initialization-threading-rework
mepolang_errorhandling
keydown-textinput-rework
text-cache-experiment-2
text-cache-experiment
rework-ui-overlays
f/wip-table-rendering
scripts-rework-and-central-menu
linkedlist-backed-queuemap
cache-dir-hierarchy
queueing-3-threads
tile-loading-experiment
transfer-canceling
renderer-refactoring