But when I added it to people, and attempted to do a search it gave this error.
137546: ERROR: grampsapp.py: line 188: Unhandled exception
Traceback (most recent call last):
File "C:\Users\Public\Genealogy\gramps\gramps52\plugins\WebSearch\web_search.py", line 202, in on_link_clicked
self.add_icon_event(VISITED_HASH_FILE_PATH, ICON_VISITED_PATH, tree_iter, 8)
File "C:\Users\Public\Genealogy\gramps\gramps52\plugins\WebSearch\web_search.py", line 209, in add_icon_event
self.website_loader.save_hash_to_file(hash_value, file_path)
File "C:\Users\Public\Genealogy\gramps\gramps52\plugins\WebSearch\website_loader.py", line 80, in save_hash_to_file
with open(file_path, "a", encoding="utf-8") as file:
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Users\\Public\\Genealogy\\gramps\\gramps52\\plugins\\WebSearch\\data\\visited_links.txt'
I think, it can not find “data” directory in the project root. You can create it manually as an temporary solution. I will fix it tomorrow. Need to create the folder if missing
You will see the known issue when add link to note or attributes. It occurs not always. I have idea why it occurs but don’t know how to fix it right now.
@emyoulation, I plan to make this configurable and extendable via JSON. Initially, I was thinking of implementing it through the UI settings, where all other gramplet settings are located. But it won’t be that simple, maybe later. Right now, I plan to read attributes and URLs in wildcard pair format from a JSON file. However, I’m not very familiar with which gramplets store UIDs in which attributes. And from what you’ve written, it seems that for a single domain, like findagrave.com, there might be different types of UIDs for different purposes (such as memorial, cemetery), so different wildcard masks will be needed. Do you have more information on what wildcards should be specified for each attribute? I could release a standard attributes list that covers the main user needs based on the naming conventions used in Gramps by various gramplets. Of course, users will be able to customize everything themselves, but if we hardcode some of these attributes into the project, it will make things much easier for them. Obviously, two different attributes with the same wildcard cannot be used for the same domain.
@Nick-Hall the link above goes to a GitHub releases page for the experimental WebSearch addon by @Urchello
The GitHub Releases appears to have some benefit for developers in maintaining a archive of releases. But it has a penalty in managing installed addon versions compared to the make.py/addons-__.json system of the Addon Manager.
Is that trade-off real? Or can a developer be more efficient (in both delivery and archiving) if they use the make.py approach?
You just improved the PO portion generation options of the addons-source make.py script. (Thank you!) The Usages section in the README.md in addons-source discusses using make.py directly from GitHub for a clone of addons-source repository.
Is there a simplified guide to leveraging the make.py (locally for an installed addon; or, on directly GitHub for a personal repository) for generating the PO and the listings/download folders? Specifically calling the make.py from within Gramps using Python Eval built-in, or Python Shell, SuperTool, gram.py addon gramplets
I tried all sorts of attribute_name variants … since I do not wanted be locked into FamilySearch for profile. (I want to re-use profile for WikiTree.)
I would change the .json and the Person attribute to match. Then restart Gramps with WebSearch in the People flat view sidebar. (Switch active person to another and person and back to force a refresh)
It only recognized lowercase attribute names. (using spaces, dashes, underscores and periods were OK)
It would recognize familysearch.profile for an Attribute name but not
FamilySearch.profile
I am curious how to use a language code parameter? (FindAGrave uses a language subdomain instead of the www. subdomain. No support for an https://en.findagrave.com yet. FamilySearch uses a https://www.familysearch.org/en/)
Now links which use data from attributes, are moved to a separate uid-links.csv file. It can be temporary or permanent change - depends on users’ feedbacks.
If you want to match only a specific language, e.g., English (/en/), use: "url_regex": ".*familysearch\\.org/en/.*"
To match any language subdomain, you can use: "url_regex": ".*\\.findagrave\\.com/.*"
If you only want to match en.findagrave.com specifically: "url_regex": ".*en\\.findagrave\\.com/.*"
I didnt text it, but it should work: you even can list multiple language codes: "url_regex": ".*familysearch\\.org/(en|de|fr)/.*"
Im not 100% sure that I’ve fully answered to your question. Is it what you asked? Or you want to have additional variable with current system language?
It looks like some sites (like FamilySearch) may support seamless language switching. So if your Gramps is running in French, it will return the data with the GUI in that language.
Others (like FindAGrave) have a limited set of languages in the same way as Gramps. FindAGrave is a strange implementation that is still experimental. It does not fluidly change to the language code in the URL. There is also a default language cookie that override. That will (probably) change.
WikiTree is even more strange. The language code does not affect the GUI. It is just used for tuning their data entry form’s validation. (i.e., if in fr, it just suggests standard locations in France as the Place is being keyed in.) We can ignore their Language code.
It is available for people, families, sources and places.
Hope, it solves all your needs. Pls. give me know if its not enough flexible for some scenarious.