Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SimpleIni (PACMAN-945) (IEC-141) #357

Open
1 task done
diplfranzhoepfinger opened this issue Jul 29, 2024 · 6 comments
Open
1 task done

SimpleIni (PACMAN-945) (IEC-141) #357

diplfranzhoepfinger opened this issue Jul 29, 2024 · 6 comments
Labels
Component: new request Set this label for issues which request a new component to be added

Comments

@diplfranzhoepfinger
Copy link
Contributor

Related area

Component https://github.com/brofield/simpleini

Is your feature request related to a problem?

https://github.com/brofield/simpleini

Describe the solution you'd like

would like this as a ESP Component

Describe alternatives you've considered

.

Additional context

.

I have checked existing list of Feature requests and I have provided enough information.

  • I confirm I have checked existing list of Feature requests and I have provided enough information.
@github-actions github-actions bot changed the title SimpleIni SimpleIni (PACMAN-945) Jul 29, 2024
@igrr igrr transferred this issue from espressif/idf-component-manager Jul 29, 2024
@github-actions github-actions bot changed the title SimpleIni (PACMAN-945) SimpleIni (PACMAN-945) (IEC-141) Jul 29, 2024
@igrr
Copy link
Member

igrr commented Jul 29, 2024

There is one ini-related component contributed by @leeebo already: https://components.espressif.com/components/leeebo/esp-inih.

(Note, however, the version is 0.0.2, and it hasn't been updated with the latest upstream releases, so I don't know how future-proof it is.)

@diplfranzhoepfinger
Copy link
Contributor Author

There is one ini-related component contributed by @leeebo already: https://components.espressif.com/components/leeebo/esp-inih.

totally true, i use it a lot.
cool lib.

but it can ONLY read *.ini.
not write.

(Note, however, the version is 0.0.2, and it hasn't been updated with the latest upstream releases, so I don't know how future-proof it is.)

ah, OK.. @leeebo might be easily able to update it.

@leeebo
Copy link

leeebo commented Jul 30, 2024

The upstream inih only support parsing .ini file, I don't think it will offer write support.

This requirement comes from the esp-box project, We chose ini to better interact with the PC. The esp-box as USB flash drive, and there is a virtual ini file in it. Users can modify the ini file through PC editor, and then esp-box parses and uses these configuration items.

@diplfranzhoepfinger any write use cases from your side?

@diplfranzhoepfinger
Copy link
Contributor Author

The upstream inih only support parsing .ini file, I don't think it will offer write support.

no, it does not.

@diplfranzhoepfinger any write use cases from your side?

yes, and i was able to get simpleini running on a ESP32S3.

it does already write ini Files.
and read of course.

@diplfranzhoepfinger
Copy link
Contributor Author

just found that in the GTK Project there is a alternate Lib for INI Writing and reading:

https://docs.gtk.org/glib/struct.KeyFile.html

but maybe it is less portable and more Memory intensive ?

Thanks,
Franz

@diplfranzhoepfinger
Copy link
Contributor Author

@igrr
@leeebo

i made you a Demo here:
https://github.com/DiplomInformatikerFranzHoepfinger/SimpleIni_on_esp32

i uses the https://github.com/espressif/esp-idf/tree/master/examples/protocols/http_server/file_serving
to enable a easy access to the ini File.

it writes the followings keys:

[test-Sec]
test-key = ffffffffffffffff
test-key3 = fefefefefefefefe

Thanks go out to Peter Wegscheider for contributing its Wrapper (settingsIni.cpp) under the MIT License.

Regards,
Franz

@anastasia-be anastasia-be added the Component: new request Set this label for issues which request a new component to be added label Aug 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: new request Set this label for issues which request a new component to be added
Projects
None yet
Development

No branches or pull requests

4 participants