Find and display gif file/s in web browser, according to the passed string, compared to files names in the folder.
I would like to ask you to write a program/script in Python 3.7
working at Windows 10 and Debian 9.x, according to the scenario:
1). The User in the console is writing the command and a text parameter,
e.g.: "d Adam"
2). Script/program "d" assigns value "Adam" to variable "x".
3). A search is done in the folder from which command/script "d" was
called. We check in all files names that have ".gif" extension.
4). Each file name is built according to the following pattern :
Characters 1-7 contain the file prefix+number,
Character/s starting from 8 to "*" are called "InitialText".
Character/s from the first character after "*" until ".gif"
are called "FinalText"
5). Program has to find file/s, for which "Adam" (value of "x") is
between "InitialText" and "FinalText" and open it/them in a web browser.
6). Example 1:
6.1). Command "d Adam" was written in console.
6.2). Program found file WWP0001A*Azor.gif
6.3). "Adam" is between "A" and "Azor"
6.4). File "WWP0001A*Azor.gif" has been opened in the web browser.
- Program has to open it in the next tab of an already opened browser.
- If no web browser was open yet, the script has to open it first.
- We want to open each gif file in a new tab of the same web browser.
7). Example 2:
7.1). "d Brzoza" was inserted in the console.
7.2). Program found 2 files that fit to the parameter :
"Brzoza" is between "Barbara" and "Bzura".
"Brzoza" is also between "Akwarystyka" and "Przeprowadzka"
7.2.3). Both the files are opened in two new tabs of web browser.
Number of files in search folder : 5000-10000 (no subfolders)
The acceptable execution time : up to 3 seconds.
Latin alphabet sorting or UTF-8 but I am not sure how to do it
to let it work in both Windows 10 and Linux (e.g.: Debian 9.x)
For the moment Polish, English and Italian languages will be used.
(Russian, Japanese or Chinese might be added in future but not now).
If this is a big problem, we can remove special characters,
so "?" will be treated as "a", "?" as "e", etc. using the standard
Latin sorting : abcdefghijklmnopqrstuvwxyz for the moment.
If for performance reason it was a problem to search each time
"on the fly" all files names in the directory then I would like
to ask to suggest a solution to accelerate the search process.
Please provide a detailed specification which would help me to prepare
e.g. an index that would help to search, including rules, structure
description/definition, exclusions, etc.
I'm ready to pay a reasonable amount of money for writing it for me.
Please, send your proposal to my e-mail from which I sent this article.
Please, be patient if I expressed something not fully professionally :)
Please, ask me additional questions using simple language to let me
specify the missing or unclear elements "at high level" or in "pseudocode".
Thank you in advance and best regards~~Peter~~pe3no.