Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Default literature folder #49

Open
DrGreyling opened this issue Jul 6, 2023 · 3 comments
Open

Default literature folder #49

DrGreyling opened this issue Jul 6, 2023 · 3 comments
Labels
enhancement New feature or request

Comments

@DrGreyling
Copy link

Hi

I was wondering if it is possible to create a 'default' location where semantra looks for the files if no argument is give on startup? I would like to just run semantra instead of specifying semantra ~/literature/* every time.

Thanks!

@endolith
Copy link

endolith commented Jul 6, 2023

Or the ability to specify a folder and it os.walks through all the files within? (Or does it do that already?)

@freedmand freedmand added the enhancement New feature or request label Jul 8, 2023
@freedmand freedmand added this to the Semantra 0.2.0 milestone Jul 8, 2023
@freedmand
Copy link
Owner

Not a bad idea! I think the specifying a directory and automatically recursively trawling it is a good idea too. Maybe v0.2 can have default directory as a configurable option (or there can be a default folder it chooses)

@belisards
Copy link

belisards commented Aug 4, 2023

+1 for this feature.

Temporarily, the command below did the job of indexing my Zotero library. Now I wonder whether there is a way to save/export the embeddings so I don't need to recalculate them every time I run semantra.

mapfile -d $'\0' files < <(find ~/Zotero/storage -type f -iname "*.pdf" -print0) && semantra "${files[@]}"

PS: Just found in #6 that embeddings are saved in --semantra-dir. So after the first run you can reload the embeddings with something like:

mapfile -d $'\0' files < <(find <lib_folder> -type f -iname "*.pdf" -print0) && semantra "${files[@]}" --semantra-dir <embeddings-cache-folder>

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

4 participants