Code Monkey home page Code Monkey logo

birdnet-pi2go's Introduction

BirdNET-Pi2Go

Overview

BirdNET-Pi2Go is a data migration tool designed to facilitate the conversion of BirdNET-Pi database contents and audio files to the BirdNET-Go data model. This utility ensures seamless transition between the two models by providing functionalities for database conversion and audio file transfer.

Features

  • Database Conversion: Converts BirdNET-Pi SQLite database to BirdNET-Go format.
  • Audio File Transfer: Supports copying or moving BirdNET-Pi audio files to BirdNET-Go directory structure.
  • Flexible Operation Modes: Allows users to choose between copying or moving audio files based on their needs.
  • Disk Space Check: Verifies adequate disk space is available before performing copy operations.
  • Skip Audio Transfer: Option to skip audio file transfer and only perform database migration.

Requirements

Go 1.21 or newer programming language environment for building the tool. Access to the file system containing BirdNET-Pi and BirdNET-Go data.

Usage

Building

To build BirdNET-Pi2Go from source, clone the repository and use the Go build command:

git clone https://github.com/tphakala/birdnet-pi2go.git
cd birdnet-pi2go
go build

Running

After building, you can run BirdNET-Pi2Go with various flags to customize the migration process:

Target database should be a non-existing database, sqlite database will be created during migration.

./birdnet-pi2go -source-db <path_to_birdnet_pi_db> -target-db <path_to_birdnet_go_db> -source-dir <path_to_birdnet_pi_audio_files> -target-dir <path_to_birdnet_go_audio_files> -operation <copy|move> -skip-audio-transfer <true|false>

Flags

  • source-db: Path to the BirdNET-Pi SQLite database.
  • target-db: Path to the BirdNET-Go SQLite database.
  • source-dir: Path to BirdNET-Pi BirdSongs directory
  • target-dir: Path to BirdNET-Go clips directory
  • operation: Operation to perform on audio files (copy or move).
  • skip-audio-transfer: Skip transferring audio files and only perform database migration (true/false).

Example

./birdnet-pi2go -source-db birds.db -target-db birdnet.db -source-dir ~birdnetpi/BirdSongs -target-dir clips -operation copy

Disclaimer

This tool is provided 'AS IS', without warranty of any kind. Please ensure you have backed up your data before using this tool. The developers are not responsible for any loss of data.

Contributing

Contributions to BirdNET-Pi2Go are welcome. Please feel free to fork the repository, make your changes, and submit a pull request.

birdnet-pi2go's People

Contributors

tphakala avatar dependabot[bot] avatar

Stargazers

Broderic Duncan avatar æ avatar  avatar Alexandre avatar Tom F avatar  avatar Andrei Ivanov avatar Robin Sandfort avatar

Watchers

 avatar

birdnet-pi2go's Issues

Some issues

First, thanks for building this.

I tried to run it and ran into a couple issues. One is that the copy operation gives a "required for move operation" error, which confused me for a couple minutes.

It also looks like there's a merge operation, which is actually the one I would have wanted, but it's not currently documented.

When only using the documented copy or move operations, it seems like source-dir is required for both, even when using skip-audio-transfer true. I wasn't quite sure how to handle that. It seems to give that error even if I do create and pass in some dummy directories for source and target.

Right now I have BirdNET-Pi and BirdNET-Go running on separate computers, and I'm actually trying to merge the DBs on a third computer, which I'm sure isn't how this was intended to be used, so I will try something a little simpler and see how it goes.

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.