[00:10:01]
<12b> I tried using Path.suffix, in the case of `Moulinette.interface.type != "api"` and tested that it is working when setting a cube file from the CLI with soemting like `yunohost app config set vpnclient main -a 'service_enabled=true&config_file=/root/vpn658.cube'`. The modified code I tested is below :
```
if Moulinette.interface.type != "api":
path = Path(value)
if not (path.exists() and path.is_absolute() and path.is_file()):
raise YunohostValidationError("File doesn't exists", raw_msg=True)
content = path.read_bytes()
mimetype = Magic(mime=True).from_buffer(content)
ext = path.suffix
else:
content = b64decode(value)
mimetype = Magic(mime=True).from_buffer(content)
ext = mimetypes.guess_extension(mimetype)
```
But I don't know where to get the file name when this code is called from the web admin. Is it possible to get it in theis case?
As a side note, I don't see where the extention stored in the `ext` variable is then used in the case of setting the cube file of vpnclient. Am I missing something?
[00:10:16]
<12b> I tried using Path.suffix, in the case of `Moulinette.interface.type != "api"` and tested that it is working when setting a cube file from the CLI with someting like `yunohost app config set vpnclient main -a 'service_enabled=true&config_file=/root/vpn658.cube'`. The modified code I tested is below :
```
if Moulinette.interface.type != "api":
path = Path(value)
if not (path.exists() and path.is_absolute() and path.is_file()):
raise YunohostValidationError("File doesn't exists", raw_msg=True)
content = path.read_bytes()
mimetype = Magic(mime=True).from_buffer(content)
ext = path.suffix
else:
content = b64decode(value)
mimetype = Magic(mime=True).from_buffer(content)
ext = mimetypes.guess_extension(mimetype)
```
But I don't know where to get the file name when this code is called from the web admin. Is it possible to get it in theis case?
As a side note, I don't see where the extention stored in the `ext` variable is then used in the case of setting the cube file of vpnclient. Am I missing something?
[00:10:48]
<12b> I tried using Path.suffix, in the case of `Moulinette.interface.type != "api"` and tested that it is working when setting a cube file from the CLI with someting like `yunohost app config set vpnclient main -a 'service_enabled=true&config_file=/root/vpn658.cube'`. The modified code I tested is below :
```
if Moulinette.interface.type != "api":
path = Path(value)
if not (path.exists() and path.is_absolute() and path.is_file()):
raise YunohostValidationError("File doesn't exists", raw_msg=True)
content = path.read_bytes()
mimetype = Magic(mime=True).from_buffer(content)
ext = path.suffix
else:
content = b64decode(value)
mimetype = Magic(mime=True).from_buffer(content)
ext = mimetypes.guess_extension(mimetype)
```
But I don't know where to get the file name when this code is called from the web admin. Is it possible to get it in this case?
As a side note, I don't see where the extention stored in the `ext` variable is then used in the case of setting the cube file of vpnclient. Am I missing something?
[00:11:21]
<12b> I tried using Path.suffix, in the case of `Moulinette.interface.type != "api"` and tested that it is working when setting a cube file from the CLI with someting like `yunohost app config set vpnclient main -a 'service_enabled=true&config_file=/root/vpn658.cube'`. The modified code I tested is below :
```
if Moulinette.interface.type != "api":
path = Path(value)
if not (path.exists() and path.is_absolute() and path.is_file()):
raise YunohostValidationError("File doesn't exists", raw_msg=True)
content = path.read_bytes()
mimetype = Magic(mime=True).from_buffer(content)
ext = path.suffix
else:
content = b64decode(value)
mimetype = Magic(mime=True).from_buffer(content)
ext = mimetypes.guess_extension(mimetype)
```
But I don't know where to get the file name when this code is called from the web admin. Is it possible to get it in this case?
As a side note, I don't see where the extention stored in the `ext` variable is then used when setting the cube file of vpnclient. Am I missing something?
[05:36:35]
<Bram> I kinda REALLY want to add tox as a job/test/build tool for all the code I'm working on 😩
[05:36:57]
<Bram> but idk how much it would be to ask contributors to adopt and a use a new tool even if it's simple >_>
[08:43:15]
<Salamandar> _writing tests_
[20:57:58]
<Yunohost Git/Infra notifications> [issues] Psycojoker closed [issue #2365](https://github.com/YunoHost/issues/issues/2365): Push tools/readme_generator/templates/README.md.j2 on weblate so we can translate it
[21:11:53]
<Bram> so, what's the next most important thing to make translatable?
[21:15:30]
<Salamandar> https://aria.im/_matrix/media/v1/download/matrix.org/cqLGiQiGDkkbeWcgILiQDBeU
[21:16:46]
<Bram> that doesn't help x)
[21:17:27]
<Bram> https://forum.yunohost.org/t/files-that-needs-translations-but-are-not-on-the-weblate/28783 there is this post
[23:06:27]
<Yunohost Git/Infra notifications> [yunohost] Psycojoker [commented](https://github.com/YunoHost/yunohost/pull/1805#issuecomment-2016067636) on [issue #1805](https://github.com/YunoHost/yunohost/pull/1805) [enh] Implement yunohost log show last to display the last log file.: I dont understand why you arent using CLI arguments like "--last/-l" and "--number-of-logs/-N" and parsing a string in...
[23:59:39]
<Émy - OniriCorpe> > <@Bram_:matrix.org> so, what's the next most important thing to make translatable?
[antifeatures.toml](https://github.com/YunoHost/apps/blob/master/antifeatures.toml) ?
[23:59:42]
<Émy - OniriCorpe> [categories.toml](https://github.com/YunoHost/apps/blob/master/categories.toml) ?