# Ynh\_flohmarkt - flohmarkt as an app for yunohost

**URL:** https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455
**Category:** Contribute Room
**Tags:** english
**Created:** [February 9, 2024, 1:45pm UTC](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455 "2024-02-09T13:45:08Z")
**Posts on this page:** 1
**Showing post:** 6

<div class="post-metadata">

### Author: ![ChriChri](https://forum.yunohost.org/user_avatar/forum.yunohost.org/chrichri/32/8723_2.png) [@ChriChri](https://forum.yunohost.org/u/ChriChri)
#### Post date: [May 30, 2024, 5:42pm UTC](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455/6 "2024-05-30T17:42:37Z")

</div>

Here we go: version ynh6 improved the handling of backup, restore, remove, re-install a lot: [Issues - flohmarkt/flohmarkt\_ynh - Codeberg.org](https://codeberg.org/flohmarkt/flohmarkt_ynh/issues?q=&type=all&sort=&state=closed&labels=&milestone=6393&project=0&assignee=0&poster=0&archived=false)

On the way trying to replace calls directly to `curl` by ynh\_local\_curl made me look at that code and ynh\_handle\_getopts. I extended the first one to deliver features needed to use it to handle couchdb and nearly re-wrote the second one to make it possible to get the command line options I wanted.

The code is included in \_common.sh which leads to some linter warnings and available as PRs for testing and discussion:

> <https://github.com/YunoHost/yunohost/pull/1857>
>
> https://github.com/YunoHost/issues/issues/2396
> 
> depends on https://github.com/…YunoHost/yunohost/pull/1856
> 
> New version at work can be observed here: https://codeberg.org/flohmarkt/flohmarkt\_ynh/src/commit/ac1e1798ff56249848f6728013e1053416aa3db6/scripts/\_common.sh#L136
> 
> Improvements:
> \* allow GET, DELETE, PUT and POST (default)
> \* allow to provide data other than 'key1=value1&key2=value2' e.g. to post json
> \* --line\_match allows to check the server answer to return true or false
> \* other named arguments to pass user and password, disable a 2 second wait needed for downward compatibility
> \* allows headers to be send

> <https://github.com/YunoHost/yunohost/pull/1856>
>
> This is a draft that tested o.k. on the CI for apps for flohmarkt\_ynh.
> 
> \* keep…s backward compatibility
> \* allows use of named and positional parameters
> \* variables for returned parameters can be defined as arrays to have each content of a parameter that is used multiple times returned in its own array element
> \* old behaviour: concatenate seperated by ';' is preserved if
> \* use of arrays allows return values of parameters used multiple times to contain ';'
> \* namerefs are used instead of eval to assign to indirect variables

There are still features that could be improved and probably some rough edges, but I’d say we’re getting close to a nice integration.

The newer version will soon be available on the app store. Feedback like always is very welcome!

---

_[View the full topic](https://forum.yunohost.org/t/ynh-flohmarkt-flohmarkt-as-an-app-for-yunohost/28455)._
