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

Update README.md #25

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

YIN-Renlong
Copy link

@YIN-Renlong YIN-Renlong commented Apr 30, 2023

updated the README.md to run Semantra by using the command in shell to index all files in a folder.

run Semantra by using the following command in shell to index all files in a folder
@freedmand
Copy link
Owner

Thanks for this contribution! It's probably worth making a guide of useful Semantra command-line recipes. This command won't work on all operating systems, so I probably don't want it in the main README file, but a dedicated guide section could share additional commands along with versions for other operating systems.

@YIN-Renlong
Copy link
Author

Thanks for this contribution! It's probably worth making a guide of useful Semantra command-line recipes. This command won't work on all operating systems, so I probably don't want it in the main README file, but a dedicated guide section could share additional commands along with versions for other operating systems.

Hi, thanks for your feedback. The command can be used directly on macOS and Linux systems, which both use Unix-like shells. If you have a Unix-like environment installed on Windows (e.g., Windows Subsystem for Linux or WSL), it can also run this command in that environment

In Windows command prompt or PowerShell, the command could be:

$folder_path = "C:\path\to\folder"

Get-ChildItem -Path $folder_path -Recurse -File | ForEach-Object { semantra $_.FullName }

However, since I won't be able to test it right away, this command might need your testing in Windows.

Best,

@Jaifroid
Copy link

Just to say the PowerShell command above can be written more concisely:

ls 'C:\Your\Directory' -r -file | % { semantra $_.fullname }

However, I'm not sure of the behaviour of semantra if executed serially like this. It would need to exit after each execution for the next file to be processed, so it might need --no-server.

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

Successfully merging this pull request may close these issues.

None yet

3 participants