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

graby for wallabag with custom site_config #304

Open
HolgerAusB opened this issue Jan 21, 2023 · 2 comments
Open

graby for wallabag with custom site_config #304

HolgerAusB opened this issue Jan 21, 2023 · 2 comments

Comments

@HolgerAusB
Copy link
Contributor

Is there a way of using graby for wallabag similar to Fulltest-RSS with two folders?

site_config/standard
site_config/custom

That would be very nice. Specially when I symlink these with my FTR-Installatiion on same server.

@HolgerAusB HolgerAusB changed the title graby for wallebag with custom site_config graby for wallabag with custom site_config Jan 27, 2023
@HolgerAusB
Copy link
Contributor Author

@j0k3r: Hi Jérémy,

I am not a developer and php isn't that easy to read. But I did a bit of fulltext search in the code. And I came to the conclusion, that there is already a mechanism, that is loading configs from more than one directory. Am I right?

vendor/j0k3r/graby-site-config/src/Files.php said so. But how could I use this?

If I'd be brave enough, I could try to expand the $dirs array to FTR's site_config/custom and site_config_standard

But that would be overwritten with next wallabag release. And I am not sure, what happens, if the same filename (with different content) is available in two or three paths. I hope the first one wins or the last, just need to know.

Maybe I found the config option for this in app/config/services.yml:

    Graby\SiteConfig\ConfigBuilder:
        arguments:
            $config: { site_config: ['/var/www/path_to/ftr/site_config/custom', '/var/www/path_to/ftr/site_config/standard'] }

First short tests, look good.

  • Could you please confirm, that I am using it right?
  • Is the path vendor/j0k3r/graby-site-config/ added automatically?
  • What is the priority, if there are same filenames with different content. Which one is used or will they merged (which order)?
  • Will this service.yml probably be overwritten with a future make update?

@HolgerAusB
Copy link
Contributor Author

OK, with further checks I found out, that the last folder in the array wins. So FTR's custom folder should be last, as this is top priority for me.

@j0k3r, I begun to write a wiki article for the wallabag repo, so other users can use auto-update the site_config files, too (via GIT cloned folder=repo or FTR). I have to do some more tests, but want to upload this wiki at the weekend.

But I need your confirmation, that services.yml is the right place to do so. Or will that likely be overwritten with the next wallabag update?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant