Extension AltSearch - bugs and requests

@fpy asked me that I could revive the development of AltSearch Adding HTML code to ODT manuscript - #4 by fpy, but it is not so easy for me.

Can you write here the bugs in AltSearch and your ideas to improve it? To see the extent and interest. Unfortunately probably it will not be in my possibility to make some big changes, but it seems I could translate the comments to English to make the code accessible also for non-Czech speakers.

One bug: AltSearch Extension error

4 Likes

Here an other bug fixed: Altsearch assign macro to key fails

2 Likes

This is a task that Deepseek should cope with perfectly. :slight_smile:

well, first (big) picture started from Dependency tree for Bug 146076


And on the side :

  • a “simplified” API : like AltSearch.findAndReplace(oDoc, from, to, flags)
  • headless command line
  • would be nice to kick off some unit tests.
  • also, (suggested) shortcuts :
    _AltSearch: Ctrl+Alt+H (to open the Search dialog);
    _FindNext: Ctrl+Alt+G (to find the next occurrence …
    _FindBack: Ctrl+Shift+Alt+G (to find the previous occurrence
  • move “help” page; to be maintained at Extensions/AltSearch - The Document Foundation Wiki
  • simplify regex (eg for email, use \w instead of [a-zA-Z0-9_] )

although @HeikoTietze didn’t sound hyper enthusiast at first (165725 – Allow targeting of styles and formatting via regular expressions in Find and Replace #c16)
hope this can get some traction, sort of similar to SF :innocent:
Having it in git / gerrit / opengrok … would make a lot of sense.


for reference : https://wiki.documentfoundation.org/Design/Meetings/2021-05-06
1 Like

fingers crossed :wink:

' prida "neco" do seznamu, pokud tam uz neni
' doplnuje pouze na pocatecni pozice seznamu urcene promenou "promene" 
' "pevne" udava pocet polozek na konci seznamu ktere zustavaji beze zmen
sub pridejDoSeznamuA(seznam, neco, promene, pevne)

 if pozvSeznamuA(seznam, neco) >= 0 then exit sub ' uz je to tam, konec
 ' doplnit novou polozku   
 if seznam.itemCount >= (promene+pevne) then ' smazat posledni promennou polozku
    seznam.removeItems(promene-1,1)
   end if 
  seznam.addItem(neco,0)
end sub 

image

Hello

  • Some times ago (maybe 2020), @jucasaca modified the extension to delete the direct format when apply a character style.
  • In 2021 I updated the translations of some string, help and batch file (in spanish)
  • In 2024 I fixed the bug with asign keys to AltSearch (from the extension):
    Altsearch assign macro to key fails
  • Now I have patched AltSearch with your modifications (New function getRealStyleName and changes in GetFindArray and GetReplArray): AltSearch Extension error

The next file is the repacked extension (I changed the version number to 1.4.3)

  • It works well for me. Anyone can try it and who knows if this version can be updated on the official extension website
  • You must rename the file to oxt to install it
  • It is recommended to uninstall the previous version.

altsearch_143beta.oxt.odt (689,1 KB)

2 Likes

I prepare to contact the author of AltSearch, maybe he still have the access to oficial extesnion site, but probably after weekend. I had hard programming last 3 weeks, also to run my web and I need a rest.

I wrote email to Tomáš Bílek (author of AltSearch) and he answered he didn’t upload the AltSearch to LibreOffice extensions.


Can somebody contact the admin of Extensions to find out who is author of that upload? If “uploader” wants to admin the next versions of AltSearch on Extensions.


I started to translate the comments from here-uploaded 143beta, it will take probably some days.


And author agreed to change the licence to CC0 - so any restrictions for users or programmers :slight_smile:

1 Like

→ 165725 – Allow targeting of styles and formatting via regular expressions in Find and Replace

Perhaps this is also an opportunity to correct some most conspicuous typos in the English UI and/or comments? Like:

  • “pistures”, “Charcter”, “cloumn”, “Refresch”, etc.
  • “Alterantive”, “asisng”, etc.

@cwolan No chance to fix and VERIFY the localization of UI for me in these days :-(. There are sequences of spaces in that strings and I don’t know where these strings are visible to verify the fix. The worst is I’m still partially “headoverflowed” from intensive making of my web, so I will not rush.


Next thing is I changed for sure all pluses (+) to ampersands (&) in all strings (if it was for joining of strings, not for addition) like in: Altsearch assign macro to key fails - #7 by glen_in_oz


So it means the next version will be Beta and I suggest to collect the typos in UI now, to fix it after Beta version will be finished.

@KamilLanda it would be good to publish the extension on a resource like github, to allow contributions (PRs) from anyone interested, not only requests like “@KamilLanda do this and that” :slight_smile:

2 Likes

Really good idea! But the problem is I nearly absolutely don’t know how to work with Github.
@fpy you ran this newAltSearch-adventure, wouldn’t you admin the Github&Extension version? Or somebody else who knows how to work with these systems?

sure.
seems it now needs another channel :face_with_thermometer:
→ https://community.documentfoundation.org/t/collaborative-dev-maintenance-on-altsearch/13005
let’s see

2 Likes

so, let’s go with GitHub - gitxpy/libreoffice-alt-search

I have initialized it with current 1.4.2 from extensions.libreoffice.org,
then merged the changes from @bantoniof 1.4.3b

To minimize the learning curve, you can get the files with a simple download :

then submit changes by dragging your directory back to Upload files · gitxpy/libreoffice-alt-search · GitHub

Feel free to try and ask assistance if needed

PS.
a bit of background of course wouldn’t hurt; e.g. Hello World - GitHub Docs

Some improvements In GIthub

I think all the code of the extension must be in a subdirectory.

So in the root directory you can put some utilities like the Readme.md, the update information, the compiled extension and a batch to compress the extension.

(Look at my extension on github) GitHub - Bantoniof/LibreOffice-SanityCheck: ExtensiĂłn para LibreOffice Writer

@fpy marvellous work, thanks for manual with printscreens! But you are too much fast for me in these days :slight_smile:. I will try it probably next week, I really want to finish the translation of comments. Module AltSearch is translated that is about 30%.

sure, no hurry.

you’ve noticed @bantoniof did already a few translations : 1.4.3b from @bantoniof by gitxpy · Pull Request #4 · gitxpy/libreoffice-alt-search · GitHub

fair.
hope some unit tests at some point;
also, do you know if there’s a batch upload to extensions.libreoffice.org ?

anyhow, let’s first have @KamilLanda up to speed colfortably, then try to move forward.

  • The translations I’ve made was for the localization in Spanis that wasn’t update to v1.4.2
  • I think that @KamilLanda want to translate the code comments to English, so the code can be more comprensible.

I Don’t know, I suspect not it is possible because you must log in the extensions page to publish the extension. (But you can do the extension updatable from Github)

1 Like

I already added Spanish translations from @bantoniof to version I make

1 Like