Python lib/script to export Foreflight logbook

cli: fix CLI usage, update README.md

+2
.gitignore
··· 8 8 9 9 # Virtual environments 10 10 .venv 11 + 12 + logbook.csv
+16
README.md
··· 1 1 # foreflight-logbook-export 2 2 3 3 Python library / script to export ForeFlight logbook 4 + 5 + ## Usage 6 + 7 + To run it as a command line tool: 8 + 9 + ```bash 10 + $ pip install git+https://tangled.sh/@itsze.ro/foreflight-logbook-export@main 11 + $ fflogex -u [username] 12 + ``` 13 + 14 + The program will ask you for your Foreflight password and the logbook will be 15 + saved to logbook.csv. 16 + 17 + ## Library 18 + 19 + You can also alternatively use it as a library. See `cli.py` for how to use it.
+5
fflogex/__init__.py
··· 1 1 from typing import Any, cast 2 2 import requests 3 + from fflogex.cli import main 3 4 4 5 5 6 class ForeflightLogbookExporter: ··· 75 76 """ 76 77 77 78 return self._session.get(link).text 79 + 80 + 81 + def main_cli(): 82 + main()
+1 -1
main.py fflogex/cli.py
··· 24 24 _ = parser.add_argument( 25 25 "-p", 26 26 "--password", 27 - help="Specify password inline; You can also skip this and the program will ask you during the execution instead. Be careful your shell might record your password if you choose to use this option.", 27 + help="Specify password inline; You can also skip this and the program will ask you during the execution instead. BE CAREFUL: Your shell might record your password if you choose to use this option.", 28 28 ) 29 29 _ = parser.add_argument( 30 30 "-o", "--output", help="Output file name (.csv)", default="logbook.csv"
+3
pyproject.toml
··· 6 6 requires-python = ">=3.11" 7 7 dependencies = ["requests>=2.32.3"] 8 8 9 + [project.scripts] 10 + fflogex = "fflogex:main_cli" 11 + 9 12 [tool.pyright] 10 13 venvPath = "." 11 14 venv = ".venv"