request:find strings that are not in files of tab
request:find strings that are not in files of tab
script to search for text strings that are not in the content of files in the current tab.
For example I have a list of strings, and it is placed in a text file or in clipboard.
I need to find a list of those strings that are not in the content of files in the current tab.
As a result, it is necessary to bring these list into the box for viewing and copying.
I need such script to know that the translation strings contained in the files of folder were not deleted or changed in these files.
For example I have a list of strings, and it is placed in a text file or in clipboard.
I need to find a list of those strings that are not in the content of files in the current tab.
As a result, it is necessary to bring these list into the box for viewing and copying.
I need such script to know that the translation strings contained in the files of folder were not deleted or changed in these files.
Re: request:find strings that are not in files of tab
Let me try something.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
You can open any folder. Find in files of this folder 3 or 4 strings in their content, and create any strings that do not appear in the files. Then you can try.
Re: request:find strings that are not in files of tab
I have an idea. Give me some time.DmFedorov wrote:You can open any folder. Find in files of this folder 3 or 4 strings in their content, and create any strings that do not appear in the files. Then you can try.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
Code: Select all
"Findstrings"
{
$in = readfile('c:\in.txt', 't', , , );
$out = writefile('c:\out.txt', '', 'o', 't');
$files = get('selecteditemspathnames', '|', 'a');
$hashes = regexmatches($in, '[^\n]+', '|', '0');
foreach($file, $files, '|'){
$content = readfile($file, 't', , , );
writefile('c:\out.txt', "$file<crlf>", 'a', 't');
foreach($hash, $hashes, '|'){
if (regexmatches($content, $hash, '|', '0')){
// string was found. no action required
}
else {
// string was not found. adding hash to list of items
writefile('c:\out.txt', "$hash<crlf>", 'a', 't');
}
}
writefile('c:\out.txt', "----------------<crlf>", 'a', 't')
}
text readfile('c:\out.txt', 't', , , );
}
1. Enter all your text strings in the text file in.txt and place it in c:\ (or update the script to the correct location with variable $in)
ONLY ONE STRING PER LINE. PUSH ENTER AFTER EVERY STRING!
2. select all the files that you want to search through in your window. you MUST select the files.
3. Script will show a text dialogue with the name of each file and the strings from in.txt that were NOT found inside your file
disclaimer: sloppy code, I haven't had my coffee yet.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
Thank you very match. I'll try this script in an hour.
Re: request:find strings that are not in files of tab
- Let's you enter the strings that should not be present into a dialog box (must be separated by |)
- If you don't enter anything it'll ask for a filename which contains these strings
- Pops up a text box with all files with their missing strings
- Goes through all files in the current directory, no manual selection first (skips binary files)
- If you don't enter anything it'll ask for a filename which contains these strings
- Pops up a text box with all files with their missing strings
- Goes through all files in the current directory, no manual selection first (skips binary files)
Code: Select all
$searchStrings = input("Enter the search terms...", "Terms MUST be separated by |", , "s", "empty", 600, 200);
if ($searchStrings == "") {
$searchStringsFile = inputfile("<curpath>", , "You did not enter any search terms, please select the file that contains them...<crlf>Terms MUST be separated by |");
$searchStrings = readfile($searchStringsFile);
}
$allFiles = listfolder(, "*", 1, "|");
$fileWithMissingString = "";
foreach($file, $allFiles, "|") {
if (filetype($file) != "Binary") {
$markFile = "";
$notFoundStrings = "";
$fileContent = readfile($file);
foreach($string, $searchStrings, "|") {
if (strpos($fileContent, $string) == -1) {
$notFoundStrings = $notFoundStrings . $string . "|";
$markFile = 1;
}
}
if (substr($notFoundStrings, -1) == "|") {
$notFoundStrings = regexreplace($notFoundStrings, "\|$", "");
}
if ($markFile) {
$fileWithMissingString = $fileWithMissingString . $file . " - " . $notFoundStrings . "<crlf>";
}
}
}
text $fileWithMissingString;
One of my scripts helped you out? Please donate via Paypal
Re: request:find strings that are not in files of tab
Probably will need to exclude anything that isn't ASCII or UTF-8 encoded. However I think it's safe to assume OP will just group the files he needs beforehand so that kind of error handling isn't vital. Nice touch though.highend wrote: - Goes through all files in the current directory, no manual selection first (skips binary files)
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
That's what I didHowever I think it's safe to assume OP will just group the files he needs beforehand
Small change (to not cancel the whole script if you press cancel on the first inputbox):
Code: Select all
$searchStrings = input("Enter the search terms...", "Terms MUST be separated by |", , "s", "none", 600, 200);
if ($searchStrings == "" || $searchStrings == "none") {
One of my scripts helped you out? Please donate via Paypal
Re: request:find strings that are not in files of tab
I need to find a list of those strings that are not in the content of files in the current tab.
-------------------------
highend and 40k
If I have for example 4 files and 3 strings:
F:\_New\inspector.js
F:\_New\NetworkPanel.js
F:\_New\ProfilesPanel.js
F:\_New\ResourcesPanel.js
You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
where third string "Save entry as HAR" is missing in files, I have in box:
F:\_New\inspector.js - Save entry as HAR
F:\_New\NetworkPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ProfilesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ResourcesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
-----------------------
but I must have in this case only this:
Save entry as HAR
-------------------------
highend and 40k
If I have for example 4 files and 3 strings:
F:\_New\inspector.js
F:\_New\NetworkPanel.js
F:\_New\ProfilesPanel.js
F:\_New\ResourcesPanel.js
You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
where third string "Save entry as HAR" is missing in files, I have in box:
F:\_New\inspector.js - Save entry as HAR
F:\_New\NetworkPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ProfilesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ResourcesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
-----------------------
but I must have in this case only this:
Save entry as HAR
Re: request:find strings that are not in files of tab
That's highend's script. Can you post what is the output of mine?DmFedorov wrote:I need to find a list of those strings that are not in the content of files in the current tab.
-------------------------
highend and 40k
If I have for example 4 files and 3 strings:
F:\_New\inspector.js
F:\_New\NetworkPanel.js
F:\_New\ProfilesPanel.js
F:\_New\ResourcesPanel.js
You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
where third string "Save entry as HAR" is missing in files, I have in box:
F:\_New\inspector.js - Save entry as HAR
F:\_New\NetworkPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ProfilesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
F:\_New\ResourcesPanel.js - You need to install a Chrome extension|Remove all DOM breakpoints|Save entry as HAR
-----------------------
but I must have in this case only this:
Save entry as HAR
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
You mean: It's only missing in the file "inspector.js"...where third string "Save entry as HAR" is missing in files
You've said that you want the file together with the missing strings, so the output should still be:but I must have in this case only this:
Save entry as HAR
D:\Temp\test\inspector.js - Save entry as HAR
And that's exactly what I get when I use my script on your 4 files...
Attached a small animation as a proof...
- Attachments
-
- anim.zip
- (491.46 KiB) Downloaded 138 times
One of my scripts helped you out? Please donate via Paypal
Re: request:find strings that are not in files of tab
What program do you use make a gif like that highend? Looks really nice.
I develop scripts that integrate media functionality into Xyplorer.
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Hash - Twitch.tv in VLC (NEW 2.0!) - FFmpeg GUI - Youtube downloading
XYplorer for Linux! Tutorial
Re: request:find strings that are not in files of tab
40k
With your script I receive
F:\_New\inspector.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\NetworkPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\ProfilesPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\ResourcesPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
With your script I receive
F:\_New\inspector.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\NetworkPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\ProfilesPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
F:\_New\ResourcesPanel.js
You need to install a Chrome extension
Remove all DOM breakpoints
Save entry as HAR
----------------
Re: request:find strings that are not in files of tab
It's made by GifCam (http://blog.bahraniapps.com/?page_id=21)40k wrote:What program do you use make a gif like that highend? Looks really nice.
Resized it to 800 x 600... Looks awful... I'll remove it after the OP next answer anyway...
One of my scripts helped you out? Please donate via Paypal