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

sort My List export output #5

Closed
PetrusKiendys opened this issue Jul 4, 2020 · 3 comments · Fixed by #9
Closed

sort My List export output #5

PetrusKiendys opened this issue Jul 4, 2020 · 3 comments · Fixed by #9
Labels
enhancement New feature or request

Comments

@PetrusKiendys
Copy link

PetrusKiendys commented Jul 4, 2020

Is it possible to implement sorting of My List output?
If possible, make a settings page for the extension so that we can customize sort behaviour to our own preference.
Sort option examples could include "as-is" or alphabetically.

The primary use case would be for those of us that version track the output,
to avoid having the lines move around between commits.

Of course, those inclined to solve this on our own can easily do it by running (on Linux):
cat output.txt | sort >> tracked-mylist-file.txt

But I'm hoping this can be natively supported by the plugin?

@PetrusKiendys
Copy link
Author

With a DIY approach, for those interested I'm running a script that does the following:
cat $inputfile | awk NF | awk '{$1=$1};1' | sort > $outputfile

The full script is:

#!/bin/bash

# Sort "My List" alphabetically
inputfile="nle-mylist.out"
outputfile="NetflixMyList.txt"

cat $inputfile | awk NF | awk '{$1=$1};1' | sort > $outputfile

unset inputfile outputfile

echo "File sorted!"

awk NF removes the blank line at the end of NLE MyList export output.
awk '{$1=$1};1' removes trailing whitespaces.
These commands can possibly be concatenated somehow but whatever, it works well as it is.

Please note that this is just a temporary fix on my end, and I hope that this functionality can be supported natively by the script.
Please write here if there's any updates on this issue.

@PetrusKiendys PetrusKiendys changed the title Sort My List export output sort My List export output Sep 14, 2020
@yuanLeeMidori
Copy link
Contributor

Hi, I'm interested in working on this issue. Has there been any developer working on it already? Thank you!

@PetrusKiendys
Copy link
Author

Thanks @yuanLeeMidori , now I can throw away my bash scripts :)

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

Successfully merging a pull request may close this issue.

3 participants