Giter Club home page Giter Club logo

logbook's Introduction

Logbook CLI

This is a command line tool for mainly exporting logbook records from Google Spreadsheet or local XLSX file to PDF file in EASA format. It also supports rendering a map with a visited airports and routes.

Setting up

Google Spreadsheet Logbook

Currently the tool supports only one format of the Logbook, which you will need to copy to your google account (File -> Make a copy) and share as a read-only (Anyone on the internet with this link can view).

The spreadsheet supports some total calculations, but you can remove these lines. The main important lines are started from #13

You can add your flights in the reverse (the most recent flight is in the top) or straight (the most recent flight is at the end) modes

Google API key

You will need to create an API key to allow the tool to fetch the data from the spreadsheet. The manual is here https://support.google.com/googleapi/answer/6158862?hl=en

Local Excel XLSX file

Copy the logbook.xlsx and set the filename location in the configuration file

First run

  1. Download the latest version from the releases
  2. During the first run there will be created a config file ($HOME/.logbook.json)
{
  "type": "",
  "file_name": "",
  "api_key": "",
  "owner": "Loogbook Owner",
  "page_brakes": "",
  "reverse": "true",
  "spreadsheet_id": "",
  "start_row": 20
}
  1. Open the file with a text editor and update the parameters
  • type - should be google or xlsx
  • file_name - excel filename in case the parameter type is xlsx. Can be just logbook.xlsx or a full path to the file /path/to/the/file/logbook.xlsx
  • api_key - the google API key in case the parameter type is google
  • owner - your Name, which will be written in the logbook footer
  • page_brakes - in case you'd like to divide the logbook to several ones add the page numbers. For example, for every 50 pages "page_brakes": "50,50,50"
  • reverse - should be "true" or "false", depends how you add records to the spreadsheet
  • spreadsheet_id - ID of your copied spreadsheet. You can see it in the browser URL: https://docs.google.com/spreadsheets/d/SPREADSHEET_ID/edit?usp=sharing. In case you use xlsx you can skip it.
  • start_row - the first row in the spreadsheet with a flight data. In the example spreadsheet it's a #16
  1. You can test the tool simply running it from the command line: ./logbook export. You should see a meesage like Loogbook has been exported to logbook.pdf and the pdf file in the directory

Supported commands

Export

./logbook export

It will get the data from the logbook and create a PDF logbook in EASA format

Logbook page example

Render map

In case you'd like to create a map with a visited airports and flown routes you can use the command ./logbook render-map

Renders map with visited airports

Usage:
  logbook render-map [flags]

Flags:
  -d, --filter-date DATE   Set filter for the DATE logbook field for map rendering
  -h, --help               help for render-map
      --no-routes          Skip rendering routes on the map

Examples

Create a map with visited airports for the all records

./logbook render-map --no-routes

Visited Airports only

Create a map with flights for the October 2021

./logbook render-map --filter-date "10/2021"

Filtered Map

TODO

  • add show-stats command with total times and some other numbers
  • add goreleaser

logbook's People

Contributors

vsimakhin avatar

Watchers

 avatar

logbook's Issues

Place cell width

The "Departure place" and "Arrival place" fields are not displayed correctly if the text exceeds the width of the cell.

There are some aerodromes that do not have an ICAO code.

Screenshot_20211229_090013

Screenshot_20211229_090013

Define cover pdf export

Define cover values in json configuration to export pdf.

Example:

  • License number
  • Name and surname
  • ...

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.