fdw / rofimoji

Emoji, unicode and general character picker for rofi and rofi-likes
https://github.com/fdw/rofimoji
MIT License
847 stars 48 forks source link

Request: Ability to replace or complement data files #146

Closed latipun7 closed 1 year ago

latipun7 commented 1 year ago

Nerd fonts have some updates to add new icons and change the code points (see: https://github.com/ryanoasis/nerd-fonts/releases/tag/v2.3.3).

It would be nice to have the ability to manually extract the data files (not just for nerd fonts) and place that extracted files into custom folder or default in user configs folder. So, if upstream has some update, users didn't need to wait for rofimoji to update or someone pointed the update in this repo issue.

Thank you ✨

fdw commented 1 year ago

Something like that is already possible: You can check out the whole project and run the extractors yourself. This should give you up-to-date versions of everything.

You can then move the ones you're interested in to $XDG_DATA_HOME/rofimoji/data. Unfortunately, they need to be named <filename>.additional.csv at the moment and only complement, but don't replace the old version. I'll see if I can change that.

Does that help you already?

latipun7 commented 1 year ago

I'm don't have experience with python. What do I need to run the extractor? How to run it? I install rofimoji from Arch package .

fdw commented 1 year ago

If you're only interested in the latest Nerd Font file (or any other), you can download it from here and put it into $XDG_DATA_HOME/rofimoji/data/<filename>.additional.csv. I update the files from time to time.

If you want a general recipe, you need to clone the repo and set it up using poetry install. Then you can run poetry run python -m extractors, which will run all extractors. Finally, you can use the files in src/picker/data as described above. Does that help?

latipun7 commented 1 year ago

If you want a general recipe, you need to clone the repo and set it up using poetry install. Then you can run poetry run python -m extractors, which will run all extractors. Finally, you can use the files in src/picker/data as described above. Does that help?

Yes, thank you.

Unfortunately, they need to be named <filename>.additional.csv at the moment and only complement, but don't replace the old version. I'll see if I can change that.

Yes, if possible, allow to replace the default data too, with same <filename>.csv, and if want only to add could be using the current behavior with <filename>.additional.csv. Maybe still open this issue until then. Thanks.

fdw commented 1 year ago

I've just pushed code that does exactly what you want 🙂

latipun7 commented 1 year ago

Thank you. I already tested it. Closing this for now.