mirror of
https://github.com/kellyjonbrazil/jc.git
synced 2025-06-21 00:19:42 +02:00
add initial \n to first line of multiline fields
This commit is contained in:
@ -127,7 +127,7 @@ def parse(
|
||||
for row in cleandata:
|
||||
if row.startswith('---'):
|
||||
if last_key_data:
|
||||
package[last_key] = package[last_key] + '\n'.join(last_key_data)
|
||||
package[last_key] = package[last_key] + '\n' + '\n'.join(last_key_data)
|
||||
|
||||
raw_output.append(package)
|
||||
package = {}
|
||||
@ -143,7 +143,7 @@ def parse(
|
||||
item_value = None
|
||||
|
||||
if last_key_data and last_key != item_key:
|
||||
package[last_key] = package[last_key] + '\n'.join(last_key_data)
|
||||
package[last_key] = package[last_key] + '\n' + '\n'.join(last_key_data)
|
||||
last_key_data = []
|
||||
|
||||
package[item_key] = item_value
|
||||
@ -156,7 +156,7 @@ def parse(
|
||||
|
||||
if package:
|
||||
if last_key_data:
|
||||
package[last_key] = package[last_key] + '\n'.join(last_key_data)
|
||||
package[last_key] = package[last_key] + '\n' + '\n'.join(last_key_data)
|
||||
|
||||
raw_output.append(package)
|
||||
|
||||
|
@ -1 +1 @@
|
||||
[{"name":"setuptools","version":"39.2.0","summary":"Easily download, build, install, upgrade, and uninstall Python packages","home_page":"https://github.com/pypa/setuptools","author":"Python Packaging Authority","author_email":"distutils-sig@python.org","license":"UNKNOWN","location":"/usr/lib/python3.6/site-packages","requires":null,"required_by":"twine"},{"name":"pkginfo","version":"1.5.0.1","summary":"Query metadatdata from sdists / bdists / installed packages.","home_page":"https://code.launchpad.net/~tseaver/pkginfo/trunk","author":"Tres Seaver, Agendaless Consulting","author_email":"tseaver@agendaless.com","license":"MIT","location":"/home/kbrazil/.local/lib/python3.6/site-packages","requires":null,"required_by":"twine"},{"name":"cppy","version":"1.2.1","summary":"UNKNOWN","home_page":"https://github.com/nucleic/cppy","author":"None","author_email":"The Nucleic Development Team <sccolbert@gmail.com>","license":"Copyright (c) 2014, NucleicAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","location":"/usr/home/bryder/.local/lib/python3.7/site-packages","requires":null,"required_by":null},{"name":"six","version":"1.12.0","summary":"Python 2 and 3 compatibility utilities","home_page":"https://github.com/benjaminp/six","author":"Benjamin Peterson","author_email":"benjamin@python.org","license":"MIT","location":"/home/kbrazil/.local/lib/python3.6/site-packages","requires":null,"required_by":"readme-renderer, bleach"},{"name":"cppy","version":"1.2.1","summary":"UNKNOWN","home_page":"https://github.com/nucleic/cppy","author":"None","author_email":"The Nucleic Development Team <sccolbert@gmail.com>","license":"Copyright (c) 2014, NucleicAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","location":"/usr/home/bryder/.local/lib/python3.7/site-packages","requires":null,"required_by":null}]
|
||||
[{"name":"setuptools","version":"39.2.0","summary":"Easily download, build, install, upgrade, and uninstall Python packages","home_page":"https://github.com/pypa/setuptools","author":"Python Packaging Authority","author_email":"distutils-sig@python.org","license":"UNKNOWN","location":"/usr/lib/python3.6/site-packages","requires":null,"required_by":"twine"},{"name":"pkginfo","version":"1.5.0.1","summary":"Query metadatdata from sdists / bdists / installed packages.","home_page":"https://code.launchpad.net/~tseaver/pkginfo/trunk","author":"Tres Seaver, Agendaless Consulting","author_email":"tseaver@agendaless.com","license":"MIT","location":"/home/kbrazil/.local/lib/python3.6/site-packages","requires":null,"required_by":"twine"},{"name":"cppy","version":"1.2.1","summary":"UNKNOWN","home_page":"https://github.com/nucleic/cppy","author":"None","author_email":"The Nucleic Development Team <sccolbert@gmail.com>","license":"Copyright (c) 2014, Nucleic\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","location":"/usr/home/bryder/.local/lib/python3.7/site-packages","requires":null,"required_by":null},{"name":"six","version":"1.12.0","summary":"Python 2 and 3 compatibility utilities","home_page":"https://github.com/benjaminp/six","author":"Benjamin Peterson","author_email":"benjamin@python.org","license":"MIT","location":"/home/kbrazil/.local/lib/python3.6/site-packages","requires":null,"required_by":"readme-renderer, bleach"},{"name":"cppy","version":"1.2.1","summary":"UNKNOWN","home_page":"https://github.com/nucleic/cppy","author":"None","author_email":"The Nucleic Development Team <sccolbert@gmail.com>","license":"Copyright (c) 2014, Nucleic\nAll rights reserved.\nRedistribution and use in source and binary forms, with or without\nmodification, are permitted provided that the following conditions are met:\n* Redistributions of source code must retain the above copyright notice, this\nlist of conditions and the following disclaimer.\n* Redistributions in binary form must reproduce the above copyright notice,\nthis list of conditions and the following disclaimer in the documentation\nand/or other materials provided with the distribution.\n* Neither the name of the copyright holder nor the names of its\ncontributors may be used to endorse or promote products derived from\nthis software without specific prior written permission.\nTHIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\"\nAND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE\nIMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE\nDISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE\nFOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL\nDAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR\nSERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER\nCAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,\nOR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE\nOF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.","location":"/usr/home/bryder/.local/lib/python3.7/site-packages","requires":null,"required_by":null}]
|
||||
|
Reference in New Issue
Block a user