46 Commits

Author SHA1 Message Date
Alexandre Alapetite
78e40c6fe3 Scaling of user statistics (#8277)
Fix https://github.com/FreshRSS/FreshRSS/issues/8268
To better support user management on FreshRSS instance with many users.

SQL speed improved. On a reduced test with 5 users, including some large accounts (PostgreSQL on a very tiny and slow server), improving from ~2.3s to ~1.8s, which gives ~20% speed improvement.

Then tested with 1000 users, with only the default feed (on my old desktop computer):

```sh
for i in {1..1000}; do ./cli/create-user.php --user=freshrss$i --password=freshrss; done
app/actualize_script.php
cli/access-permissions.sh
```

SQLite:

```console
$ time cli/user-info.php | wc -l
1001

real    0m1.366s
user    0m0.908s
sys     0m0.475s
```

PostgreSQL:

```console
$ time cli/user-info.php | wc -l
1001

real    0m28.498s
user    0m12.137s
sys     0m2.217s
```

MariaDB:

```console
# time ./cli/user-info.php | wc -l
1001

real    0m49.485s
user    0m1.276s
sys     0m2.258s
```

Yes, SQLite is much faster - not a surprise for such use-cases, where the TCP connection is not re-used.

I have added some CLI options to disable some statistics:

```sh
cli/user-info.php --no-db-size --no-db-counts
```

For the Web UI, I have disabled detailed user statistics if it takes too long, and retrieve missing user statistics asynchronously via JavaScript. Lazy loading of the user details based on IntersectionObserver, with maximum 10 requests in parallel.
Web UI tested on 1000 users as well. Checked with SeaMonkey.
2025-12-04 19:11:31 +01:00
Inverle
be49726ebb Replace translation status flags with text section (#7842)
* Replace translation status flags with text section

* make fix-all

* Update README.md

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>

* Improve with suggestions

* Improve with further suggestions

* fix headers

* BCP 47
https://developer.mozilla.org/en-US/docs/Glossary/BCP_47_language_tag

* en-US: `TODO` -> `IGNORE`

* i18n: fr

* i18n: fr

* i18n: fr

* Links

---------

Co-authored-by: maTh <1645099+math-GH@users.noreply.github.com>
Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-10-02 23:00:16 +02:00
Inverle
f9a42adade Show translation status in README.md (#7715)
* Show translation status in README.md

* Fix colon

* markdownlint: Allow tag `<translations>`

* Use mostly Unicode flags instead

* Only `oc.svg` remains in an image format
* `check.translation.php` still supports `.png` even though there aren't any PNGs as of right now

* Fix CodeSniffer

* Attempt approach with generating local SVGs

* Fixes for local SVG approach

* Cleanup old code

* PHPStan fix

* Remove decimal precision from percentages

* Suggestions + better error messages

* codesniffer fix v2

* Revert `ghSearchUrl` change

* Generate readme

* Fix syntax highlight, maybe

* Regenerate

* Update help message

* Use existing translation files instead of .txt

* Add test against wrong Unicode flag

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
2025-07-16 16:11:51 +02:00
Jackson Culbreth
fdc564dd9e Added api password indicator text (#7340)
* Added api password indicator text

* make fix-all

* i18n

* i18n: it

Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>

---------

Co-authored-by: Alexandre Alapetite <alexandre@alapetite.fr>
Co-authored-by: UserRoot-Luca <55756898+UserRoot-Luca@users.noreply.github.com>
2025-03-07 23:34:56 +01:00
hkcomori
74deec6fb2 Add quiet option to cli/db-backup.php (#6593)
* Add quiet option to cli/db-backup.php

* Fix CI test error

* Fix README
2024-06-29 10:10:49 +02:00
Alexandre Alapetite
329fd4bcf6 CLI database backup and restore (#6387)
* CLI database backup and restore
Can also be used to migrate from one database to another (e.g. MySQL to PostgreSQL) or to ease upgrade to a major PostgreSQL version (e.g. 15 to 16).

* +x

* Fix some cases

* Update to docker-compose-v2

* More documentation
2024-04-30 08:31:13 +02:00
Kasimir Cash
6d14813840 Standardise command line option parsing (#6036)
* Separates long & short options for parsing

* Adds parsing for short options + doc rewrites

* Fixes undefined constant in check.translation

* Standardises CL option parsing

* Refactors option parsing

* Renames getLongOptions -> getOptions

* Removes unused code

* Converges on string typing for options

* Updates docs & help files

* Updates array syntax array( ) -> [ ]
2024-01-17 08:42:43 +01:00
Kasimir Cash
9a80dde238 2297 cli parameters consistency (#6028)
* Updates do-install params

* Adds parseCliParams to _cli.php

* Updates do-install to use parseCliParams

* Updates reconfigure to use parseCliParams

* Fixes bug mail_login => email

* Update create-user to use parseCliParams

* Minor refactor

* Updates update-user to use parseCliParams

* Fix no_default_feeds => no-default-feeds

* Refactors arrays

* Updates CLI Readme

* Adds docblocks to _cli functions

* Sets vars in _cli functions

* Fixes indentation

* Meeting coding standards around colons

* Meeting PHPStan standards

* Removes stray whitespace

* Meeting PHPStan Next Level standards

* More specific typing

* Maintaining types

* Typing around getopt()

* Fixes typo

* Fixes typo perameters -> parameters

* Removes unused variable

* Rewrites deprecation warning message
2024-01-09 23:01:17 +01:00
Alexandre Alapetite
e899e4edd9 More robust application of access permissions (#5062)
* More robust application of access permissions
We were in particular missing directory traversal `+X` in our current recommendations.
Extracted to own shell script so it can easily be invoked.
Update access permissions in Docker to account to be more robust.
#fix https://github.com/FreshRSS/FreshRSS/discussions/5037

* Minor simplification

* Restrict mkdir permissions
Default mkdir permissions are 0777, which is not good for security, so downgrade to 0770.
2023-02-06 15:42:53 +01:00
Thelonius Kort
d4181e098d Fix broken link to the updating instructions (#4753) 2022-10-20 00:18:59 +02:00
Alexandre Alapetite
f89819bd64 Custom logo HTML (#4369)
* Custom logo HTML
Add option for custom HTML logo/title in the main Web UI view.
Can potentially be different per user.
#fix https://github.com/FreshRSS/FreshRSS/pull/3830/files#r850472247

* logo_html in main config
With new `./data/config.custom.php` to provide custom values before install

* Docker documentation

* whitespace

* Auto relax CSP to allow images for HTML logo

* Documentation
2022-05-23 14:03:19 +02:00
maTh
ff877e603f Cli: readme: added infos about manipulate.translation.php (#3937)
* added: ./cli/manipulate.translation.php + divided in sub sections

* headline structure

* blank lines added
2021-10-25 20:29:49 +02:00
Alexandre Alapetite
acbba9adb2 Improved markdownlint (#3918)
* Improved markdownlint
* Relaxed rules slighlty
* `npm run markdownlint` for automatic tests
* `npm run markdownlint_fix` for automatic syntax fixing
* Applied the fixes on all our Markdown files
2021-10-23 13:43:24 +02:00
Alexandre Alapetite
058d13de70 CLI user-info JSON option (#2968)
* CLI user-info JSON option

Add a JSON user-info output
https://github.com/FreshRSS/FreshRSS/issues/2967#issuecomment-627441744

* Uses ISO Zulu time

* Typo
2020-05-12 22:48:33 +02:00
Alexandre Alapetite
2bbc579d72 Add lang and mail in CLI user-info (#2958)
* Add lang and mail in CLI user-info

Anf update documentation after
https://github.com/FreshRSS/FreshRSS/pull/2296

* iff and language
2020-05-11 17:45:08 +02:00
Alexandre Alapetite
475feffdbe Markdownlint (#2880)
* markdownlint

I have started to use
[markdownlint](https://github.com/DavidAnson/markdownlint/) to find
typos in Markdown. Let's discuss which rules to enforce / disable /
customize

* markdownlint cli/readme
2020-04-16 18:08:53 +02:00
Alexandre Alapetite
0f94402b7e Better performance with yield (#2588)
* Better performance with yield

Largely decrease the time to first byte, and reduced memory consumtion.
Before, we used to make several copies in memory of the whole list of
articles before sending them to the client. Now streamed as they are
processed.

* Travis
2020-02-29 18:19:09 +01:00
Alexandre Alapetite
15b8ef8f40 Fix doc links (#2685)
Many broken links.
Related to https://github.com/FreshRSS/FreshRSS/pull/2614
2019-12-03 22:56:57 +01:00
Alexandre Alapetite
37b52b7361 Trim whitespace (#2544) 2019-10-01 18:12:21 +02:00
Alexandre Alapetite
c76a318193 CLI to export/import any database to/from SQLite (#2496)
* CLI to export/import any database to/from SQLite

Require PHP 5.5+ https://github.com/FreshRSS/FreshRSS/pull/2495

* Travis

* Execution rights

* Fix wrong static fields

* Fix MySQL bad default buffering

https://stackoverflow.com/questions/6895098/pdo-mysql-memory-consumption-with-large-result-set/6935271#6935271
https://php.net/manual/ref.pdo-mysql

* Fix count on progression

* Avoid static DB information

To ease working with two DBs at the same time

* Less static, simplify

Needs some testing

* Small corrections

* Special case for SQLite to SQLite

* Modify special case for SQLite

* Remove special case for SQLite

More uniform logic for the 3 databases.
Fix wrong DROP TABLE for SQLite.

* Drop indexes

* Revert "Drop indexes"

This reverts commit f28d2bae09.

* Fix deletion

* Fix classic export

* Update cli/README.md

Co-Authored-By: Marien Fressinaud <dev@marienfressinaud.fr>

* Addressing part of review

* Remove goto 😢

* Travis

* Comment for SQLite case

* Fix missing fields when inserting
2019-09-15 21:36:53 +02:00
Leepic
48ad3059e4 Adding a note about cron and stderr informations (#2457)
Avoid cron sending email in case of success command
2019-07-23 09:34:42 +02:00
Alexandre Alapetite
512d047f02 Update naming to WebSub (#2184)
Instead of PubSubHubbub / PuSH
2018-12-16 17:02:03 +01:00
Alexandre Alapetite
8ee8a573f1 Custom labels (#2027)
* First draft of custom tags

https://github.com/FreshRSS/FreshRSS/issues/928
https://github.com/FreshRSS/FreshRSS/issues/1367

* SMALLINT to BIGINT for id_entry

And uppercase SQL types

* Fix layout for unreads

* Start UI menu

* Change menu order

* Clean database helpers

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r217971535

* Travis rules do not understand PostgreSQL constants

Grrr

* Tag controller + UI

* Add column attributes to tags

* Use only favicon for now, for label

* Fix styling for different themes

* Constant for maximum InnoDB index length in Unicode

https://github.com/FreshRSS/FreshRSS/pull/2027#discussion_r219052200
(I would have personnally prefered keeping the readability of a real
value instead of a constant, in this case of many SQL fields)

* Use FreshRSS_Factory::createCategoryDao

* Add view of all articles containing any tag

* Fix search in tags

* Mark as read tags

* Partial auto-update unread tags

* More auto update tag unreads

* Add tag deletion

* Do not purge tagged articles

* Minor comment

* Fix SQLite and UI bug

* Google Reader API support for user tags

Add SQL check that tag names must be distinct from category names

* whitespace

* Add missing API for EasyRSS

* Compatibility SQLite

Problematic parentheses

* Add SQL DISTINCT for cases with multiple tags

* Fix for PostgreSQL

PostgreSQL needs some additional type hint to avoid "could not determine
data type of parameter $1"

http://www.postgresql-archive.org/Could-not-determine-data-type-of-parameter-1-tp2171092p2171094.html
2018-09-29 20:47:17 +02:00
Alexandre Alapetite
aafb1cd0e4 Better test if server has public address (#2010)
* Better test if server has public address

* Wrong trailing slash in documentation
2018-09-09 00:50:24 +02:00
Alexandre Alapetite
ebfb170b14 Minor docs 2018-03-12 21:24:24 +01:00
Alexandre Alapetite
71918dbc5a New Docker (#1813)
* Draft of new Docker

Based on Alpine Linux. Size ~78MB.
https://github.com/FreshRSS/docker-freshrss/issues/4
https://github.com/FreshRSS/FreshRSS/issues/520
https://github.com/FreshRSS/docker-freshrss
https://github.com/FreshRSS/docker-freshrss-production

* Docker readme

* +x execution rights prepare

* Docker readme links to hub.docker.com

https://hub.docker.com/r/freshrss/freshrss/
2018-03-04 01:02:02 +01:00
Jan
f172bee12d Fixes link to the "update guidelines" (#1740) 2017-12-19 18:40:48 +01:00
Kevin Papst
b562639155 Documentation updates (#1697)
* added documentation about updating FreshRSS
moved Installation to admin directory
linked some already existing documentation files
2017-12-02 13:43:28 +01:00
Alexandre Alapetite
f632a34626 CLI optimize database (#1663)
CLI optimize database https://github.com/FreshRSS/FreshRSS/issues/1583
And VACUUM in SQLite https://github.com/FreshRSS/FreshRSS/issues/918
Add VACUUM for PostgreSQL (Not tested yet)
2017-10-12 20:11:06 +02:00
Alexandre Alapetite
673b6e48b0 Mutualise create-user and update-user 2017-08-05 18:27:47 +02:00
Alexandre Alapetite
e046791c93 CLI update user
https://github.com/FreshRSS/FreshRSS/issues/1600
Not tested
2017-07-22 20:05:36 +02:00
Alexandre Alapetite
99c7450343 Simplify readme
Remove cd and sudo
https://github.com/FreshRSS/FreshRSS/pull/1544#discussion_r118556797
2017-05-26 09:45:29 +02:00
Alexandre Alapetite
20d1301b46 Do not require write access to check new version
Do not require write access to check if new ZIP version is available
https://github.com/FreshRSS/FreshRSS/issues/1450
2017-05-25 14:27:31 +02:00
Alexandre Alapetite
21954d6d83 More git readme 2017-05-25 14:02:55 +02:00
Alexandre Alapetite
f57aaebeb8 Readme more advanced git commands
https://github.com/FreshRSS/FreshRSS/issues/1542
2017-05-25 13:46:16 +02:00
Alexandre Alapetite
f6148e1f32 CLI user-info readme
https://github.com/FreshRSS/FreshRSS/issues/1449#issuecomment-284191560
https://github.com/FreshRSS/FreshRSS/issues/1447
2017-03-05 00:23:23 +01:00
Alexandre Alapetite
ada94465e6 CLI: More infos in user-info
https://github.com/FreshRSS/FreshRSS/issues/1449#issuecomment-283927614
2017-03-03 23:01:33 +01:00
Alexandre Alapetite
c544f510d2 CLI: install language
https://github.com/FreshRSS/FreshRSS/issues/1445#issuecomment-283908468
2017-03-03 11:55:58 +01:00
Alexandre Alapetite
745f0ae014 Changelog 1436, 1439
https://github.com/FreshRSS/FreshRSS/issues/1424
https://github.com/FreshRSS/FreshRSS/issues/1432
https://github.com/FreshRSS/FreshRSS/pull/1436
https://github.com/FreshRSS/FreshRSS/pull/1439
2017-02-24 23:21:23 +01:00
Alexandre Alapetite
f3d5cbd7da Underscore missing in documentation
https://github.com/FreshRSS/FreshRSS/pull/1363
2016-11-06 14:23:41 +01:00
Alexandre Alapetite
829d9997d3 Fix small bugs in install
Small fixes in install (e.g. better check that DB password works)
2016-11-06 14:04:06 +01:00
Alexandre Alapetite
dde719060a CLI another example: users ranked by activity date
https://github.com/FreshRSS/FreshRSS/issues/1345
https://github.com/FreshRSS/FreshRSS/issues/1358
2016-11-05 22:09:39 +01:00
Alexandre Alapetite
aeda49a7d2 Add CLI for user information + Fix last user activity
https://github.com/FreshRSS/FreshRSS/issues/1345
2016-11-05 20:48:46 +01:00
Alexandre Alapetite
a7301a43fa A bit more readme 2016-10-25 22:35:45 +02:00
Alexandre Alapetite
4f785865ba Readme import-for-user
https://github.com/FreshRSS/FreshRSS/pull/1338
https://github.com/FreshRSS/FreshRSS/issues/1095
2016-10-25 21:45:13 +02:00
Alexandre Alapetite
1e4348732d Readme CLI
https://github.com/FreshRSS/FreshRSS/issues/1095
2016-10-24 21:21:26 +02:00