How to read a list of files, compare the text in the files with a set of keys, and return the key with the value true or false if that key is found in the file?
For example I have list of my files:
["src/cljs/project/cofx.cljs"
"src/cljs/project/datetime.cljs"
"src/cljs/project/core.cljs"
"src/cljs/project/app_db.cljs"]
and set of keys:
#{:tooltip/terminate
:member-services/description
:event-errors/link-duplicated
:firm-admin/pre-approved-applicants}
I want read all files (I used slurp
), compare text from all files with first key and return this key and true and name of file if key exist in this file, or false if key not exist in all files.
for example:
[:tooltip/termiante true "src/cljs/project/cofx.cljs"
:member-services/description false]
Do you have any tips? Because this task very difficult for me.