Commit Graph

21 Commits

Author SHA1 Message Date
ShaopengLin be464a5986 Introduce getSlugifiedFileName in tools.h
The function sanitizes file names depending on OS.
2024-08-14 20:11:11 +00:00
Matthieu Gautier 5a73a75798
Revert "Removed getDataDirectory()" 2024-08-12 16:22:01 +02:00
sgourdas 9fd8e81de2 Remove getDataDirectory 2024-08-11 23:46:34 +03:00
Veloman Yunkan 5927550a36 kiwix::getNetworkInterfacesIPv4Or6()
- Restored kiwix::getNetworkInterfaces() API to the version before
  support for IPv6 was introduced

- Renamed the new API method to kiwix::getNetworkInterfacesIPv4Or6()
2024-06-11 11:19:49 +02:00
Veloman Yunkan 83101679a0 Backward compatible overload of getBestPublicIp() 2024-06-11 11:19:49 +02:00
Aryan Arora b7eadf95bf handle ip modes & add compilation flags for windows build 2024-05-29 21:05:01 +02:00
Aryan Arora a6cf161341 add ipv6 support to HTTP daemon 2024-05-29 21:05:01 +02:00
Emmanuel Engelhart 843adb3397
Improve documentation 2024-05-20 15:41:31 +02:00
Nikhil Tanwar 385931f229 Move getLanguageSelfName to tools.h
This is a general utility which other ports can get use of.
Added tests
2023-07-26 16:02:32 +05:30
Nikhil Tanwar 94d6bef402 Introduce readCategoriesFromFeed()
Added a function to load categories stored in an OPDS stream
2023-07-26 16:02:32 +05:30
Nikhil Tanwar a28c2973e9 Introduce readLanguagesFromFeed()
Added a new function to read languages stored in an OPDS feed
2023-07-26 16:02:32 +05:30
Matthieu Gautier 1be5424711 Add missing include.
`uint64_t` type (used by `beautifyFileSize`) need to be declared.
2023-07-25 13:37:31 +02:00
Nikhil Tanwar 5c3a997de4 make beautifyFileSize public
This general function will be useful in other kiwix apps
2023-07-21 22:19:45 +05:30
Emmanuel Engelhart aa50845e22 Fix small typos in comments 2022-01-09 20:05:30 +01:00
Nikhil Tanwar 3dbcbe542b Add tests for kiwix::fileExists and kiwix::fileReadable 2022-01-10 00:18:44 +05:30
Nikhil Tanwar 854058f842 Introduce kiwix::fileReadable
kiwix::fileExists only checks for file existence now
kiwix::fileReadable will check if the file is readable (implicitly checking for file existence also)
2022-01-05 20:16:38 +05:30
Nikhil Tanwar 9554ab5db0 Make getNetworkInterfaces() and getBestPublicIp() available via tools.h
Remove HTTP URL helper line - should be done in kiwix-serve
Add getters at server level - getAddress and getPort
2021-12-22 22:38:16 +05:30
Manan Jethwani 30e4c549e4 exposed fileExist, getMimeTypeForFile and getFileCoontent functions 2021-10-12 19:44:38 +05:30
Matthieu Gautier 0b6b6716de Rename split argument from `trimEmpty` to `dropEmpty`. 2021-07-07 14:43:13 +02:00
Matthieu Gautier b70c92cade Move back used helper functions to the public API.
- Add docstring
- Move the declaration in kiwix namespace.
- Adapt our include to include the right headers.
2021-07-07 14:43:13 +02:00
Matthieu Gautier 09d843da3a Add a (empty) `include/tools.h` header.
This header will contain our public tool functions.
2021-07-07 14:43:13 +02:00