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

Suggestion for how to compare contents of two paths? #124

Open
shah opened this issue Apr 19, 2022 · 0 comments
Open

Suggestion for how to compare contents of two paths? #124

shah opened this issue Apr 19, 2022 · 0 comments

Comments

@shah
Copy link

shah commented Apr 19, 2022

This is a fantastic little utility, thanks for putting it together! One of my projects (a statically generated site with over 100k files) has a "audit" requirement which I was wondering whether fselect might fulfill.

Specifically we need to see if each *.md file in the source directory (e.g. content) has generated one or more files in the destination directory (e.g. public). Would fselect be able to "diff" the entries in the public directory and indicate whether something in the content directory appears in the same path in the public directory?

Something like below would be ideal but since the documentation says fselect is not real SQL I wanted to see if it was possible anyway :-).

SELECT path
  FROM public
 WHERE NOT EXISTS (
       SELECT * FROM content 
       WHERE content.path_parent = public.path_parent AND content.path = CONCAT(public.path_without_extn, '.md')) 
   AND name = '*.html' 
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