Script setup
This commit is contained in:
parent
1762126e23
commit
a9ecc3132c
|
@ -1,14 +1,40 @@
|
|||
#!/usr/bin/env python3
|
||||
''' Read CSV contacts file exported from hubspot.'''
|
||||
# MIT License
|
||||
#
|
||||
# Copyright (c) 2024 Jeff Moe
|
||||
#
|
||||
# Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
# of this software and associated documentation files (the "Software"), to deal
|
||||
# in the Software without restriction, including without limitation the rights
|
||||
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
||||
# copies of the Software, and to permit persons to whom the Software is
|
||||
# furnished to do so, subject to the following conditions:
|
||||
#
|
||||
# The above copyright notice and this permission notice shall be included in all
|
||||
# copies or substantial portions of the Software.
|
||||
#
|
||||
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
""" Read CSV contacts file exported from hubspot."""
|
||||
|
||||
import csv
|
||||
|
||||
CSV="all-contacts.csv"
|
||||
CSV = "all-contacts.csv"
|
||||
|
||||
print("Parsing" + CSV)
|
||||
|
||||
with open(CSV, newline='') as csvfile:
|
||||
contactreader = csv.reader(csvfile, delimiter=',', quotechar='"')
|
||||
def main():
|
||||
print("Parsing" + CSV)
|
||||
|
||||
with open(CSV, newline="") as csvfile:
|
||||
contactreader = csv.reader(csvfile, delimiter=",", quotechar='"')
|
||||
for row in contactreader:
|
||||
print(', '.join(row))
|
||||
print(", ".join(row))
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
|
|
|
@ -22,20 +22,18 @@ packages = [
|
|||
{ include = "hsparse" },
|
||||
]
|
||||
readme = "README.md"
|
||||
version = "0.0.1"
|
||||
|
||||
version = "0.1.0"
|
||||
|
||||
[tool.poetry.dependencies]
|
||||
python = "^3.10"
|
||||
setuptools_scm = "*"
|
||||
|
||||
|
||||
[build-system]
|
||||
requires = ["poetry-core", "setuptools_scm"]
|
||||
build-backend = "poetry.core.masonry.api"
|
||||
|
||||
[tool.poetry.scripts]
|
||||
hsparse = "hsparse.main:parse_csv_contacts"
|
||||
hsparse-csv-contacts = "hsparse.parse_csv_contacts:main"
|
||||
|
||||
[tool.poetry.urls]
|
||||
homepage = "https://libre.is/libre/hsparse"
|
||||
|
|
Loading…
Reference in a new issue