diff --git a/homepage/external.html b/homepage/external.html deleted file mode 100644 index ec8343d..0000000 --- a/homepage/external.html +++ /dev/null @@ -1,60 +0,0 @@ - - -HTML Frames Example - Content - - - -tbc.... -

Thanks

-stefan kahl -patrick mcguire -

Similar Systems

-

Technical Details

-machine learning -deep learning -

Used Tools

-SoX -ffmpeg -Python -Tensorfflow (Lite) -Rasberian OS -

Disclaimer

-

Other Systems

-links to other systems - - - -

Content

-

Replacing the Contents of the Current Frame

-

Clicking on these links will open the new page within the current frame.

- - -

Replacing the Whole Frameset

-

When you click on any of the following links, the whole frameset is replaced with the new website. This is because we're using target="_top" in the anchor links.

- - -

Open a New Window

-

These links open in a new browser window. This is because we use target="_blank".

- - - - \ No newline at end of file diff --git a/homepage/footer.html b/homepage/footer.html deleted file mode 100644 index 9741849..0000000 --- a/homepage/footer.html +++ /dev/null @@ -1,22 +0,0 @@ - - -HTML Frames Example - Footer - - - -

Play Live Audio

-

- - diff --git a/homepage/index.html b/homepage/index.html deleted file mode 100644 index a1294b0..0000000 --- a/homepage/index.html +++ /dev/null @@ -1,42 +0,0 @@ - - - - - BirdNET-Pi - - - - - - - - - - - - - - - - <p>This section (everything between the 'noframes' tags) will only be displayed if the users' browser doesn't support frames. You can provide a link to a non-frames version of the website here. Feel free to use HTML tags within this section.</p> - - - - diff --git a/homepage/index.php b/homepage/index.php index 31eb1c6..8bcb502 100644 --- a/homepage/index.php +++ b/homepage/index.php @@ -25,13 +25,68 @@ foreach($pages as $page){ echo $response; } if(isset($_POST['view'])){ + if($_POST['view'] == "System"){header('location:phpsysinfo/index.php');} + if($_POST['view'] == "Spectrogram"){include('spectrogram.php');} if($_POST['view'] == "Overview"){include('overview.php');} if($_POST['view'] == "Database"){include('viewdb.php');} + if($_POST['view'] == "Included"){ + if(isset($_POST['species']) && isset($_POST['add'])){ + $file='/home/pi/BirdNET-Pi/include_species_list.txt'; + $str=file_get_contents("$file"); + $str = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $str); + file_put_contents("$file", "$str"); + if(isset($_POST['species'])){ + foreach ($_POST['species'] as $selectedOption) + file_put_contents("/home/pi/BirdNET-Pi/include_species_list.txt", $selectedOption."\n", FILE_APPEND); + } + } elseif(isset($_POST['species']) && isset($_POST['del'])){ + $file = '/home/pi/BirdNET-Pi/include_species_list.txt'; + $str = file_get_contents("$file"); + $str = preg_replace('/^\h*\v+/m', '', $str); + file_put_contents("$file", "$str"); + foreach($_POST['species'] as $selectedOption) { + $content = file_get_contents("/home/pi/BirdNET-Pi/include_species_list.txt"); + $newcontent = str_replace($selectedOption, "", "$content"); + file_put_contents("/home/pi/BirdNET-Pi/include_species_list.txt", "$newcontent"); + } + $file = '/home/pi/BirdNET-Pi/include_species_list.txt'; + $str = file_get_contents("$file"); + $str = preg_replace('/^\h*\v+/m', '', $str); + file_put_contents("$file", "$str"); + } + include('scripts/include_list.php'); + } + if($_POST['view'] == "Excluded"){ + if(isset($_POST['species']) && isset($_POST['add'])){ + $file = '/home/pi/BirdNET-Pi/exclude_species_list.txt'; + $str = file_get_contents("$file"); + $str = preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $str); + file_put_contents("$file", "$str"); + foreach ($_POST['species'] as $selectedOption) + file_put_contents("/home/pi/BirdNET-Pi/exclude_species_list.txt", $selectedOption."\n", FILE_APPEND); + } elseif (isset($_POST['species']) && isset($_POST['del'])){ + $file = '/home/pi/BirdNET-Pi/exclude_species_list.txt'; + $str = file_get_contents("$file"); + $str = preg_replace('/^\h*\v+/m', '', $str); + file_put_contents("$file", "$str"); + foreach($_POST['species'] as $selectedOption) { + $content = file_get_contents("/home/pi/BirdNET-Pi/exclude_species_list.txt"); + $newcontent = str_replace($selectedOption, "", "$content"); + file_put_contents("/home/pi/BirdNET-Pi/exclude_species_list.txt", "$newcontent"); + } + $file = '/home/pi/BirdNET-Pi/exclude_species_list.txt'; + $str = file_get_contents("$file"); + $str = preg_replace('/^\h*\v+/m', '', $str); + file_put_contents("$file", "$str"); + } + include('scripts/exclude_list.php'); + } if($_POST['view'] == "Species Stats"){ include('stats.php'); if(isset($_POST['species'])){ - $data = [ 'species' => $_POST['species'] ]; - httpPost('/stats.php', $data);} + $data = [ 'species' => $_POST['species'] ]; + httpPost('/stats.php', $data); + } } if($_POST['view'] == "History"){ include('history.php'); @@ -42,40 +97,32 @@ if(isset($_POST['view'])){ echo "
-
"; + + + "; } if($_POST['view'] == "Live Stream"){ - echo "
";} + echo "";} if($_POST['view'] == "Extractions"){ include('play.php'); $data = []; httpPost('/play.php', $data);} - while($_POST['view'] == "Spectrogram"){ - ob_start(); - $time = time(); - echo str_pad("", '4096'); - ob_flush(); - flush(); - sleep($config['RECORDING_LENGTH']); - ob_clean(); - ob_end_clean(); - ob_end_flush();} - if($_POST['view'] == "Settings"){ - if(isset($_POST['submit'])){ - $data = [ - 'latitude' => $_POST["latitude"], - 'longitude' => $_POST["longitude"], - 'birdweather_id' => $_POST["birdweather_id"], - 'pushed_app_key' => $_POST["pushed_app_key"], - 'pushed_app_secret' => $_POST["pushed_app_secret"], - 'language' => $_POST["language"], - 'submit' => $_POST["submit"], - ]; - $url = $_SERVER['HTTP_REFERER']; - httpPost("$url/scripts/update_config.php", $data); - } - include('scripts/config.php'); - } + if($_POST['view'] == "Settings"){ + if(isset($_POST['submit'])){ + $data = [ + 'latitude' => $_POST["latitude"], + 'longitude' => $_POST["longitude"], + 'birdweather_id' => $_POST["birdweather_id"], + 'pushed_app_key' => $_POST["pushed_app_key"], + 'pushed_app_secret' => $_POST["pushed_app_secret"], + 'language' => $_POST["language"], + 'submit' => $_POST["submit"], + ]; + $url = $_SERVER['HTTP_REFERER']; + httpPost("$url/scripts/update_config.php", $data); + } + include('scripts/config.php'); + } if($_POST['view'] == "Advanced"){ if(isset($_POST['submit'])){ $data = [ @@ -100,7 +147,6 @@ if(isset($_POST['view'])){ } include('scripts/advanced.php'); } - if($_POST['view'] == "System"){header('location:phpsysinfo/index.php');} if($_POST['view'] == "Log"){ $url = 'http://birdnetpi.local:8080'; header("location: $url;");} diff --git a/homepage/menu.html b/homepage/menu.html deleted file mode 100644 index 2bfe9fe..0000000 --- a/homepage/menu.html +++ /dev/null @@ -1,92 +0,0 @@ - - - HTML Frames Example - Menu - - - - -
Extractions
-
- - -
-
- - -
- - Processed
- -
- -
System
- - Tools
- - Info
- - Log
- -
- -
External
- - BirdWeather
- - Wiki Help Page
- - Wttr.in Report
- - BirdNET
-
- -
Other
BirdNET-Pis
- - United States
- - South Africa
- - Sweden
- - Germany - - - - - diff --git a/homepage/menu_de.html b/homepage/menu_de.html deleted file mode 100644 index 39c5652..0000000 --- a/homepage/menu_de.html +++ /dev/null @@ -1,80 +0,0 @@ - - - Menu - - - - -
Extraktionen
- - Nach Datum
- - Nach Namen
- - Nach wiss. Namen
- - Verarbeitet
- -
- -
System-Links
- - Tools
- - System Info
- - BirdNET-Lite Log
- - Extraction Log
- -
- -
Externe Links
- - BirdWeather
- - Repository
- - Wiki Hilfe-Seite
- - Wttr.in Report
- - BirdNET @ Cornell
-
- -
Andere
BirdNET-Pis
- - United States
- - South Africa
- - Sweden - - Germany - - - - - diff --git a/homepage/mobile.html b/homepage/mobile.html deleted file mode 100644 index 90986c6..0000000 --- a/homepage/mobile.html +++ /dev/null @@ -1,509 +0,0 @@ - - - - BirdNET-Pi - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

- πŸ•Š BirdNET-Pi -

-
-
-

- - 🐦 Overview - -

-
-

- - 🐦 Today's Top 10 - -

-
-

- - 🐦 View the Database - -

-
-

- - πŸ”Š Live Audio Stream - -

-
-
-
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
-

Extractions

-
- - - By Common Name - -
- - - By Date - -
- - - By Scientific Name - -
- - - Processed - -
-

Tools

-
- - - πŸ—Ž Scripts - -
- - - βš™ Analysis Log - -
- - - ⚝ Extraction Log - -
- - System Information - -
-
- -
- -
-
-
- - - - - diff --git a/homepage/top.html b/homepage/top.html deleted file mode 100644 index c141a28..0000000 --- a/homepage/top.html +++ /dev/null @@ -1,51 +0,0 @@ - - - BirdNET-Pi - - - - - BirdNET-Pi - -

BirdNET-Pi

- -

- Overview | - Database | - Species Stats | - History | - Spectrogram -

- - diff --git a/homepage/top_de.html b/homepage/top_de.html deleted file mode 100644 index 30db041..0000000 --- a/homepage/top_de.html +++ /dev/null @@ -1,51 +0,0 @@ - - - - BirdNET-Pi - - - - - BirdNET-Pi - -

BirdNET-Pi

- -

- Übersicht | - Datenbankansicht | - Tagesansicht | - Spektrogrammansicht -

- - diff --git a/scripts/add_to_exclude.php b/scripts/add_to_exclude.php deleted file mode 100644 index 6922eb2..0000000 --- a/scripts/add_to_exclude.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/scripts/add_to_include.php b/scripts/add_to_include.php deleted file mode 100644 index 4f18653..0000000 --- a/scripts/add_to_include.php +++ /dev/null @@ -1,14 +0,0 @@ - diff --git a/scripts/clear_all_data.sh b/scripts/clear_all_data.sh index 1eba83b..bd44cb5 100755 --- a/scripts/clear_all_data.sh +++ b/scripts/clear_all_data.sh @@ -67,8 +67,6 @@ sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/phpsysinfo.ini ${HOME}/phps sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/green_bootstrap.css ${HOME}/phpsysinfo/templates/ sudo -u ${USER} cp -f $(dirname ${my_dir})/templates/index_bootstrap.html ${HOME}/phpsysinfo/templates/html -echo "Setting Wttr.in URL to "${LATITUDE}", "${LONGITUDE}"" -sudo -u${USER} sed -i "s/https:\/\/v2.wttr.in\//https:\/\/v2.wttr.in\/"${LATITUDE},${LONGITUDE}"/g" $(dirname ${my_dir})/homepage/menu.html sudo chmod -R g+rw $(dirname ${my_dir}) sudo chmod -R g+rw ${RECS_DIR} diff --git a/scripts/del_from_exclude.php b/scripts/del_from_exclude.php deleted file mode 100644 index 5fa7a48..0000000 --- a/scripts/del_from_exclude.php +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/scripts/del_from_include.php b/scripts/del_from_include.php deleted file mode 100644 index 219d88f..0000000 --- a/scripts/del_from_include.php +++ /dev/null @@ -1,22 +0,0 @@ - diff --git a/scripts/exclude_list.php b/scripts/exclude_list.php index 99e20fc..ebf4691 100644 --- a/scripts/exclude_list.php +++ b/scripts/exclude_list.php @@ -1,121 +1,42 @@ and add php start and close tag -//comment these two lines when code started working fine error_reporting(E_ALL); ini_set('display_errors',1); -$filename = 'labels.txt'; -$eachlines = file($filename, FILE_IGNORE_NEW_LINES); +$filename = 'scripts/labels.txt'; +$eachline = file($filename, FILE_IGNORE_NEW_LINES); ?> - -
-
+

All Species Labels

-
- + $lines"; +foreach($eachline as $lines){ + echo ""; }?> +
-
-
-
- -
+
+ -

Excluded Species List

-
- + $lines"; + $filename = '/home/pi/BirdNET-Pi/exclude_species_list.txt'; +$eachline = file($filename, FILE_IGNORE_NEW_LINES); +foreach($eachline as $lines){ + echo ""; }?> +
-
-
diff --git a/scripts/filemanager/filemanager.php b/scripts/filemanager/filemanager.php index 1db4bb8..79e9df1 100644 --- a/scripts/filemanager/filemanager.php +++ b/scripts/filemanager/filemanager.php @@ -3344,7 +3344,7 @@ function fm_show_nav_path($path)