Symbolon packs

kausalflow/lightkone / components/library-file/versions/1/examples.jsonl · raw

{"input": {"text": {"$text": "paperpile-import.json"}}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"p1\",\n   \"key\": \"Vaswani2017-at\",\n   \"type\": \"inproceedings\",\n   \"title\": \"Attention Is All You Need\",\n   \"authors\": [\n    \"Vaswani, Ashish\",\n    \"Shazeer, Noam\"\n   ],\n   \"year\": 2017,\n   \"venue\": \"Advances in Neural Information Processing Systems\",\n   \"arxiv\": \"1706.03762\",\n   \"file\": \"All Papers/VASWANI/Vaswani et al. 2017 - Attention Is All You Need.pdf\",\n   \"tags\": [\n    \"ml\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"p2\",\n   \"key\": \"Peskin1995-in\",\n   \"type\": \"book\",\n   \"title\": \"An Introduction to Quantum Field Theory\",\n   \"authors\": [\n    \"Peskin, Michael E.\",\n    \"Schroeder, Daniel V.\"\n   ],\n   \"year\": 1995,\n   \"file\": \"All Papers/MLDS/Physics/QFT/Peskin and Schroeder 1995 - An Introduction to Quantum Field Theory.pdf\",\n   \"tags\": [\n    \"physics\",\n    \"to read\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": [\n    \"MLDS/Physics/QFT\"\n   ]\n  },\n  {\n   \"id\": \"p3\",\n   \"key\": \"Hinton2012-im\",\n   \"type\": \"article\",\n   \"title\": \"Improving neural networks by preventing co-adaptation of feature detectors\",\n   \"authors\": [\n    \"Hinton, Geoffrey E.\",\n    \"Srivastava, Nitish\"\n   ],\n   \"year\": 2012,\n   \"arxiv\": \"1207.0580\",\n   \"file\": \"All Papers/HINTON/Hinton et al. 2012 - Improving neural networks.pdf; All Papers/MLDS/Reading group/Hinton et al. 2012 - Improving neural networks.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"note\": \"dropout\"\n   },\n   \"folders\": [\n    \"MLDS/Reading group\"\n   ]\n  },\n  {\n   \"id\": \"p4\",\n   \"key\": \"Anon-un\",\n   \"type\": \"article\",\n   \"title\": \"Untitled scan\",\n   \"authors\": [],\n   \"file\": \"All Papers/Other/scan-0042.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"p5\",\n   \"key\": \"LIGO2016-ob\",\n   \"type\": \"article\",\n   \"title\": \"Observation of Gravitational Waves from a Binary Black Hole Merger\",\n   \"authors\": [\n    \"LIGO Scientific Collaboration\",\n    \"others\"\n   ],\n   \"year\": 2016,\n   \"venue\": \"Physical Review Letters\",\n   \"doi\": \"10.1103/PhysRevLett.116.061102\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"volume\": \"116\",\n    \"pages\": \"061102\"\n   },\n   \"folders\": []\n  },\n  {\n   \"id\": \"p6\",\n   \"key\": \"Noether1918-in\",\n   \"type\": \"article\",\n   \"title\": \"Invariante Variationsprobleme\",\n   \"authors\": [\n    \"Noether, Emmy\"\n   ],\n   \"year\": 1918,\n   \"venue\": \"Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen\",\n   \"file\": \"Physics/Classics/Noether 1918.pdf;;Physics/Classics/Noether 1918.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": [\n    \"Physics/Classics\"\n   ]\n  }\n ]\n}", "bib": "@inproceedings{Vaswani2017-at,\n  title         = {{Attention Is All You Need}},\n  author        = {Vaswani, Ashish and Shazeer, Noam},\n  year          = {2017},\n  booktitle     = {Advances in Neural Information Processing Systems},\n  eprint        = {1706.03762},\n  archiveprefix = {arXiv},\n  keywords      = {ml},\n  file          = {All Papers/VASWANI/Vaswani et al. 2017 - Attention Is All You Need.pdf}\n}\n\n@book{Peskin1995-in,\n  title    = {{An Introduction to Quantum Field Theory}},\n  author   = {Peskin, Michael E. and Schroeder, Daniel V.},\n  year     = {1995},\n  keywords = {physics;to read},\n  file     = {All Papers/MLDS/Physics/QFT/Peskin and Schroeder 1995 - An Introduction to Quantum Field Theory.pdf}\n}\n\n@article{Hinton2012-im,\n  title         = {{Improving neural networks by preventing co-adaptation of feature detectors}},\n  author        = {Hinton, Geoffrey E. and Srivastava, Nitish},\n  year          = {2012},\n  eprint        = {1207.0580},\n  archiveprefix = {arXiv},\n  file          = {All Papers/HINTON/Hinton et al. 2012 - Improving neural networks.pdf; All Papers/MLDS/Reading group/Hinton et al. 2012 - Improving neural networks.pdf},\n  note          = {dropout}\n}\n\n@article{Anon-un,\n  title = {{Untitled scan}},\n  file  = {All Papers/Other/scan-0042.pdf}\n}\n\n@article{LIGO2016-ob,\n  title   = {{Observation of Gravitational Waves from a Binary Black Hole Merger}},\n  author  = {{LIGO Scientific Collaboration} and others},\n  year    = {2016},\n  journal = {Physical Review Letters},\n  doi     = {10.1103/PhysRevLett.116.061102},\n  volume  = {116},\n  pages   = {061102}\n}\n\n@article{Noether1918-in,\n  title   = {{Invariante Variationsprobleme}},\n  author  = {Noether, Emmy},\n  year    = {1918},\n  journal = {Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen},\n  file    = {Physics/Classics/Noether 1918.pdf;;Physics/Classics/Noether 1918.pdf}\n}\n", "foldered": 3}, "note": "a library imported from Paperpile: folders come from the Drive paths; author folders and Other are skipped"}
{"input": {"text": {"$text": "saved.json"}}, "output": {"written": false, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"p1\",\n   \"key\": \"Vaswani2017-at\",\n   \"type\": \"inproceedings\",\n   \"title\": \"Attention Is All You Need\",\n   \"authors\": [\n    \"Vaswani, Ashish\",\n    \"Shazeer, Noam\"\n   ],\n   \"year\": 2017,\n   \"venue\": \"Advances in Neural Information Processing Systems\",\n   \"arxiv\": \"1706.03762\",\n   \"file\": \"All Papers/VASWANI/Vaswani et al. 2017 - Attention Is All You Need.pdf\",\n   \"tags\": [\n    \"ml\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"p2\",\n   \"key\": \"Peskin1995-in\",\n   \"type\": \"book\",\n   \"title\": \"An Introduction to Quantum Field Theory\",\n   \"authors\": [\n    \"Peskin, Michael E.\",\n    \"Schroeder, Daniel V.\"\n   ],\n   \"year\": 1995,\n   \"file\": \"All Papers/MLDS/Physics/QFT/Peskin and Schroeder 1995 - An Introduction to Quantum Field Theory.pdf\",\n   \"tags\": [\n    \"physics\",\n    \"to read\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": [\n    \"MLDS/Physics/QFT\"\n   ]\n  },\n  {\n   \"id\": \"p3\",\n   \"key\": \"Hinton2012-im\",\n   \"type\": \"article\",\n   \"title\": \"Improving neural networks by preventing co-adaptation of feature detectors\",\n   \"authors\": [\n    \"Hinton, Geoffrey E.\",\n    \"Srivastava, Nitish\"\n   ],\n   \"year\": 2012,\n   \"arxiv\": \"1207.0580\",\n   \"file\": \"All Papers/HINTON/Hinton et al. 2012 - Improving neural networks.pdf; All Papers/MLDS/Reading group/Hinton et al. 2012 - Improving neural networks.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"note\": \"dropout\"\n   },\n   \"folders\": [\n    \"MLDS/Reading group\"\n   ]\n  },\n  {\n   \"id\": \"p4\",\n   \"key\": \"Anon-un\",\n   \"type\": \"article\",\n   \"title\": \"Untitled scan\",\n   \"authors\": [],\n   \"file\": \"All Papers/Other/scan-0042.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"p5\",\n   \"key\": \"LIGO2016-ob\",\n   \"type\": \"article\",\n   \"title\": \"Observation of Gravitational Waves from a Binary Black Hole Merger\",\n   \"authors\": [\n    \"LIGO Scientific Collaboration\",\n    \"others\"\n   ],\n   \"year\": 2016,\n   \"venue\": \"Physical Review Letters\",\n   \"doi\": \"10.1103/PhysRevLett.116.061102\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"volume\": \"116\",\n    \"pages\": \"061102\"\n   },\n   \"folders\": []\n  },\n  {\n   \"id\": \"p6\",\n   \"key\": \"Noether1918-in\",\n   \"type\": \"article\",\n   \"title\": \"Invariante Variationsprobleme\",\n   \"authors\": [\n    \"Noether, Emmy\"\n   ],\n   \"year\": 1918,\n   \"venue\": \"Nachrichten von der Gesellschaft der Wissenschaften zu Göttingen\",\n   \"file\": \"Physics/Classics/Noether 1918.pdf;;Physics/Classics/Noether 1918.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": [\n    \"Physics/Classics\"\n   ]\n  }\n ]\n}", "bib": null, "foldered": 0}, "note": "exactly what lightkone wrote last time: nothing to write"}
{"input": {"text": {"$text": "shared.json"}}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"s1\",\n   \"key\": \"Noether1918-in\",\n   \"type\": \"article\",\n   \"title\": \"Invariante Variationsprobleme\",\n   \"authors\": [\n    \"Noether, Emmy\"\n   ],\n   \"year\": 1918,\n   \"venue\": \"Göttinger Nachrichten\",\n   \"tags\": [\n    \"physics\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"lightkone-read\": \"yes\"\n   },\n   \"folders\": [\n    \"Physics/Classics\"\n   ],\n   \"starred\": true,\n   \"notes\": \"Theorem I: symmetries ↔ conserved currents.\\nTheorem II: gauge.\",\n   \"by\": \"Ana\"\n  },\n  {\n   \"id\": \"s2\",\n   \"key\": \"Dirac1928-qu\",\n   \"type\": \"article\",\n   \"title\": \"The Quantum Theory of the Electron\",\n   \"authors\": [\n    \"Dirac, P. A. M.\"\n   ],\n   \"year\": 1928,\n   \"venue\": \"Proc. R. Soc. Lond. A\",\n   \"doi\": \"https://doi.org/10.1098/rspa.1928.0023\",\n   \"file\": \"All Papers/DIRAC/Dirac 1928.pdf\",\n   \"tags\": [],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": \"2024-05-02T10:00:00.000Z\",\n   \"folders\": []\n  },\n  {\n   \"id\": \"s3\",\n   \"key\": \"Shannon1948-am\",\n   \"type\": \"article\",\n   \"title\": \"A Mathematical Theory of Communication\",\n   \"authors\": [\n    \"Shannon, C. E.\"\n   ],\n   \"year\": 1948,\n   \"venue\": \"Bell System Technical Journal\",\n   \"tags\": [\n    \"information theory\",\n    \"ml\"\n   ],\n   \"added\": \"2024-03-01T09:00:00.000Z\",\n   \"fields\": {\n    \"volume\": \"27\",\n    \"pages\": \"379--423\"\n   },\n   \"folders\": [],\n   \"opened\": \"2024-06-01T08:00:00.000Z\",\n   \"rating\": 4.5,\n   \"pdf\": \"papers/SHANNON/Shannon 1948 - A Mathematical Theory of Communication.pdf\"\n  }\n ],\n \"bibSync\": [\n  {\n   \"folder\": \"Physics\",\n   \"repo\": \"ana/thesis\",\n   \"path\": \"refs.bib\",\n   \"tex\": \"\",\n   \"aliases\": {\n    \"2\": \"s1\",\n    \"1928\": \"s2\",\n    \"shannon\": \"s3\"\n   }\n  }\n ],\n \"exportedBy\": \"a sync script\"\n}", "bib": "@article{Noether1918-in,\n  title    = {{Invariante Variationsprobleme}},\n  author   = {Noether, Emmy},\n  year     = {1918},\n  journal  = {Göttinger Nachrichten},\n  keywords = {physics}\n}\n\n@article{Shannon1948-am,\n  title    = {{A Mathematical Theory of Communication}},\n  author   = {Shannon, C. E.},\n  year     = {1948},\n  journal  = {Bell System Technical Journal},\n  keywords = {information theory;ml},\n  volume   = {27},\n  pages    = {379--423}\n}\n", "foldered": 0}, "note": "a shared library: bibSync kept, another tool's top-level key kept after it, alias keys that are numbers move first, the trashed paper left out of library.bib"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "an empty library written compactly is rewritten with an indent of one space"}
{"input": {"text": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}"}, "output": {"written": false, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": null, "foldered": 0}, "note": "an empty library already in lightkone's layout"}
{"input": {"text": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}\n"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "a trailing newline is enough to make the save write"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [], \"bibSync\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "an empty bibSync is left out"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 7, \"papers\": []}"}, "raises": "ValueError", "note": "a version above 1 was saved by a newer lightkone: refused, nothing written"}
{"input": {"text": "{\"papers\": [], \"version\": 1, \"format\": \"lightkone-library\"}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "top-level keys are written in lightkone's order"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"Reading group/Doe 2020.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"Reading group/Doe 2020.pdf\",\n   \"folders\": [\n    \"Reading group\"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {Reading group/Doe 2020.pdf}\n}\n", "foldered": 1}, "note": "a path without All Papers still gives its folder"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/Doe 2020.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/Doe 2020.pdf\",\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {All Papers/Doe 2020.pdf}\n}\n", "foldered": 0}, "note": "a PDF directly in All Papers is in no folder"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/ML/Doe 2020.pdf;All Papers/McKay/x.pdf;All Papers/2019/y.pdf;All Papers/Other/z.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/ML/Doe 2020.pdf;All Papers/McKay/x.pdf;All Papers/2019/y.pdf;All Papers/Other/z.pdf\",\n   \"folders\": [\n    \"ML\",\n    \"McKay\",\n    \"2019\"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {All Papers/ML/Doe 2020.pdf;All Papers/McKay/x.pdf;All Papers/2019/y.pdf;All Papers/Other/z.pdf}\n}\n", "foldered": 1}, "note": "a single directory in capitals is kept unless it is an author's surname: ML and 2019 stay folders, McKay is kept, Other is skipped"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/Other/Sub/z.pdf;All Papers/HINTON/Deep/q.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/Other/Sub/z.pdf;All Papers/HINTON/Deep/q.pdf\",\n   \"folders\": [\n    \"Other/Sub\",\n    \"HINTON/Deep\"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {All Papers/Other/Sub/z.pdf;All Papers/HINTON/Deep/q.pdf}\n}\n", "foldered": 1}, "note": "author and Other folders are skipped only when they are the whole path"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"  ; All Papers/A/b/x.pdf ;All Papers/A/b/y.pdf;;All Papers/c/d.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"  ; All Papers/A/b/x.pdf ;All Papers/A/b/y.pdf;;All Papers/c/d.pdf\",\n   \"folders\": [\n    \"A/b\",\n    \"c\"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {  ; All Papers/A/b/x.pdf ;All Papers/A/b/y.pdf;;All Papers/c/d.pdf}\n}\n", "foldered": 1}, "note": "empty paths skipped, each path trimmed, repeats kept once in order"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/ X /a.pdf; All Papers/Y/ z /b.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/ X /a.pdf; All Papers/Y/ z /b.pdf\",\n   \"folders\": [\n    \" X \",\n    \"Y/ z \"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {All Papers/ X /a.pdf; All Papers/Y/ z /b.pdf}\n}\n", "foldered": 1}, "note": "only whole paths are trimmed, not each directory"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/Physics/a.pdf\", \"folders\": []}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/Physics/a.pdf\",\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  file   = {All Papers/Physics/a.pdf}\n}\n", "foldered": 0}, "note": "a paper that already has folders, even none, keeps them"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}}, {\"id\": \"b\", \"key\": \"Doe2020-ab2\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"folders\": [\"X\"]}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"b\",\n   \"key\": \"Doe2020-ab2\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": [\n    \"X\"\n   ]\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane}\n}\n\n@article{Doe2020-ab2,\n  title  = {{A title}},\n  author = {Doe, Jane}\n}\n", "foldered": 0}, "note": "a paper with no file gets an empty folders list, added after its other keys"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"year\": 2017.0, \"extra\": [0.1, 1e+16, 1e+21, 1.5e+300, 1e-07, 1e-06, -0.0, 123456789012345, 2.5, -3]}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"year\": 2017,\n   \"extra\": [\n    0.1,\n    10000000000000000,\n    1e+21,\n    1.5e+300,\n    1e-7,\n    0.000001,\n    0,\n    123456789012345,\n    2.5,\n    -3\n   ],\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane},\n  year   = {2017}\n}\n", "foldered": 0}, "note": "numbers are written the way JavaScript prints them"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"extra\": {\"b\": 1, \"10\": 2, \"2\": 3, \"01\": 4, \"-1\": 5, \"4294967295\": 6, \"4294967294\": 7, \"1.5\": 8}}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"extra\": {\n    \"2\": 3,\n    \"10\": 2,\n    \"4294967294\": 7,\n    \"b\": 1,\n    \"01\": 4,\n    \"-1\": 5,\n    \"4294967295\": 6,\n    \"1.5\": 8\n   },\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{A title}},\n  author = {Doe, Jane}\n}\n", "foldered": 0}, "note": "keys that are array indices are written first, in numeric order"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"Quote \\\" backslash \\\\ tab \\t newline \\n bell \\u0007 escape \\u001b DEL  line sep 
 é 漢字 🙂\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"Quote \\\" backslash \\\\ tab \\t newline \\n bell \\u0007 escape \\u001b DEL  line sep 
 é 漢字 🙂\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title  = {{Quote \" backslash \\ tab \t newline \n bell \u0007 escape \u001b DEL  line sep 
 é 漢字 🙂}},\n  author = {Doe, Jane}\n}\n", "foldered": 0}, "note": "only quotes, backslashes and control characters are escaped"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"article\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [\"a\", \"b\"], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {\"note\": \"has & and %\", \"lightkone-x\": \"private\"}, \"venue\": \"Venue & Co\", \"doi\": \"10.1/x\", \"starred\": true}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"article\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [\n    \"a\",\n    \"b\"\n   ],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {\n    \"note\": \"has & and %\",\n    \"lightkone-x\": \"private\"\n   },\n   \"venue\": \"Venue & Co\",\n   \"doi\": \"10.1/x\",\n   \"starred\": true,\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Doe2020-ab,\n  title    = {{A title}},\n  author   = {Doe, Jane},\n  journal  = {Venue \\& Co},\n  doi      = {10.1/x},\n  keywords = {a;b},\n  note     = {has & and %}\n}\n", "foldered": 0}, "note": "library.bib is the BibTeX export of each paper"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Doe2020-ab\", \"type\": \"book\", \"title\": \"A title\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": \"2024-02-02T00:00:00.000Z\"}, {\"id\": \"b\", \"key\": \"Roe1999-xy\", \"type\": \"article\", \"title\": \"Second\", \"authors\": [\"LIGO Collaboration\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"year\": 1999}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Doe2020-ab\",\n   \"type\": \"book\",\n   \"title\": \"A title\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": \"2024-02-02T00:00:00.000Z\",\n   \"folders\": []\n  },\n  {\n   \"id\": \"b\",\n   \"key\": \"Roe1999-xy\",\n   \"type\": \"article\",\n   \"title\": \"Second\",\n   \"authors\": [\n    \"LIGO Collaboration\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"year\": 1999,\n   \"folders\": []\n  }\n ]\n}", "bib": "@article{Roe1999-xy,\n  title  = {{Second}},\n  author = {{LIGO Collaboration}},\n  year   = {1999}\n}\n", "foldered": 0}, "note": "papers in the trash are left out of library.bib; entries are joined by a newline"}
{"input": {"text": "{\"format\": \"x\", \"format\": \"lightkone-library\", \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "a repeated key: the last value counts, in the first one's place"}
{"input": {"text": "  \n{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": []}\n\t "}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "whitespace around the JSON is fine"}
{"input": {"text": "nope"}, "raises": "ValueError", "note": "not JSON"}
{"input": {"text": ""}, "raises": "ValueError", "note": "an empty file"}
{"input": {"text": "{\"format\":\"lightkone-library\",\"version\":1,\"papers\":[],\"x\":NaN}"}, "raises": "ValueError", "note": "NaN is not JSON"}
{"input": {"text": "{\"format\":\"lightkone-library\",\"version\":1,\"papers\":[],}"}, "raises": "ValueError", "note": "a trailing comma is not JSON"}
{"input": {"text": "null"}, "raises": "ValueError", "note": "JSON, but not an object"}
{"input": {"text": "[]"}, "raises": "ValueError", "note": "an array is not a library"}
{"input": {"text": "\"lightkone-library\""}, "raises": "ValueError", "note": "a string is not a library"}
{"input": {"text": "{}"}, "raises": "ValueError", "note": "no format"}
{"input": {"text": "{\"format\": \"Lightkone-library\", \"version\": 1, \"papers\": []}"}, "raises": "ValueError", "note": "format must match exactly"}
{"input": {"text": "{\"format\": \"paperpile\", \"papers\": []}"}, "raises": "ValueError", "note": "another app's file"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1}"}, "raises": "ValueError", "note": "no papers"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": {}}"}, "raises": "ValueError", "note": "papers must be a list"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": \"ab\"}"}, "raises": "ValueError", "note": "papers must be a list, not a string"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [null]}"}, "raises": "ValueError", "note": "a paper must be an object"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [3]}"}, "raises": "ValueError", "note": "a paper must be an object, not a number"}
{"input": {"text": "{\"exportedBy\": \"zotero-sync\", \"format\": \"lightkone-library\", \"papers\": [], \"meta\": {\"b\": 2, \"a\": [1, {}]}, \"version\": 1, \"1\": \"index key\"}"}, "output": {"written": true, "library": "{\n \"1\": \"index key\",\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [],\n \"exportedBy\": \"zotero-sync\",\n \"meta\": {\n  \"b\": 2,\n  \"a\": [\n   1,\n   {}\n  ]\n }\n}", "bib": "", "foldered": 0}, "note": "other tools' top-level keys are kept, in the order the file lists them, after format, version, papers and bibSync; a key that is an array index still comes first"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"bibSync\": [], \"papers\": [], \"note\": 0}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [],\n \"note\": 0\n}", "bib": "", "foldered": 0}, "note": "an empty bibSync is dropped but another tool's key is kept, even when its value is 0"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [], \"x\": 1, \"y\": true, \"x\": \"second\"}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [],\n \"x\": \"second\",\n \"y\": true\n}", "bib": "", "foldered": 0}, "note": "a repeated top-level key keeps its last value, in the first one's place"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"t1\", \"key\": \"Trash1\", \"type\": \"misc\", \"title\": \"Paper 1\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": false}, {\"id\": \"t2\", \"key\": \"Trash2\", \"type\": \"misc\", \"title\": \"Paper 2\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": 0}, {\"id\": \"t3\", \"key\": \"Trash3\", \"type\": \"misc\", \"title\": \"Paper 3\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": \"\"}, {\"id\": \"t5\", \"key\": \"Trash5\", \"type\": \"misc\", \"title\": \"Paper 5\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"t1\",\n   \"key\": \"Trash1\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 1\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": false,\n   \"folders\": []\n  },\n  {\n   \"id\": \"t2\",\n   \"key\": \"Trash2\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 2\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": 0,\n   \"folders\": []\n  },\n  {\n   \"id\": \"t3\",\n   \"key\": \"Trash3\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 3\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": \"\",\n   \"folders\": []\n  },\n  {\n   \"id\": \"t5\",\n   \"key\": \"Trash5\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 5\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  }\n ]\n}", "bib": "@misc{Trash1,\n  title  = {{Paper 1}},\n  author = {Doe, Jane}\n}\n\n@misc{Trash2,\n  title  = {{Paper 2}},\n  author = {Doe, Jane}\n}\n\n@misc{Trash3,\n  title  = {{Paper 3}},\n  author = {Doe, Jane}\n}\n\n@misc{Trash5,\n  title  = {{Paper 5}},\n  author = {Doe, Jane}\n}\n", "foldered": 0}, "note": "a trashed value that JavaScript counts as false (false, 0, \"\") or no trashed key keeps the paper in library.bib"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"t1\", \"key\": \"Trash1\", \"type\": \"misc\", \"title\": \"Paper 1\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": []}, {\"id\": \"t2\", \"key\": \"Trash2\", \"type\": \"misc\", \"title\": \"Paper 2\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": {}}, {\"id\": \"t3\", \"key\": \"Trash3\", \"type\": \"misc\", \"title\": \"Paper 3\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": true}, {\"id\": \"t4\", \"key\": \"Trash4\", \"type\": \"misc\", \"title\": \"Paper 4\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": 1}, {\"id\": \"t5\", \"key\": \"Trash5\", \"type\": \"misc\", \"title\": \"Paper 5\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": \"no\"}, {\"id\": \"t6\", \"key\": \"Trash6\", \"type\": \"misc\", \"title\": \"Paper 6\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"t1\",\n   \"key\": \"Trash1\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 1\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": [],\n   \"folders\": []\n  },\n  {\n   \"id\": \"t2\",\n   \"key\": \"Trash2\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 2\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": {},\n   \"folders\": []\n  },\n  {\n   \"id\": \"t3\",\n   \"key\": \"Trash3\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 3\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": true,\n   \"folders\": []\n  },\n  {\n   \"id\": \"t4\",\n   \"key\": \"Trash4\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 4\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": 1,\n   \"folders\": []\n  },\n  {\n   \"id\": \"t5\",\n   \"key\": \"Trash5\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 5\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": \"no\",\n   \"folders\": []\n  },\n  {\n   \"id\": \"t6\",\n   \"key\": \"Trash6\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 6\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"folders\": []\n  }\n ]\n}", "bib": "@misc{Trash6,\n  title  = {{Paper 6}},\n  author = {Doe, Jane}\n}\n", "foldered": 0}, "note": "any other trashed value puts the paper in the trash, an empty list or object included"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"t1\", \"key\": \"Trash1\", \"type\": \"misc\", \"title\": \"Paper 1\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": \"2024-02-01T00:00:00.000Z\"}, {\"id\": \"t2\", \"key\": \"Trash2\", \"type\": \"misc\", \"title\": \"Paper 2\", \"authors\": [\"Doe, Jane\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"trashed\": true}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"t1\",\n   \"key\": \"Trash1\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 1\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": \"2024-02-01T00:00:00.000Z\",\n   \"folders\": []\n  },\n  {\n   \"id\": \"t2\",\n   \"key\": \"Trash2\",\n   \"type\": \"misc\",\n   \"title\": \"Paper 2\",\n   \"authors\": [\n    \"Doe, Jane\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"trashed\": true,\n   \"folders\": []\n  }\n ]\n}", "bib": "", "foldered": 0}, "note": "when every paper is in the trash, library.bib is empty"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Ka\", \"type\": \"article\", \"title\": \"T\", \"authors\": [\"Hinton, Geoffrey E.\", \"Srivastava, Nitish\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/HINTON/a.pdf;All Papers/SRIVASTAVA/a.pdf;All Papers/ML/a.pdf;All Papers/DOE/a.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Ka\",\n   \"type\": \"article\",\n   \"title\": \"T\",\n   \"authors\": [\n    \"Hinton, Geoffrey E.\",\n    \"Srivastava, Nitish\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/HINTON/a.pdf;All Papers/SRIVASTAVA/a.pdf;All Papers/ML/a.pdf;All Papers/DOE/a.pdf\",\n   \"folders\": [\n    \"ML\",\n    \"DOE\"\n   ]\n  }\n ]\n}", "bib": "@article{Ka,\n  title  = {{T}},\n  author = {Hinton, Geoffrey E. and Srivastava, Nitish},\n  file   = {All Papers/HINTON/a.pdf;All Papers/SRIVASTAVA/a.pdf;All Papers/ML/a.pdf;All Papers/DOE/a.pdf}\n}\n", "foldered": 1}, "note": "any author's surname in capitals is an author folder, not only the first author's; DOE, an author of no paper here, stays a folder"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Ka\", \"type\": \"article\", \"title\": \"T\", \"authors\": [], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/HINTON/a.pdf;All Papers/2019/a.pdf;All Papers/ML/a.pdf;All Papers/Ml/a.pdf\"}, {\"id\": \"b\", \"key\": \"Kb\", \"type\": \"article\", \"title\": \"T\", \"authors\": [\",\", \"\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/HINTON/b.pdf;All Papers/2019/b.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Ka\",\n   \"type\": \"article\",\n   \"title\": \"T\",\n   \"authors\": [],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/HINTON/a.pdf;All Papers/2019/a.pdf;All Papers/ML/a.pdf;All Papers/Ml/a.pdf\",\n   \"folders\": [\n    \"2019\",\n    \"Ml\"\n   ]\n  },\n  {\n   \"id\": \"b\",\n   \"key\": \"Kb\",\n   \"type\": \"article\",\n   \"title\": \"T\",\n   \"authors\": [\n    \",\",\n    \"\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/HINTON/b.pdf;All Papers/2019/b.pdf\",\n   \"folders\": [\n    \"2019\"\n   ]\n  }\n ]\n}", "bib": "@article{Ka,\n  title = {{T}},\n  file  = {All Papers/HINTON/a.pdf;All Papers/2019/a.pdf;All Papers/ML/a.pdf;All Papers/Ml/a.pdf}\n}\n\n@article{Kb,\n  title  = {{T}},\n  author = {, and {}},\n  file   = {All Papers/HINTON/b.pdf;All Papers/2019/b.pdf}\n}\n", "foldered": 2}, "note": "with no authors (or only empty surnames), a single directory in capitals with a letter is taken for an author folder; 2019 has no letters and stays"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Ka\", \"type\": \"article\", \"title\": \"T\", \"authors\": [\"Stra\\u00dfe, Anna\", \"van der Berg, Jan\", \"O'Neil: X\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/STRASSE/a.pdf;All Papers/VAN DER BERG/a.pdf;All Papers/O'NEIL - X/a.pdf;All Papers/STRA\\u00dfE/a.pdf;All Papers/hinton/a.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Ka\",\n   \"type\": \"article\",\n   \"title\": \"T\",\n   \"authors\": [\n    \"Straße, Anna\",\n    \"van der Berg, Jan\",\n    \"O'Neil: X\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/STRASSE/a.pdf;All Papers/VAN DER BERG/a.pdf;All Papers/O'NEIL - X/a.pdf;All Papers/STRAßE/a.pdf;All Papers/hinton/a.pdf\",\n   \"folders\": [\n    \"STRAßE\",\n    \"hinton\"\n   ]\n  }\n ]\n}", "bib": "@article{Ka,\n  title  = {{T}},\n  author = {Straße, Anna and van der Berg, Jan and {O'Neil: X}},\n  file   = {All Papers/STRASSE/a.pdf;All Papers/VAN DER BERG/a.pdf;All Papers/O'NEIL - X/a.pdf;All Papers/STRAßE/a.pdf;All Papers/hinton/a.pdf}\n}\n", "foldered": 1}, "note": "author folders are cleaned and upper-cased as pdf-filing does: ß becomes SS, a colon becomes ' - '"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1, \"papers\": [{\"id\": \"a\", \"key\": \"Ka\", \"type\": \"article\", \"title\": \"T\", \"authors\": [\"Ml, Kim\"], \"tags\": [], \"added\": \"2024-01-01T00:00:00.000Z\", \"fields\": {}, \"file\": \"All Papers/ML/a.pdf;All Papers/Physics/ML/a.pdf\"}]}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": [\n  {\n   \"id\": \"a\",\n   \"key\": \"Ka\",\n   \"type\": \"article\",\n   \"title\": \"T\",\n   \"authors\": [\n    \"Ml, Kim\"\n   ],\n   \"tags\": [],\n   \"added\": \"2024-01-01T00:00:00.000Z\",\n   \"fields\": {},\n   \"file\": \"All Papers/ML/a.pdf;All Papers/Physics/ML/a.pdf\",\n   \"folders\": [\n    \"Physics/ML\"\n   ]\n  }\n ]\n}", "bib": "@article{Ka,\n  title  = {{T}},\n  author = {Ml, Kim},\n  file   = {All Papers/ML/a.pdf;All Papers/Physics/ML/a.pdf}\n}\n", "foldered": 1}, "note": "ML is an author folder when an author is called Ml; deeper paths are never author folders"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1.5, \"papers\": []}"}, "raises": "ValueError", "note": "any number above 1 is refused, 1.5 included"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 0, \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "a version of 0 or below is read and written as 1"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": \"2\", \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "a version that is not a number is not checked, and is written as 1"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "no version at all is read as 1"}
{"input": {"text": "{\"format\": \"lightkone-library\", \"version\": 1.0, \"papers\": []}"}, "output": {"written": true, "library": "{\n \"format\": \"lightkone-library\",\n \"version\": 1,\n \"papers\": []\n}", "bib": "", "foldered": 0}, "note": "1.0 is version 1"}