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

Format change for '-S' output #38

Closed
hjmangalam opened this issue Jan 21, 2022 · 7 comments
Closed

Format change for '-S' output #38

hjmangalam opened this issue Jan 21, 2022 · 7 comments

Comments

@hjmangalam
Copy link

Hi Ganael,
The new '-S' (skip files larger than partition size) output format is the current output of '-S' is a bit noisy:
ie:
S (1902116864): /home/hjm/Downloads/isos/lmde-4-cinnamon-32bit.iso

Could this be simplifired to:
1902116864<tab>/home/hjm/Downloads/isos/lmde-4-cinnamon-32bit.iso

the '-v' output goes to STDERR so it can be filtered and that leaves a nicely segregated file

$ ~/bin/fpart-1.4.1 -vvv  -L -S  -s 200m \
-o ~/fpart/Fs/f  ~/Downloads > chunk.exceptions

(lots of verbose STDERR output)

$ head -5 chunk.exceptions
S (327155712): /home/hjm/Downloads/RT-contents.ibd.most-of-rt-database.data
S (492830720): /home/hjm/Downloads/isos/debian-11.1.0-i386-netinst.iso
S (2009333760): /home/hjm/Downloads/isos/Fedora-Workstation-Live-x86_64-35-1.2.iso
S (3204448256): /home/hjm/Downloads/isos/kubuntu-20.04.3-desktop-amd64.iso

so rather than perform a couple of complex regex splits (OK, not very complex), all you need is simple (and usually default in many languages) split on whitespace.

The current format of the partition files is simply a list of fully qualified filename paths with no prefixes.
so the the simpler format suggested above is similar (prefixed with the byte size of the file.)

Thanks
Harry

martymac added a commit that referenced this issue Mar 3, 2022
That change will ease output parsing.

(closes GH issue #38)
@martymac
Copy link
Owner

martymac commented Mar 3, 2022

Hello Harry,

I've just pushed a change that modifies the global output format of files listed to stdout. The new format is as below :

partition_index file_size file_path

and will be much easier to parse.

Cheers,

Ganael.

@hjmangalam
Copy link
Author

hjmangalam commented Mar 3, 2022 via email

@martymac
Copy link
Owner

martymac commented Mar 8, 2022

Hello Harry,

Have you been able to test the change ?

@hjmangalam
Copy link
Author

hjmangalam commented Mar 8, 2022 via email

martymac added a commit that referenced this issue Mar 8, 2022
Finally use <tab> instead of <space> to separate fields.
Also, rename a few variables for clarification.

Followup to commit 385beb6 (GH issue #38)
@martymac
Copy link
Owner

martymac commented Mar 8, 2022

Hi Harry,

Right, it will also be cleaner. I have just pushed a change in that way.

The 'S' letter means 'S'kipped, see issue #36.

Cheers,

Ganael.

@martymac martymac closed this as completed Mar 8, 2022
@hjmangalam
Copy link
Author

hjmangalam commented Oct 11, 2022 via email

@martymac
Copy link
Owner

Hello Harry!

No pb, take your time... the change is already available in the latest release.

Cheers,

Ganael.

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

2 participants