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

Checking if home dir is correct issue with sf -help #261

Closed
Lod3 opened this issue Sep 3, 2024 · 5 comments
Closed

Checking if home dir is correct issue with sf -help #261

Lod3 opened this issue Sep 3, 2024 · 5 comments

Comments

@Lod3
Copy link

Lod3 commented Sep 3, 2024

So I am writring a guide on how to uise Roy to use WIkidata file signature files.
I ran the sf -help command yesterday to check if my config was the same as outlined in the Roy Wiki part.
https://asciinema.org/a/39270?t=47

But it now shows me the help overview of SF
Not this anymore:

richard@linux-rich:~$ sf -help                                                  
Usage of sf:                                                                    
  -csv=false: CSV output format                                                 
  -droid=false: DROID CSV output format                                         
  -fpr=false: start siegfried fpr server at /tmp/siegfried                      
  -hash="": calculate file checksum with hash algorithm; options 'md5', 'sha1', 
'sha256', 'sha512', 'crc'                                                       
  -home="/usr/share/siegfried": override the default home directory             
  -json=false: JSON output format                                               
  -log="error": log errors, warnings, debug or slow output, knowns or unknowns t
o stderr or stdout e.g. -log error,warn,unknown,stdout                          
  -multi=1: set number of file ID processes                                     
  -nr=false: prevent automatic directory recursion                              
  -serve="": start siegfried server e.g. -serve localhost:5138                  
  -sig="default.sig": set the signature file                                    
  -throttle=0: set a time to wait between scanning files e.g. 50ms              
  -update=false: update or install the default signature file                   
  -version=false: display version information                                   
  -z=false: scan archive formats (zip, tar, gzip, warc, arc)   

Does SF just show this once?
And afterwards after the roy build command it just shows the help menu?

@ross-spencer
Copy link
Collaborator

ross-spencer commented Sep 3, 2024

hi @Lod3 these should still be largely equivalent commands, see:

$ ./roy build -help
Usage of build | add:
  -bof int
    	define a maximum BOF offset
  -choices int
    	define a maximum number of choices for segmentation (default 128)
  -container string
    	set name/path for Droid Container signature file (default "/home/ross-spencer/.local/share/siegfried/container-signature-20240715.xml")
  -cost int
    	define a maximum tolerable cost in the worst case for segmentation (overrides distance/range/choices) (default 25600000)
  -details string
    	set identifier details (default "DROID_SignatureFile_V119.xml; container-signature-20240715.xml")
  -distance int
    	define a maximum distance for segmentation (default 8192)
  -doubleup
    	include byte signatures for formats that also have container signatures
  -droid string
    	set name/path for DROID signature file (default "/home/ross-spencer/.local/share/siegfried/DROID_SignatureFile_V119.xml")
  -eof int
    	define a maximum EOF offset
  -exclude string
    	comma separated list of PRONOM signatures to exclude
  -extend string
    	comma separated list of additional signatures
  -extendc string
    	comma separated list of additional container signatures
  -fdd string
    	set name/path for LOC FDD signature file
  -home string
    	override the default home directory (default "/home/ross-spencer/.local/share/siegfried")
  -limit string
    	comma separated list of PRONOM signatures to include
  -loc
    	build a LOC FDD signature file
  -mi string
    	set name/path for MIMEInfo signature file
  -multi string
    	control how identifiers treat multiple results
  -name string
    	set identifier name
  -nobyte
    	skip byte signatures
  -noclass
    	omit format classes from the signature file
  -nocontainer
    	skip container signatures
  -noeof
    	ignore EOF segments in signatures
  -nomime
    	skip MIME matcher
  -noname
    	skip filename matcher
  -nopronom
    	don't include PRONOM sigs with LOC or Wikidata signature file
  -noreports
    	build directly from DROID file rather than PRONOM reports
  -noriff
    	skip RIFF matcher
  -notext
    	skip text matcher
  -noxml
    	skip XML matcher
  -quiet
    	lower verbosity level of logging output when building signatures
  -range int
    	define a maximum range for segmentation (default 4096)
  -repetition int
    	define a maximum tolerable repetition in a segment, used in combination with cost to determine segmentation (default 4)
  -wikidata
    	build a Wikidata identifier
  -wikidatadebug
    	build a Wikidata identifier in debug mode

My home is marked: /home/ross-spencer/.local/share/siegfried

-home string
    	override the default home directory (default "/home/ross-spencer/.local/share/siegfried")

And I can override that using that flag as well.

It looks to be the same in the latest build of Siegfried too, which version are you looking at?

@Lod3
Copy link
Author

Lod3 commented Sep 3, 2024

siegfried : 1.11.1
I would like to know if Siegfried kan print the current home directory?
Now it shows you the default one. Or does sf -help show the path of the home folder if it was changed?

@ross-spencer
Copy link
Collaborator

I would like to know if Siegfried kan print the current home directory?

Richard will need to correct me if this is wrong, but I don't believe the -home arg currently passes that state anywhere, so unless it is set explicitly, the one shown in the -home argument will always be the one roy/siegfried look into first. So, any time you need to override that, it will need to be set using e.g roy build -home <your desired value>.

Just an addition, it could probably be made easier to get this info with a new flag -showhome or something.

@Lod3
Copy link
Author

Lod3 commented Sep 3, 2024

Ok, thank you for the clarification.

Just an addition, it could probably be made easier to get this info with a new flag -showhome or something.

This would be handy I think, but then again, I might have used the home folder more than average just because I am testing stuff on different platforms. The home folder on mac was a bit more difficult to locate because of brew.
I think a simple overview of default home folder locations on the wiki would suffice.

@richardlehane
Copy link
Owner

thanks @Lod3 and @ross-spencer - I've updated the wiki page to better document the default home locations for latest builds of siegfried: https://github.com/richardlehane/siegfried/wiki/Building-a-signature-file-with-ROY

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

No branches or pull requests

3 participants