Recent

Author Topic: A desktop search written in Lazarus?  (Read 2844 times)

EganSolo

  • Sr. Member
  • ****
  • Posts: 395
A desktop search written in Lazarus?
« on: April 06, 2025, 10:38:55 am »
I've come across Everything, AnyTxt and DocFetcher (to name a few).
The first is a file searching tool. The next two are text searching tools.
I started thinking about what it would take to write a search tool in Lazarus.
 1. It would search by file names
 2. It would search inside files by building and maintaing indices.
The key challenge is to figure out how to read non-textual files such as the ones produced by Microsoft Office and other programs like it. If there were an existing package that can hook into may files format, the rest would be relatively easy.

Question: anyone has attempted to create such a tool?

cdbc

  • Hero Member
  • *****
  • Posts: 2564
    • http://www.cdbc.dk
Re: A desktop search written in Lazarus?
« Reply #1 on: April 06, 2025, 11:25:50 am »
Hi
I can chime in with this: 'Open Document Formats' like *.odt ~ text documents are a zipped bundle of mostly textfiles.
Just unzip a *.odt file and you get a directory of textfiles to peruse...
I'm not entirely sure, but I think *.docx are too, worth a test...
Regards Benny
If it ain't broke, don't fix it ;)
PCLinuxOS(rolling release) 64bit -> KDE6/QT6 -> FPC Release -> Lazarus Release &  FPC Main -> Lazarus Main

Leledumbo

  • Hero Member
  • *****
  • Posts: 8835
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: A desktop search written in Lazarus?
« Reply #2 on: April 08, 2025, 08:02:42 am »
I'm not entirely sure, but I think *.docx are too, worth a test...
No need, MS Office .~x files are zipped XMLs. It was an attempt to make the format open and standardized and therefore, less compatibility problems with 3rd party office suite.

CM630

  • Hero Member
  • *****
  • Posts: 1579
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: A desktop search written in Lazarus?
« Reply #3 on: April 08, 2025, 10:49:43 am »
...
Question: anyone has attempted to create such a tool?
All decent file managers that I have seen are written in Pascal, luckily, one of them is open source and written in Lazarus:
https://sourceforge.net/projects/doublecmd/
I suppose its search will be fine for you; if not good enough, maybe you could contribute to the project.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

paweld

  • Hero Member
  • *****
  • Posts: 1561
Re: A desktop search written in Lazarus?
« Reply #4 on: April 08, 2025, 12:09:12 pm »
@CM630 - TotalCommander 64-bit version is also written in Lazarus
Best regards / Pozdrawiam
paweld

EganSolo

  • Sr. Member
  • ****
  • Posts: 395
Re: A desktop search written in Lazarus?
« Reply #5 on: April 09, 2025, 02:44:11 am »
Thanks, guys, for your answers! That's super helpful.
I'll check TotalCommander and doublecmd. I've used these in the past. The feature I seek is found in DocFetcher (written in Java) which indexes the content of files and when I enter a query, say "The cat that ate the hat", it will list all the files holding that expression and when I select a file, it will show me all the lines where that expression appears. That's a life saver.
I'm hoping TotalCommander and/or doublecmd have similar features!

CM630

  • Hero Member
  • *****
  • Posts: 1579
  • Не съм сигурен, че те разбирам.
    • http://sourceforge.net/u/cm630/profile/
Re: A desktop search written in Lazarus?
« Reply #6 on: April 09, 2025, 09:58:25 am »
@CM630 - TotalCommander 64-bit version is also written in Lazarus
I am aware of that, I still use TotalCommander (only on the phone), but AFAIK it is not open source, so I did not mention it (which matters for @EganSolo).
But reading @EganSolo's last post, what is sought is and indexer for document files. No idea how such a thing could possibly work without eathing a huge amount of disk storage.
Лазар 4,4 32 bit (sometimes 64 bit); FPC3,2,2

paweld

  • Hero Member
  • *****
  • Posts: 1561
Re: A desktop search written in Lazarus?
« Reply #7 on: April 09, 2025, 11:06:24 am »
Best regards / Pozdrawiam
paweld

 

TinyPortal © 2005-2018