Skip to content

Instantly share code, notes, and snippets.

@sguzman
Created March 12, 2022 18:46
Show Gist options
  • Save sguzman/1d991ccbe18410771de7ad049e407d9d to your computer and use it in GitHub Desktop.
Save sguzman/1d991ccbe18410771de7ad049e407d9d to your computer and use it in GitHub Desktop.
Parse out read books from good read dumps and sort by read date
With[{
csv = Import[
"C:\\Users\\Salvador \
Guzman\\Documents\\goodeads-dump\\goodreads_library_export.csv",
"CSV"
],
data = {2, 3, 12, 15}
},
With[{
headers = First@csv
},
Prepend[
ReverseSortBy[
Table[row[[data]], {row,
Cases[csv,
List[
Repeated[Blank[], 18],
"read",
BlankNullSequence[]
]]}], Last], headers[[data]]]]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment