qrcode.chapril.org-libreqr/README.md

102 lines
3.7 KiB
Markdown
Raw Permalink Normal View History

2020-03-15 21:22:53 +01:00
# ![](themes/dark/icons/32.png) LibreQR
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
[Lire ceci en français](README_fr.md)
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
A PHP Web interface for generating QR codes.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
## Demo
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
A LibreQR instance is available at <https://qr.antopie.org>.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
## How it works
2019-08-14 17:12:36 +02:00
2020-10-31 16:51:50 +01:00
LibreQR includes an [OpenSearch](https://developer.mozilla.org/docs/Web/OpenSearch) plugin, which allows to add it as a search engine in Firefox and to save settings.
You can thus generate a QR code directly from your search bar with the LibreQR's settings used at the time of adding as search engine.
2019-08-14 17:12:36 +02:00
2020-10-31 16:51:50 +01:00
A [WebManifest](https://developer.mozilla.org/docs/Web/Manifest) is also included, which allows better system integration using Fennec (Firefox Android) ou Chromium.
2019-08-14 17:12:36 +02:00
2020-10-31 16:51:50 +01:00
QR codes generated are located in the temp/ directory, named with the number of random characters set in config.inc.php (32 by default), and then deleted after the time set in config.inc.php (7 days by default).
See `config.inc.php` for more settings.
2020-03-23 16:27:30 +01:00
2019-08-13 21:17:08 +02:00
## Installation
2020-10-31 16:51:50 +01:00
### Generic
Just place this source code in a Web server with PHP.
`wget https://code.antopie.org/miraty/libreqr/archive/1.2.0.zip`
2019-08-14 17:12:36 +02:00
2020-10-31 16:51:50 +01:00
GD extension is required.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
`apt install php7.3-gd`
LibreQR need writing rights on the `temp/` directory.
```
chown -R www-data:www-data /var/www/libreqr/temp
chmod -R 600 /var/www/libreqr/temp
```
2019-08-13 21:17:08 +02:00
2019-08-14 17:12:36 +02:00
### YunoHost
2020-10-31 16:51:50 +01:00
There is [a package](https://code.antopie.org/miraty/qr_ynh/) for [YunoHost](https://yunohost.org/).
For historical reasons, LibreQR is technically named `qr` in YunoHost.
2020-10-31 16:51:50 +01:00
You can install it from the WebAdmin or with this command :
2019-08-14 17:12:36 +02:00
```
2020-03-23 14:51:46 +01:00
sudo yunohost app install qr
2019-08-14 17:12:36 +02:00
```
2020-10-31 16:51:50 +01:00
## Themes
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
### Change theme
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
In config.inc.php, set $theme to the wanted theme.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
By default, 3 themes are offered:
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
* dark, the default dark theme. Used here: <https://qr.antopie.org>
* light, the light theme.
* parinux, a blue theme, made for [Bastet](https://bastet.parinux.org), the [Parinux](https://parinux.org)'s CHATON. Used here: <https://codeqr.parinux.org>
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
### Make a theme
2020-10-31 16:51:50 +01:00
* Copy themes/dark to themes/[new theme's name]
* Fill theme.php according to CSS colors you want
* Change the source.png image according to your theme
* To automatically generate favicons with the rights sizes, use `php themes/resize.php [theme's name]`
2020-10-31 16:51:50 +01:00
This last step will need [ImageMagick](https://imagemagick.org) and [pngquant](https://pngquant.org) to be installed.
2020-10-31 16:51:50 +01:00
```apt install imagemagick pngquant```
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
## Contribute
2020-03-23 14:51:46 +01:00
2020-10-31 16:51:50 +01:00
If you want to report a bug, you can open an issue at <https://code.antopie.org/miraty/libreqr/issues> after creating an account (prefered method) or contact me in another way.
2020-03-23 14:51:46 +01:00
## Contact
2020-10-31 16:51:50 +01:00
If you want to contact me, for instance to report a bug or ask me a question about installing or using LibreQR, you can get my contact details on <https://miraty.antopie.org>.
2020-03-23 14:51:46 +01:00
2020-10-31 16:51:50 +01:00
## Libraries
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
This source code includes:
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
* [phpqrcode](https://github.com/t0k4rt/phpqrcode) to generate QR codes
* [Ubuntu font for the Web](https://github.com/earaujoassis/ubuntu-fontface)
* [lesserphp](https://github.com/MarcusSchwarz/lesserphp) to compile [Less](http://lesscss.org)
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
## License
2019-08-13 21:17:08 +02:00
2020-03-16 18:34:49 +01:00
[AGPLv3+](https://code.antopie.org/miraty/libreqr/src/branch/master/LICENSE)
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
LibreQR is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
LibreQR is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
2019-08-13 21:17:08 +02:00
2020-10-31 16:51:50 +01:00
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.