From d6c23073aa4564a987c8ba27e380424f16c7596b Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 31 Mar 2024 15:52:30 +0200 Subject: [PATCH 1/5] Add GPL headers --- App/App_iOS.swift | 17 +++++++++++++++++ App/App_macOS.swift | 17 +++++++++++++++++ App/CompactViewController.swift | 17 +++++++++++++++++ App/SidebarViewController.swift | 17 +++++++++++++++++ App/SplitViewController.swift | 17 +++++++++++++++++ Model/Brand.swift | 17 +++++++++++++++++ Model/CategoriesToLanguage.swift | 17 +++++++++++++++++ Model/DownloadService.swift | 17 +++++++++++++++++ Model/Entities/Entities.swift | 17 +++++++++++++++++ Model/Entities/Errors.swift | 17 +++++++++++++++++ Model/Entities/SearchResult.swift | 17 +++++++++++++++++ Model/LanguagesConverter.swift | 17 +++++++++++++++++ Model/OPDSParser/OPDSParser.swift | 17 +++++++++++++++++ Model/Utilities/AlphaCodesLookUpTable.swift | 17 +++++++++++++++++ Model/Utilities/FeatureFlags.swift | 17 +++++++++++++++++ Model/Utilities/InSync.swift | 17 +++++++++++++++++ Model/Utilities/Log.swift | 17 +++++++++++++++++ Model/Utilities/String+Extension.swift | 17 +++++++++++++++++ Model/Utilities/URL.swift | 17 +++++++++++++++++ Model/Utilities/WebKitHandler.swift | 17 +++++++++++++++++ Model/ZimFileService/ZimFileService.swift | 17 +++++++++++++++++ SwiftUI/Model/Database.swift | 17 +++++++++++++++++ SwiftUI/Model/DefaultKeys.swift | 17 +++++++++++++++++ SwiftUI/Model/DirectoryMonitor.swift | 17 +++++++++++++++++ SwiftUI/Model/Enum.swift | 17 +++++++++++++++++ SwiftUI/Model/Formatter.swift | 17 +++++++++++++++++ SwiftUI/Model/HTMLParser.swift | 17 +++++++++++++++++ SwiftUI/Model/LibraryOperations.swift | 17 +++++++++++++++++ .../Model/SearchOperation/SearchOperation.swift | 17 +++++++++++++++++ SwiftUI/Model/ZimMigration.swift | 17 +++++++++++++++++ SwiftUI/Patches.swift | 17 +++++++++++++++++ Tests/BookmarkMigrationTests.swift | 17 +++++++++++++++++ Tests/LanguagesConverterTests.swift | 17 +++++++++++++++++ Tests/LibraryRefreshViewModelTest.swift | 17 +++++++++++++++++ Tests/NavigationViewModelTest.swift | 17 +++++++++++++++++ Tests/OPDSParserTests.swift | 17 +++++++++++++++++ ViewModel/BrowserViewModel.swift | 17 +++++++++++++++++ ViewModel/LibraryViewModel.swift | 17 +++++++++++++++++ ViewModel/NavigationViewModel.swift | 17 +++++++++++++++++ ViewModel/SearchViewModel.swift | 17 +++++++++++++++++ Views/Bookmarks.swift | 17 +++++++++++++++++ Views/BrowserTab.swift | 17 +++++++++++++++++ Views/BuildingBlocks/ArticleCell.swift | 17 +++++++++++++++++ Views/BuildingBlocks/Attribute.swift | 17 +++++++++++++++++ Views/BuildingBlocks/DownloadTaskCell.swift | 17 +++++++++++++++++ Views/BuildingBlocks/Favicon.swift | 17 +++++++++++++++++ Views/BuildingBlocks/FlavorTag.swift | 17 +++++++++++++++++ Views/BuildingBlocks/GridSection.swift | 17 +++++++++++++++++ .../BuildingBlocks/LibraryLastRefreshTime.swift | 17 +++++++++++++++++ Views/BuildingBlocks/LoadingView.swift | 17 +++++++++++++++++ Views/BuildingBlocks/Message.swift | 17 +++++++++++++++++ Views/BuildingBlocks/SafariView.swift | 17 +++++++++++++++++ Views/BuildingBlocks/SearchResultRow.swift | 17 +++++++++++++++++ Views/BuildingBlocks/SheetContent.swift | 17 +++++++++++++++++ Views/BuildingBlocks/TabLabel.swift | 17 +++++++++++++++++ Views/BuildingBlocks/WebView.swift | 17 +++++++++++++++++ Views/BuildingBlocks/ZimFileCell.swift | 17 +++++++++++++++++ .../ZimFileMissingIndicator.swift | 17 +++++++++++++++++ Views/BuildingBlocks/ZimFileRow.swift | 17 +++++++++++++++++ Views/Buttons/ArticleShortcutButtons.swift | 17 +++++++++++++++++ Views/Buttons/BookmarkButton.swift | 17 +++++++++++++++++ Views/Buttons/NavigationButtons.swift | 17 +++++++++++++++++ Views/Buttons/OutlineButton.swift | 17 +++++++++++++++++ Views/Buttons/TabsManagerButton.swift | 17 +++++++++++++++++ Views/Commands.swift | 17 +++++++++++++++++ Views/Library/Library.swift | 17 +++++++++++++++++ Views/Library/ZimFileDetail.swift | 17 +++++++++++++++++ Views/Library/ZimFilesCategories.swift | 17 +++++++++++++++++ Views/Library/ZimFilesDownloads.swift | 17 +++++++++++++++++ Views/Library/ZimFilesNew.swift | 17 +++++++++++++++++ Views/Library/ZimFilesOpened.swift | 17 +++++++++++++++++ Views/SearchResults.swift | 17 +++++++++++++++++ Views/Settings/About.swift | 17 +++++++++++++++++ Views/Settings/LanguageSelector.swift | 17 +++++++++++++++++ Views/Settings/Settings.swift | 17 +++++++++++++++++ Views/ViewModifiers/AlertHandler.swift | 17 +++++++++++++++++ Views/ViewModifiers/BookmarkContextMenu.swift | 17 +++++++++++++++++ Views/ViewModifiers/CellBackground.swift | 17 +++++++++++++++++ Views/ViewModifiers/ExternalLinkHandler.swift | 17 +++++++++++++++++ Views/ViewModifiers/FileImport.swift | 17 +++++++++++++++++ Views/ViewModifiers/GridCommon.swift | 17 +++++++++++++++++ Views/ViewModifiers/ViewModifiers.swift | 17 +++++++++++++++++ Views/Welcome.swift | 17 +++++++++++++++++ 83 files changed, 1411 insertions(+) diff --git a/App/App_iOS.swift b/App/App_iOS.swift index 45c51bec6..13231a4e4 100644 --- a/App/App_iOS.swift +++ b/App/App_iOS.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // App_iOS.swift // Kiwix // diff --git a/App/App_macOS.swift b/App/App_macOS.swift index d1da5051d..55fa8c6b1 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // App_macOS.swift // Kiwix diff --git a/App/CompactViewController.swift b/App/CompactViewController.swift index b0c55f634..d1c422b28 100644 --- a/App/CompactViewController.swift +++ b/App/CompactViewController.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // CompactViewController.swift // Kiwix diff --git a/App/SidebarViewController.swift b/App/SidebarViewController.swift index af48b16a5..d6f88a2b5 100644 --- a/App/SidebarViewController.swift +++ b/App/SidebarViewController.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SidebarViewController.swift // Kiwix diff --git a/App/SplitViewController.swift b/App/SplitViewController.swift index 7bc005b7e..fa6faa570 100644 --- a/App/SplitViewController.swift +++ b/App/SplitViewController.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SplitViewController.swift // Kiwix diff --git a/Model/Brand.swift b/Model/Brand.swift index 7fafc74f8..f3fbdef07 100644 --- a/Model/Brand.swift +++ b/Model/Brand.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // Copyright © 2023 Kiwix. import Foundation diff --git a/Model/CategoriesToLanguage.swift b/Model/CategoriesToLanguage.swift index d3839dfb2..a80f95a92 100644 --- a/Model/CategoriesToLanguage.swift +++ b/Model/CategoriesToLanguage.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // CategoriesToLanguage.swift // Kiwix diff --git a/Model/DownloadService.swift b/Model/DownloadService.swift index e0eaefbeb..c393f51a4 100644 --- a/Model/DownloadService.swift +++ b/Model/DownloadService.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // DownloadService.swift // Kiwix diff --git a/Model/Entities/Entities.swift b/Model/Entities/Entities.swift index f996504b4..e59d262a1 100644 --- a/Model/Entities/Entities.swift +++ b/Model/Entities/Entities.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Entities.swift // Kiwix diff --git a/Model/Entities/Errors.swift b/Model/Entities/Errors.swift index b600a43fa..c996536c6 100644 --- a/Model/Entities/Errors.swift +++ b/Model/Entities/Errors.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Errors.swift // Kiwix diff --git a/Model/Entities/SearchResult.swift b/Model/Entities/SearchResult.swift index d3505d00c..cf5009e43 100644 --- a/Model/Entities/SearchResult.swift +++ b/Model/Entities/SearchResult.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SearchResult.swift // Kiwix diff --git a/Model/LanguagesConverter.swift b/Model/LanguagesConverter.swift index 9cdec0d24..80dd0c627 100644 --- a/Model/LanguagesConverter.swift +++ b/Model/LanguagesConverter.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Languages.swift // Kiwix diff --git a/Model/OPDSParser/OPDSParser.swift b/Model/OPDSParser/OPDSParser.swift index bea46aa77..4bbb3ab43 100644 --- a/Model/OPDSParser/OPDSParser.swift +++ b/Model/OPDSParser/OPDSParser.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // OPDSParser.swift // Kiwix diff --git a/Model/Utilities/AlphaCodesLookUpTable.swift b/Model/Utilities/AlphaCodesLookUpTable.swift index 205cae4b7..3c5e1a5b9 100644 --- a/Model/Utilities/AlphaCodesLookUpTable.swift +++ b/Model/Utilities/AlphaCodesLookUpTable.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // AlphaCodesLookUpTable.swift // Kiwix diff --git a/Model/Utilities/FeatureFlags.swift b/Model/Utilities/FeatureFlags.swift index 71a2f702a..dfe6c29cb 100644 --- a/Model/Utilities/FeatureFlags.swift +++ b/Model/Utilities/FeatureFlags.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // FeatureFlags.swift // Kiwix diff --git a/Model/Utilities/InSync.swift b/Model/Utilities/InSync.swift index cfef9186f..cf9b369c0 100644 --- a/Model/Utilities/InSync.swift +++ b/Model/Utilities/InSync.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // InSync.swift // Kiwix diff --git a/Model/Utilities/Log.swift b/Model/Utilities/Log.swift index 49e76dc9a..0d1535b96 100644 --- a/Model/Utilities/Log.swift +++ b/Model/Utilities/Log.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Log.swift // Kiwix diff --git a/Model/Utilities/String+Extension.swift b/Model/Utilities/String+Extension.swift index 526e2df6f..2416d8cfd 100644 --- a/Model/Utilities/String+Extension.swift +++ b/Model/Utilities/String+Extension.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // String+Extension.swift // Kiwix diff --git a/Model/Utilities/URL.swift b/Model/Utilities/URL.swift index 1c0337683..81d3d50df 100644 --- a/Model/Utilities/URL.swift +++ b/Model/Utilities/URL.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // URL.swift // Kiwix diff --git a/Model/Utilities/WebKitHandler.swift b/Model/Utilities/WebKitHandler.swift index a431c8b6d..3fa41d3ee 100644 --- a/Model/Utilities/WebKitHandler.swift +++ b/Model/Utilities/WebKitHandler.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // KiwixURLSchemeHandler.swift // Kiwix diff --git a/Model/ZimFileService/ZimFileService.swift b/Model/ZimFileService/ZimFileService.swift index 2f64a10d2..73689326a 100644 --- a/Model/ZimFileService/ZimFileService.swift +++ b/Model/ZimFileService/ZimFileService.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFileService.swift // Kiwix diff --git a/SwiftUI/Model/Database.swift b/SwiftUI/Model/Database.swift index 5414068cb..a2c82ca49 100644 --- a/SwiftUI/Model/Database.swift +++ b/SwiftUI/Model/Database.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Database.swift // Kiwix diff --git a/SwiftUI/Model/DefaultKeys.swift b/SwiftUI/Model/DefaultKeys.swift index 1c02bf50e..5880dc196 100644 --- a/SwiftUI/Model/DefaultKeys.swift +++ b/SwiftUI/Model/DefaultKeys.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // DefaultKeys.swift // Kiwix diff --git a/SwiftUI/Model/DirectoryMonitor.swift b/SwiftUI/Model/DirectoryMonitor.swift index 1b0284c03..ff8276ab9 100644 --- a/SwiftUI/Model/DirectoryMonitor.swift +++ b/SwiftUI/Model/DirectoryMonitor.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + /* Copyright (C) 2015 Apple Inc. All Rights Reserved. See LICENSE.txt for this sample’s licensing information diff --git a/SwiftUI/Model/Enum.swift b/SwiftUI/Model/Enum.swift index 40b3795aa..22442ccae 100644 --- a/SwiftUI/Model/Enum.swift +++ b/SwiftUI/Model/Enum.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Enum.swift // Kiwix diff --git a/SwiftUI/Model/Formatter.swift b/SwiftUI/Model/Formatter.swift index e519d54a5..43ec1938e 100644 --- a/SwiftUI/Model/Formatter.swift +++ b/SwiftUI/Model/Formatter.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Formatter.swift // Kiwix diff --git a/SwiftUI/Model/HTMLParser.swift b/SwiftUI/Model/HTMLParser.swift index 7e536c0af..351b249bc 100644 --- a/SwiftUI/Model/HTMLParser.swift +++ b/SwiftUI/Model/HTMLParser.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // HTMLParser.swift // Kiwix diff --git a/SwiftUI/Model/LibraryOperations.swift b/SwiftUI/Model/LibraryOperations.swift index 0c3cc345f..44e411922 100644 --- a/SwiftUI/Model/LibraryOperations.swift +++ b/SwiftUI/Model/LibraryOperations.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LibraryOperations.swift // Kiwix diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.swift b/SwiftUI/Model/SearchOperation/SearchOperation.swift index b32bea764..948a1e070 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.swift +++ b/SwiftUI/Model/SearchOperation/SearchOperation.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SearchOperation.swift // Kiwix diff --git a/SwiftUI/Model/ZimMigration.swift b/SwiftUI/Model/ZimMigration.swift index 0418ec004..858582df1 100644 --- a/SwiftUI/Model/ZimMigration.swift +++ b/SwiftUI/Model/ZimMigration.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimMigration.swift // Kiwix diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index e12ef4545..510981ad2 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Patches.swift // Kiwix diff --git a/Tests/BookmarkMigrationTests.swift b/Tests/BookmarkMigrationTests.swift index d13a39b5c..febf17771 100644 --- a/Tests/BookmarkMigrationTests.swift +++ b/Tests/BookmarkMigrationTests.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // BookmarkMigrationTests.swift // UnitTests diff --git a/Tests/LanguagesConverterTests.swift b/Tests/LanguagesConverterTests.swift index 949fc1afb..58ed20d8d 100644 --- a/Tests/LanguagesConverterTests.swift +++ b/Tests/LanguagesConverterTests.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LanguagesConverterTests.swift // UnitTests diff --git a/Tests/LibraryRefreshViewModelTest.swift b/Tests/LibraryRefreshViewModelTest.swift index e7172998c..03f6d775e 100644 --- a/Tests/LibraryRefreshViewModelTest.swift +++ b/Tests/LibraryRefreshViewModelTest.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LibraryRefreshViewModelTest.swift // Tests diff --git a/Tests/NavigationViewModelTest.swift b/Tests/NavigationViewModelTest.swift index 6db2815c1..e778240e5 100644 --- a/Tests/NavigationViewModelTest.swift +++ b/Tests/NavigationViewModelTest.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // NavigationViewModelTest.swift // UnitTests diff --git a/Tests/OPDSParserTests.swift b/Tests/OPDSParserTests.swift index 4b2bbcdfd..6df353fda 100644 --- a/Tests/OPDSParserTests.swift +++ b/Tests/OPDSParserTests.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Tests.swift // Tests diff --git a/ViewModel/BrowserViewModel.swift b/ViewModel/BrowserViewModel.swift index ccbaa97ae..3ccdaca4e 100644 --- a/ViewModel/BrowserViewModel.swift +++ b/ViewModel/BrowserViewModel.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // BrowserViewModel.swift // Kiwix diff --git a/ViewModel/LibraryViewModel.swift b/ViewModel/LibraryViewModel.swift index a8a3c72fb..1b929b934 100644 --- a/ViewModel/LibraryViewModel.swift +++ b/ViewModel/LibraryViewModel.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LibraryViewModel.swift // Kiwix diff --git a/ViewModel/NavigationViewModel.swift b/ViewModel/NavigationViewModel.swift index 575ea2260..4969c59a0 100644 --- a/ViewModel/NavigationViewModel.swift +++ b/ViewModel/NavigationViewModel.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // NavigationViewModel.swift // Kiwix diff --git a/ViewModel/SearchViewModel.swift b/ViewModel/SearchViewModel.swift index 58c7e6984..2a06bfe62 100644 --- a/ViewModel/SearchViewModel.swift +++ b/ViewModel/SearchViewModel.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SearchViewModel.swift // Kiwix diff --git a/Views/Bookmarks.swift b/Views/Bookmarks.swift index b6c6638d8..e791d8683 100644 --- a/Views/Bookmarks.swift +++ b/Views/Bookmarks.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Bookmarks.swift // Kiwix diff --git a/Views/BrowserTab.swift b/Views/BrowserTab.swift index d1c01be73..a8307d12d 100644 --- a/Views/BrowserTab.swift +++ b/Views/BrowserTab.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // BrowserTab.swift // Kiwix diff --git a/Views/BuildingBlocks/ArticleCell.swift b/Views/BuildingBlocks/ArticleCell.swift index ba5f75711..6c64b7f18 100644 --- a/Views/BuildingBlocks/ArticleCell.swift +++ b/Views/BuildingBlocks/ArticleCell.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ArticleCell.swift // Kiwix diff --git a/Views/BuildingBlocks/Attribute.swift b/Views/BuildingBlocks/Attribute.swift index 5def4a955..2e9f36f1b 100644 --- a/Views/BuildingBlocks/Attribute.swift +++ b/Views/BuildingBlocks/Attribute.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Attribute.swift // Kiwix diff --git a/Views/BuildingBlocks/DownloadTaskCell.swift b/Views/BuildingBlocks/DownloadTaskCell.swift index beedb767c..962765cd2 100644 --- a/Views/BuildingBlocks/DownloadTaskCell.swift +++ b/Views/BuildingBlocks/DownloadTaskCell.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // DownloadTaskCell.swift // Kiwix diff --git a/Views/BuildingBlocks/Favicon.swift b/Views/BuildingBlocks/Favicon.swift index 36a3538f9..13a4baf20 100644 --- a/Views/BuildingBlocks/Favicon.swift +++ b/Views/BuildingBlocks/Favicon.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Favicon.swift // Kiwix diff --git a/Views/BuildingBlocks/FlavorTag.swift b/Views/BuildingBlocks/FlavorTag.swift index 731ed4574..8e2765211 100644 --- a/Views/BuildingBlocks/FlavorTag.swift +++ b/Views/BuildingBlocks/FlavorTag.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // FlavorTag.swift // Kiwix diff --git a/Views/BuildingBlocks/GridSection.swift b/Views/BuildingBlocks/GridSection.swift index 6dd622d5d..2e18e50ae 100644 --- a/Views/BuildingBlocks/GridSection.swift +++ b/Views/BuildingBlocks/GridSection.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // GridSection.swift // Kiwix diff --git a/Views/BuildingBlocks/LibraryLastRefreshTime.swift b/Views/BuildingBlocks/LibraryLastRefreshTime.swift index 37056dacf..6186e7fb1 100644 --- a/Views/BuildingBlocks/LibraryLastRefreshTime.swift +++ b/Views/BuildingBlocks/LibraryLastRefreshTime.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LibraryLastRefreshTime.swift // Kiwix diff --git a/Views/BuildingBlocks/LoadingView.swift b/Views/BuildingBlocks/LoadingView.swift index ea25cd66f..d470bd4cc 100644 --- a/Views/BuildingBlocks/LoadingView.swift +++ b/Views/BuildingBlocks/LoadingView.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // Copyright © 2023 Kiwix. import SwiftUI diff --git a/Views/BuildingBlocks/Message.swift b/Views/BuildingBlocks/Message.swift index 4992e79de..68deca403 100644 --- a/Views/BuildingBlocks/Message.swift +++ b/Views/BuildingBlocks/Message.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Message.swift // Kiwix for macOS diff --git a/Views/BuildingBlocks/SafariView.swift b/Views/BuildingBlocks/SafariView.swift index fc6f48137..58695109c 100644 --- a/Views/BuildingBlocks/SafariView.swift +++ b/Views/BuildingBlocks/SafariView.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SafariView.swift // Kiwix diff --git a/Views/BuildingBlocks/SearchResultRow.swift b/Views/BuildingBlocks/SearchResultRow.swift index fa43461f7..4b163172e 100644 --- a/Views/BuildingBlocks/SearchResultRow.swift +++ b/Views/BuildingBlocks/SearchResultRow.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SearchResultRow.swift // Kiwix for iOS diff --git a/Views/BuildingBlocks/SheetContent.swift b/Views/BuildingBlocks/SheetContent.swift index 8c01ecc7e..fbb38a97e 100644 --- a/Views/BuildingBlocks/SheetContent.swift +++ b/Views/BuildingBlocks/SheetContent.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SheetContent.swift // Kiwix diff --git a/Views/BuildingBlocks/TabLabel.swift b/Views/BuildingBlocks/TabLabel.swift index 4407e08de..46f591f2c 100644 --- a/Views/BuildingBlocks/TabLabel.swift +++ b/Views/BuildingBlocks/TabLabel.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // TabLabel.swift // Kiwix diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index beef957a0..6e65818f5 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // WebView.swift // Kiwix diff --git a/Views/BuildingBlocks/ZimFileCell.swift b/Views/BuildingBlocks/ZimFileCell.swift index c6fa666b3..d5d5bf77b 100644 --- a/Views/BuildingBlocks/ZimFileCell.swift +++ b/Views/BuildingBlocks/ZimFileCell.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFileCell.swift // Kiwix diff --git a/Views/BuildingBlocks/ZimFileMissingIndicator.swift b/Views/BuildingBlocks/ZimFileMissingIndicator.swift index 5d26a1dce..b94746520 100644 --- a/Views/BuildingBlocks/ZimFileMissingIndicator.swift +++ b/Views/BuildingBlocks/ZimFileMissingIndicator.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFileMissingIndicator.swift // Kiwix diff --git a/Views/BuildingBlocks/ZimFileRow.swift b/Views/BuildingBlocks/ZimFileRow.swift index 89cc27424..d030ec275 100644 --- a/Views/BuildingBlocks/ZimFileRow.swift +++ b/Views/BuildingBlocks/ZimFileRow.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFileRow.swift // Kiwix diff --git a/Views/Buttons/ArticleShortcutButtons.swift b/Views/Buttons/ArticleShortcutButtons.swift index 5c1ce979c..03949874a 100644 --- a/Views/Buttons/ArticleShortcutButtons.swift +++ b/Views/Buttons/ArticleShortcutButtons.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ArticleShortcutButtons.swift // Kiwix diff --git a/Views/Buttons/BookmarkButton.swift b/Views/Buttons/BookmarkButton.swift index 3a568d9ae..6c7e89a6a 100644 --- a/Views/Buttons/BookmarkButton.swift +++ b/Views/Buttons/BookmarkButton.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // BookmarkButton.swift // Kiwix diff --git a/Views/Buttons/NavigationButtons.swift b/Views/Buttons/NavigationButtons.swift index b12efb688..50d0d745b 100644 --- a/Views/Buttons/NavigationButtons.swift +++ b/Views/Buttons/NavigationButtons.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // NavigationButtons.swift // Kiwix diff --git a/Views/Buttons/OutlineButton.swift b/Views/Buttons/OutlineButton.swift index 97efdc248..0de29d946 100644 --- a/Views/Buttons/OutlineButton.swift +++ b/Views/Buttons/OutlineButton.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // OutlineButton.swift // Kiwix diff --git a/Views/Buttons/TabsManagerButton.swift b/Views/Buttons/TabsManagerButton.swift index 3851d6b58..27cbf4761 100644 --- a/Views/Buttons/TabsManagerButton.swift +++ b/Views/Buttons/TabsManagerButton.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // TabsManagerButton.swift // Kiwix diff --git a/Views/Commands.swift b/Views/Commands.swift index 5c04044e0..fc125964a 100644 --- a/Views/Commands.swift +++ b/Views/Commands.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Commands.swift // Kiwix diff --git a/Views/Library/Library.swift b/Views/Library/Library.swift index 548fa01b0..058b37ac0 100644 --- a/Views/Library/Library.swift +++ b/Views/Library/Library.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Library.swift // Kiwix diff --git a/Views/Library/ZimFileDetail.swift b/Views/Library/ZimFileDetail.swift index 3a1695b0e..5b311c0f4 100644 --- a/Views/Library/ZimFileDetail.swift +++ b/Views/Library/ZimFileDetail.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFileDetail.swift // Kiwix diff --git a/Views/Library/ZimFilesCategories.swift b/Views/Library/ZimFilesCategories.swift index 2d92ff70e..49a88f730 100644 --- a/Views/Library/ZimFilesCategories.swift +++ b/Views/Library/ZimFilesCategories.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFilesCategories.swift // Kiwix diff --git a/Views/Library/ZimFilesDownloads.swift b/Views/Library/ZimFilesDownloads.swift index 261eb5599..433f7db77 100644 --- a/Views/Library/ZimFilesDownloads.swift +++ b/Views/Library/ZimFilesDownloads.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFilesDownloads.swift // Kiwix diff --git a/Views/Library/ZimFilesNew.swift b/Views/Library/ZimFilesNew.swift index 0b646e77c..b2daa1eb2 100644 --- a/Views/Library/ZimFilesNew.swift +++ b/Views/Library/ZimFilesNew.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFilesNew.swift // Kiwix diff --git a/Views/Library/ZimFilesOpened.swift b/Views/Library/ZimFilesOpened.swift index 8c5cf6d9e..76a9617c9 100644 --- a/Views/Library/ZimFilesOpened.swift +++ b/Views/Library/ZimFilesOpened.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ZimFilesOpened.swift // Kiwix diff --git a/Views/SearchResults.swift b/Views/SearchResults.swift index b8f1ab62e..5e6b63f84 100644 --- a/Views/SearchResults.swift +++ b/Views/SearchResults.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // SearchResults.swift // Kiwix diff --git a/Views/Settings/About.swift b/Views/Settings/About.swift index 6924e60f8..e58ce98cd 100644 --- a/Views/Settings/About.swift +++ b/Views/Settings/About.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // About.swift // Kiwix diff --git a/Views/Settings/LanguageSelector.swift b/Views/Settings/LanguageSelector.swift index 89038a236..beca9f3e5 100644 --- a/Views/Settings/LanguageSelector.swift +++ b/Views/Settings/LanguageSelector.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // LanguageSelector.swift // Kiwix diff --git a/Views/Settings/Settings.swift b/Views/Settings/Settings.swift index 1bce2878f..6d57a798c 100644 --- a/Views/Settings/Settings.swift +++ b/Views/Settings/Settings.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Settings.swift // Kiwix diff --git a/Views/ViewModifiers/AlertHandler.swift b/Views/ViewModifiers/AlertHandler.swift index ef4278c33..aac33b1e7 100644 --- a/Views/ViewModifiers/AlertHandler.swift +++ b/Views/ViewModifiers/AlertHandler.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // AlertHandler.swift // Kiwix diff --git a/Views/ViewModifiers/BookmarkContextMenu.swift b/Views/ViewModifiers/BookmarkContextMenu.swift index 53a05d9ee..ad2ccdea1 100644 --- a/Views/ViewModifiers/BookmarkContextMenu.swift +++ b/Views/ViewModifiers/BookmarkContextMenu.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // BookmarkContextMenu.swift // Kiwix diff --git a/Views/ViewModifiers/CellBackground.swift b/Views/ViewModifiers/CellBackground.swift index 5380cda66..c2c6da630 100644 --- a/Views/ViewModifiers/CellBackground.swift +++ b/Views/ViewModifiers/CellBackground.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // CellBackground.swift // Kiwix diff --git a/Views/ViewModifiers/ExternalLinkHandler.swift b/Views/ViewModifiers/ExternalLinkHandler.swift index 99c3208f2..64cb1b73d 100644 --- a/Views/ViewModifiers/ExternalLinkHandler.swift +++ b/Views/ViewModifiers/ExternalLinkHandler.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ExternalLinkHandler.swift // Kiwix diff --git a/Views/ViewModifiers/FileImport.swift b/Views/ViewModifiers/FileImport.swift index 64a14a247..8bcabb19a 100644 --- a/Views/ViewModifiers/FileImport.swift +++ b/Views/ViewModifiers/FileImport.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // FileImport.swift // Kiwix diff --git a/Views/ViewModifiers/GridCommon.swift b/Views/ViewModifiers/GridCommon.swift index 4d2507725..cde14a22d 100644 --- a/Views/ViewModifiers/GridCommon.swift +++ b/Views/ViewModifiers/GridCommon.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // GridCommon.swift // Kiwix diff --git a/Views/ViewModifiers/ViewModifiers.swift b/Views/ViewModifiers/ViewModifiers.swift index bd296f61b..e2cc1fb4a 100644 --- a/Views/ViewModifiers/ViewModifiers.swift +++ b/Views/ViewModifiers/ViewModifiers.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // ToolbarRoleBrowser.swift // Kiwix diff --git a/Views/Welcome.swift b/Views/Welcome.swift index 04f6a5142..9f11f0396 100644 --- a/Views/Welcome.swift +++ b/Views/Welcome.swift @@ -1,3 +1,20 @@ +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ + // // Welcome.swift // Kiwix From 21f862d92715f13b6d5e6d5aa6ff75ae00e7b3e0 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 31 Mar 2024 16:09:51 +0200 Subject: [PATCH 2/5] Remove not (GPL) compliant copyright claims --- App/App_iOS.swift | 7 ------ App/App_macOS.swift | 8 ------- App/SidebarViewController.swift | 8 ------- App/SplitViewController.swift | 8 ------- Model/Brand.swift | 2 -- Model/Entities/Entities.swift | 8 ------- Model/Entities/Errors.swift | 8 ------- Model/Entities/SearchResult.h | 23 +++++++++++++------ Model/Entities/SearchResult.m | 23 +++++++++++++------ Model/Entities/SearchResult.swift | 8 ------- .../ZimFileMetaData/ZimFileMetaData.h | 23 +++++++++++++------ .../ZimFileMetaData/ZimFileMetaData.mm | 23 +++++++++++++------ Model/OPDSParser/OPDSParser.h | 23 +++++++++++++------ Model/OPDSParser/OPDSParser.mm | 23 +++++++++++++------ Model/OPDSParser/OPDSParser.swift | 8 ------- Model/Utilities/FeatureFlags.swift | 8 ------- Model/Utilities/Log.swift | 8 ------- Model/Utilities/String+Extension.swift | 8 ------- Model/Utilities/URL.swift | 8 ------- Model/Utilities/WebKitHandler.swift | 8 ------- Model/ZimFileService/ZimFileService.h | 23 +++++++++++++------ Model/ZimFileService/ZimFileService.mm | 23 +++++++++++++------ Model/ZimFileService/ZimFileService.swift | 8 ------- Support/en.lproj/Localizable.strings | 21 ++++++++++++----- SwiftUI/Model/Database.swift | 8 ------- SwiftUI/Model/DefaultKeys.swift | 8 ------- SwiftUI/Model/DirectoryMonitor.swift | 8 ------- SwiftUI/Model/Enum.swift | 8 ------- SwiftUI/Model/Formatter.swift | 8 ------- SwiftUI/Model/HTMLParser.swift | 8 ------- SwiftUI/Model/LibraryOperations.swift | 8 ------- .../Model/SearchOperation/SearchOperation.h | 23 +++++++++++++------ .../Model/SearchOperation/SearchOperation.mm | 23 +++++++++++++------ .../SearchOperation/SearchOperation.swift | 8 ------- SwiftUI/Patches.swift | 8 ------- Tests/LibraryRefreshViewModelTest.swift | 8 ------- Tests/OPDSParserTests.swift | 10 +------- ViewModel/BrowserViewModel.swift | 8 ------- ViewModel/LibraryViewModel.swift | 8 ------- ViewModel/NavigationViewModel.swift | 8 ------- ViewModel/SearchViewModel.swift | 8 ------- Views/Bookmarks.swift | 8 ------- Views/BrowserTab.swift | 8 ------- Views/BuildingBlocks/ArticleCell.swift | 8 ------- Views/BuildingBlocks/Attribute.swift | 8 ------- Views/BuildingBlocks/DownloadTaskCell.swift | 10 +------- Views/BuildingBlocks/Favicon.swift | 8 ------- Views/BuildingBlocks/FlavorTag.swift | 8 ------- Views/BuildingBlocks/GridSection.swift | 8 ------- .../LibraryLastRefreshTime.swift | 8 ------- Views/BuildingBlocks/LoadingView.swift | 2 -- Views/BuildingBlocks/Message.swift | 8 ------- Views/BuildingBlocks/SafariView.swift | 8 ------- Views/BuildingBlocks/SearchResultRow.swift | 8 ------- Views/BuildingBlocks/SheetContent.swift | 8 ------- Views/BuildingBlocks/TabLabel.swift | 8 ------- Views/BuildingBlocks/WebView.swift | 8 ------- Views/BuildingBlocks/ZimFileCell.swift | 8 ------- .../ZimFileMissingIndicator.swift | 8 ------- Views/BuildingBlocks/ZimFileRow.swift | 8 ------- Views/Buttons/ArticleShortcutButtons.swift | 8 ------- Views/Buttons/BookmarkButton.swift | 8 ------- Views/Buttons/NavigationButtons.swift | 8 ------- Views/Buttons/OutlineButton.swift | 8 ------- Views/Buttons/TabsManagerButton.swift | 8 ------- Views/Commands.swift | 8 ------- Views/Library/Library.swift | 8 ------- Views/Library/ZimFileDetail.swift | 8 ------- Views/Library/ZimFilesCategories.swift | 8 ------- Views/Library/ZimFilesDownloads.swift | 8 ------- Views/Library/ZimFilesNew.swift | 8 ------- Views/Library/ZimFilesOpened.swift | 8 ------- Views/SearchResults.swift | 8 ------- Views/Settings/About.swift | 8 ------- Views/Settings/LanguageSelector.swift | 8 ------- Views/Settings/Settings.swift | 8 ------- Views/ViewModifiers/AlertHandler.swift | 8 ------- Views/ViewModifiers/BookmarkContextMenu.swift | 10 +------- Views/ViewModifiers/CellBackground.swift | 8 ------- Views/ViewModifiers/ExternalLinkHandler.swift | 8 ------- Views/ViewModifiers/FileImport.swift | 8 ------- Views/ViewModifiers/GridCommon.swift | 8 ------- Views/ViewModifiers/ViewModifiers.swift | 8 ------- Views/Welcome.swift | 8 ------- 84 files changed, 178 insertions(+), 650 deletions(-) diff --git a/App/App_iOS.swift b/App/App_iOS.swift index 13231a4e4..b5e57fda5 100644 --- a/App/App_iOS.swift +++ b/App/App_iOS.swift @@ -15,13 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// App_iOS.swift -// Kiwix -// -// Created by Chris Li on 7/27/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import UserNotifications diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 55fa8c6b1..97fe37030 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// App_macOS.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import UserNotifications import Combine diff --git a/App/SidebarViewController.swift b/App/SidebarViewController.swift index d6f88a2b5..db300cc73 100644 --- a/App/SidebarViewController.swift +++ b/App/SidebarViewController.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SidebarViewController.swift -// Kiwix -// -// Created by Chris Li on 9/4/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - #if os(iOS) import CoreData import SwiftUI diff --git a/App/SplitViewController.swift b/App/SplitViewController.swift index fa6faa570..f2fd04c09 100644 --- a/App/SplitViewController.swift +++ b/App/SplitViewController.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SplitViewController.swift -// Kiwix -// -// Created by Chris Li on 9/4/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - #if os(iOS) import Combine import SwiftUI diff --git a/Model/Brand.swift b/Model/Brand.swift index f3fbdef07..119cd84b8 100644 --- a/Model/Brand.swift +++ b/Model/Brand.swift @@ -15,8 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// Copyright © 2023 Kiwix. - import Foundation import os diff --git a/Model/Entities/Entities.swift b/Model/Entities/Entities.swift index e59d262a1..6e2da7652 100644 --- a/Model/Entities/Entities.swift +++ b/Model/Entities/Entities.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Entities.swift -// Kiwix -// -// Created by Chris Li on 4/23/22. -// Copyright © 2023 Chris Li. All rights reserved. -// - import Combine import CoreData diff --git a/Model/Entities/Errors.swift b/Model/Entities/Errors.swift index c996536c6..d97898790 100644 --- a/Model/Entities/Errors.swift +++ b/Model/Entities/Errors.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Errors.swift -// Kiwix -// -// Created by Chris Li on 12/30/21. -// Copyright © 2023 Chris Li. All rights reserved. -// - import Foundation public enum LibraryRefreshError: LocalizedError { diff --git a/Model/Entities/SearchResult.h b/Model/Entities/SearchResult.h index 7a2f4d60e..4b1c94e80 100644 --- a/Model/Entities/SearchResult.h +++ b/Model/Entities/SearchResult.h @@ -1,10 +1,19 @@ -// -// SearchResult.h -// Kiwix -// -// Created by Chris Li on 5/9/20. -// Copyright © 2020 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import diff --git a/Model/Entities/SearchResult.m b/Model/Entities/SearchResult.m index 06b06f304..0183524a8 100644 --- a/Model/Entities/SearchResult.m +++ b/Model/Entities/SearchResult.m @@ -1,10 +1,19 @@ -// -// SearchResult.m -// Kiwix -// -// Created by Chris Li on 5/9/20. -// Copyright © 2020 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import "SearchResult.h" diff --git a/Model/Entities/SearchResult.swift b/Model/Entities/SearchResult.swift index cf5009e43..188344bb8 100644 --- a/Model/Entities/SearchResult.swift +++ b/Model/Entities/SearchResult.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SearchResult.swift -// Kiwix -// -// Created by Chris Li on 5/22/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - extension SearchResult: Identifiable { public var id: Int { hashValue } } diff --git a/Model/Entities/ZimFileMetaData/ZimFileMetaData.h b/Model/Entities/ZimFileMetaData/ZimFileMetaData.h index 4483d3794..3d50e9cc8 100644 --- a/Model/Entities/ZimFileMetaData/ZimFileMetaData.h +++ b/Model/Entities/ZimFileMetaData/ZimFileMetaData.h @@ -1,10 +1,19 @@ -// -// ZimFileMetaData.h -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2020 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import diff --git a/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm b/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm index 1a81e7c2e..67500e493 100644 --- a/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm +++ b/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm @@ -1,10 +1,19 @@ -// -// ZimFileMetaData.mm -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2020 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" diff --git a/Model/OPDSParser/OPDSParser.h b/Model/OPDSParser/OPDSParser.h index 28a967a54..8d86a8061 100644 --- a/Model/OPDSParser/OPDSParser.h +++ b/Model/OPDSParser/OPDSParser.h @@ -1,10 +1,19 @@ -// -// OPDSParser.h -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2023 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import #import "ZimFileMetaData.h" diff --git a/Model/OPDSParser/OPDSParser.mm b/Model/OPDSParser/OPDSParser.mm index 6dd3fd73b..613ac9541 100644 --- a/Model/OPDSParser/OPDSParser.mm +++ b/Model/OPDSParser/OPDSParser.mm @@ -1,10 +1,19 @@ -// -// OPDSParser.mm -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2023 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" diff --git a/Model/OPDSParser/OPDSParser.swift b/Model/OPDSParser/OPDSParser.swift index 4bbb3ab43..d4a1d4f35 100644 --- a/Model/OPDSParser/OPDSParser.swift +++ b/Model/OPDSParser/OPDSParser.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// OPDSParser.swift -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2023 Chris Li. All rights reserved. -// - protocol Parser { var zimFileIDs: Set { get } func parse(data: Data) throws diff --git a/Model/Utilities/FeatureFlags.swift b/Model/Utilities/FeatureFlags.swift index dfe6c29cb..aac5d644a 100644 --- a/Model/Utilities/FeatureFlags.swift +++ b/Model/Utilities/FeatureFlags.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// FeatureFlags.swift -// Kiwix -// -// Created by Chris Li on 9/25/20. -// Copyright © 2020 Chris Li. All rights reserved. -// - import Foundation enum FeatureFlags { diff --git a/Model/Utilities/Log.swift b/Model/Utilities/Log.swift index 0d1535b96..cc1e53cda 100644 --- a/Model/Utilities/Log.swift +++ b/Model/Utilities/Log.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Log.swift -// Kiwix -// -// Created by Chris Li on 3/8/20. -// Copyright © 2020 Chris Li. All rights reserved. -// - import os private let subsystem = "org.kiwix.kiwix" diff --git a/Model/Utilities/String+Extension.swift b/Model/Utilities/String+Extension.swift index 2416d8cfd..c90e6bb5b 100644 --- a/Model/Utilities/String+Extension.swift +++ b/Model/Utilities/String+Extension.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// String+Extension.swift -// Kiwix -// -// Created by tvision251 on 11/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import Foundation extension String { diff --git a/Model/Utilities/URL.swift b/Model/Utilities/URL.swift index 81d3d50df..17c95cd2c 100644 --- a/Model/Utilities/URL.swift +++ b/Model/Utilities/URL.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// URL.swift -// Kiwix -// -// Created by Chris Li on 11/6/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - import Foundation extension URL { diff --git a/Model/Utilities/WebKitHandler.swift b/Model/Utilities/WebKitHandler.swift index 3fa41d3ee..ea1f80632 100644 --- a/Model/Utilities/WebKitHandler.swift +++ b/Model/Utilities/WebKitHandler.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// KiwixURLSchemeHandler.swift -// Kiwix -// -// Created by Chris Li on 9/6/17. -// Copyright © 2017 Chris Li. All rights reserved. -// - import os import WebKit diff --git a/Model/ZimFileService/ZimFileService.h b/Model/ZimFileService/ZimFileService.h index 6658c9b68..37efafcf6 100644 --- a/Model/ZimFileService/ZimFileService.h +++ b/Model/ZimFileService/ZimFileService.h @@ -1,10 +1,19 @@ -// -// ZimFileService.h -// Kiwix -// -// Created by Chris Li on 8/17/17. -// Copyright © 2017-2022 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import #import "ZimFileMetaData.h" diff --git a/Model/ZimFileService/ZimFileService.mm b/Model/ZimFileService/ZimFileService.mm index 7d30a801b..43c7fd3d1 100644 --- a/Model/ZimFileService/ZimFileService.mm +++ b/Model/ZimFileService/ZimFileService.mm @@ -1,10 +1,19 @@ -// -// ZimFileService.mm -// Kiwix -// -// Created by Chris Li on 8/17/17. -// Copyright © 2017-2022 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #include diff --git a/Model/ZimFileService/ZimFileService.swift b/Model/ZimFileService/ZimFileService.swift index 73689326a..db79e1529 100644 --- a/Model/ZimFileService/ZimFileService.swift +++ b/Model/ZimFileService/ZimFileService.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFileService.swift -// Kiwix -// -// Created by Chris Li on 8/21/17. -// Copyright © 2017-2022 Chris Li. All rights reserved. -// - /// A service to interact with zim files extension ZimFileService { /// Shared ZimFileService instance diff --git a/Support/en.lproj/Localizable.strings b/Support/en.lproj/Localizable.strings index 6eebbc1ed..4e8df13ab 100644 --- a/Support/en.lproj/Localizable.strings +++ b/Support/en.lproj/Localizable.strings @@ -1,9 +1,18 @@ -/* - Localizable.strings - Kiwix - - Created by tvision251 on 11/13/23. - Copyright © 2023 Chris Li. All rights reserved. +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ /* Library Refresh Error */ diff --git a/SwiftUI/Model/Database.swift b/SwiftUI/Model/Database.swift index a2c82ca49..c9a02d23f 100644 --- a/SwiftUI/Model/Database.swift +++ b/SwiftUI/Model/Database.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Database.swift -// Kiwix -// -// Created by Chris Li on 12/23/21. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import os diff --git a/SwiftUI/Model/DefaultKeys.swift b/SwiftUI/Model/DefaultKeys.swift index 5880dc196..aa7905af0 100644 --- a/SwiftUI/Model/DefaultKeys.swift +++ b/SwiftUI/Model/DefaultKeys.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// DefaultKeys.swift -// Kiwix -// -// Created by Chris Li on 6/16/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import Defaults import Foundation diff --git a/SwiftUI/Model/DirectoryMonitor.swift b/SwiftUI/Model/DirectoryMonitor.swift index ff8276ab9..5dd4f33c0 100644 --- a/SwiftUI/Model/DirectoryMonitor.swift +++ b/SwiftUI/Model/DirectoryMonitor.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -/* -Copyright (C) 2015 Apple Inc. All Rights Reserved. -See LICENSE.txt for this sample’s licensing information - -Abstract: -`DirectoryMonitor` is used to monitor the contents of the provided directory by using a GCD dispatch source. -*/ - import Foundation protocol DirectoryMonitorDelegate: AnyObject { diff --git a/SwiftUI/Model/Enum.swift b/SwiftUI/Model/Enum.swift index 22442ccae..886c6058b 100644 --- a/SwiftUI/Model/Enum.swift +++ b/SwiftUI/Model/Enum.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Enum.swift -// Kiwix -// -// Created by Chris Li on 12/25/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - import CoreData import MapKit diff --git a/SwiftUI/Model/Formatter.swift b/SwiftUI/Model/Formatter.swift index 43ec1938e..6cd1be026 100644 --- a/SwiftUI/Model/Formatter.swift +++ b/SwiftUI/Model/Formatter.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Formatter.swift -// Kiwix -// -// Created by Chris Li on 6/28/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import Foundation enum Formatter { diff --git a/SwiftUI/Model/HTMLParser.swift b/SwiftUI/Model/HTMLParser.swift index 351b249bc..91fe1f561 100644 --- a/SwiftUI/Model/HTMLParser.swift +++ b/SwiftUI/Model/HTMLParser.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// HTMLParser.swift -// Kiwix -// -// Created by Chris Li on 1/1/20. -// Copyright © 2020 Chris Li. All rights reserved. -// - import CoreLocation import NaturalLanguage #if os(macOS) diff --git a/SwiftUI/Model/LibraryOperations.swift b/SwiftUI/Model/LibraryOperations.swift index 44e411922..cb410b9d6 100644 --- a/SwiftUI/Model/LibraryOperations.swift +++ b/SwiftUI/Model/LibraryOperations.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// LibraryOperations.swift -// Kiwix -// -// Created by Chris Li on 9/12/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - #if canImport(BackgroundTasks) import BackgroundTasks #endif diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.h b/SwiftUI/Model/SearchOperation/SearchOperation.h index b7ef2ed56..b59ecc781 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.h +++ b/SwiftUI/Model/SearchOperation/SearchOperation.h @@ -1,10 +1,19 @@ -// -// SearchOperation.h -// Kiwix -// -// Created by Chris Li on 5/9/20. -// Copyright © 2020-2022 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #import diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.mm b/SwiftUI/Model/SearchOperation/SearchOperation.mm index 0b3c016dd..119b84070 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.mm +++ b/SwiftUI/Model/SearchOperation/SearchOperation.mm @@ -1,10 +1,19 @@ -// -// SearchOperation.mm -// Kiwix -// -// Created by Chris Li on 5/9/20. -// Copyright © 2020-2022 Chris Li. All rights reserved. -// +/* + * This file is part of Kiwix for iOS & macOS. + * + * Kiwix is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License as published by + * the Free Software Foundation; either version 3 of the License, or + * any later version. + * + * Kiwix is distributed in the hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * You should have received a copy of the GNU General Public License + * along with Kiwix; If not, see https://www.gnu.org/licenses/. +*/ #include diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.swift b/SwiftUI/Model/SearchOperation/SearchOperation.swift index 948a1e070..49a9a01da 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.swift +++ b/SwiftUI/Model/SearchOperation/SearchOperation.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SearchOperation.swift -// Kiwix -// -// Created by Chris Li on 5/9/20. -// Copyright © 2020-2022 Chris Li. All rights reserved. -// - import Defaults extension SearchOperation { diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index 510981ad2..54f73182e 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Patches.swift -// Kiwix -// -// Created by Chris Li on 6/11/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import Foundation import SwiftUI import UniformTypeIdentifiers diff --git a/Tests/LibraryRefreshViewModelTest.swift b/Tests/LibraryRefreshViewModelTest.swift index 03f6d775e..f2ffb9cba 100644 --- a/Tests/LibraryRefreshViewModelTest.swift +++ b/Tests/LibraryRefreshViewModelTest.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// LibraryRefreshViewModelTest.swift -// Tests -// -// Created by Chris Li on 1/16/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import CoreData import XCTest diff --git a/Tests/OPDSParserTests.swift b/Tests/OPDSParserTests.swift index 6df353fda..51f5e6b47 100644 --- a/Tests/OPDSParserTests.swift +++ b/Tests/OPDSParserTests.swift @@ -15,18 +15,10 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Tests.swift -// Tests -// -// Created by Chris Li on 1/15/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import XCTest @testable import Kiwix -final class OPDSParserTests: XCTestCase { +final class OPDSParserTests: XCTestCase { /// Test OPDSParser.parse throws error when OPDS data is invalid. func testInvalidOPDSData() { XCTExpectFailure("Requires work in dependency to resolve the issue.") diff --git a/ViewModel/BrowserViewModel.swift b/ViewModel/BrowserViewModel.swift index 3ccdaca4e..c659d7fb8 100644 --- a/ViewModel/BrowserViewModel.swift +++ b/ViewModel/BrowserViewModel.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// BrowserViewModel.swift -// Kiwix -// -// Created by Chris Li on 6/21/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import Combine import CoreData import CoreLocation diff --git a/ViewModel/LibraryViewModel.swift b/ViewModel/LibraryViewModel.swift index 1b929b934..219853d8d 100644 --- a/ViewModel/LibraryViewModel.swift +++ b/ViewModel/LibraryViewModel.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// LibraryViewModel.swift -// Kiwix -// -// Created by Chris Li on 5/22/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import os diff --git a/ViewModel/NavigationViewModel.swift b/ViewModel/NavigationViewModel.swift index 4969c59a0..f79fa42c4 100644 --- a/ViewModel/NavigationViewModel.swift +++ b/ViewModel/NavigationViewModel.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// NavigationViewModel.swift -// Kiwix -// -// Created by Chris Li on 7/29/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import CoreData import WebKit diff --git a/ViewModel/SearchViewModel.swift b/ViewModel/SearchViewModel.swift index 2a06bfe62..7a70f9779 100644 --- a/ViewModel/SearchViewModel.swift +++ b/ViewModel/SearchViewModel.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SearchViewModel.swift -// Kiwix -// -// Created by Chris Li on 5/30/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import Combine import CoreData diff --git a/Views/Bookmarks.swift b/Views/Bookmarks.swift index e791d8683..326c6be82 100644 --- a/Views/Bookmarks.swift +++ b/Views/Bookmarks.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Bookmarks.swift -// Kiwix -// -// Created by Chris Li on 5/28/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct Bookmarks: View { diff --git a/Views/BrowserTab.swift b/Views/BrowserTab.swift index a8307d12d..89ad65222 100644 --- a/Views/BrowserTab.swift +++ b/Views/BrowserTab.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// BrowserTab.swift -// Kiwix -// -// Created by Chris Li on 8/24/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct BrowserTab: View { diff --git a/Views/BuildingBlocks/ArticleCell.swift b/Views/BuildingBlocks/ArticleCell.swift index 6c64b7f18..ffe5af4bd 100644 --- a/Views/BuildingBlocks/ArticleCell.swift +++ b/Views/BuildingBlocks/ArticleCell.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ArticleCell.swift -// Kiwix -// -// Created by Chris Li on 6/3/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI /// A rounded rect cell displaying preview of an article. diff --git a/Views/BuildingBlocks/Attribute.swift b/Views/BuildingBlocks/Attribute.swift index 2e9f36f1b..39109d788 100644 --- a/Views/BuildingBlocks/Attribute.swift +++ b/Views/BuildingBlocks/Attribute.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Attribute.swift -// Kiwix -// -// Created by Chris Li on 10/21/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct Attribute: View { diff --git a/Views/BuildingBlocks/DownloadTaskCell.swift b/Views/BuildingBlocks/DownloadTaskCell.swift index 962765cd2..69c0aa2df 100644 --- a/Views/BuildingBlocks/DownloadTaskCell.swift +++ b/Views/BuildingBlocks/DownloadTaskCell.swift @@ -1,5 +1,5 @@ /* - * This file is part of Kiwix for iOS & macOS. +65;6800;1c * This file is part of Kiwix for iOS & macOS. * * Kiwix is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// DownloadTaskCell.swift -// Kiwix -// -// Created by Chris Li on 6/9/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import SwiftUI diff --git a/Views/BuildingBlocks/Favicon.swift b/Views/BuildingBlocks/Favicon.swift index 13a4baf20..c9eca63cf 100644 --- a/Views/BuildingBlocks/Favicon.swift +++ b/Views/BuildingBlocks/Favicon.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Favicon.swift -// Kiwix -// -// Created by Chris Li on 1/2/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct Favicon: View { diff --git a/Views/BuildingBlocks/FlavorTag.swift b/Views/BuildingBlocks/FlavorTag.swift index 8e2765211..7480cef74 100644 --- a/Views/BuildingBlocks/FlavorTag.swift +++ b/Views/BuildingBlocks/FlavorTag.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// FlavorTag.swift -// Kiwix -// -// Created by Chris Li on 12/31/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - import SwiftUI struct FlavorTag: View { diff --git a/Views/BuildingBlocks/GridSection.swift b/Views/BuildingBlocks/GridSection.swift index 2e18e50ae..ddcf01526 100644 --- a/Views/BuildingBlocks/GridSection.swift +++ b/Views/BuildingBlocks/GridSection.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// GridSection.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct GridSection: View { diff --git a/Views/BuildingBlocks/LibraryLastRefreshTime.swift b/Views/BuildingBlocks/LibraryLastRefreshTime.swift index 6186e7fb1..855349190 100644 --- a/Views/BuildingBlocks/LibraryLastRefreshTime.swift +++ b/Views/BuildingBlocks/LibraryLastRefreshTime.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// LibraryLastRefreshTime.swift -// Kiwix -// -// Created by Chris Li on 7/12/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/BuildingBlocks/LoadingView.swift b/Views/BuildingBlocks/LoadingView.swift index d470bd4cc..6403b113f 100644 --- a/Views/BuildingBlocks/LoadingView.swift +++ b/Views/BuildingBlocks/LoadingView.swift @@ -15,8 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// Copyright © 2023 Kiwix. - import SwiftUI struct LoadingView: View { diff --git a/Views/BuildingBlocks/Message.swift b/Views/BuildingBlocks/Message.swift index 68deca403..66183b037 100644 --- a/Views/BuildingBlocks/Message.swift +++ b/Views/BuildingBlocks/Message.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Message.swift -// Kiwix for macOS -// -// Created by Chris Li on 2/12/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct Message: View { diff --git a/Views/BuildingBlocks/SafariView.swift b/Views/BuildingBlocks/SafariView.swift index 58695109c..55c4acaf1 100644 --- a/Views/BuildingBlocks/SafariView.swift +++ b/Views/BuildingBlocks/SafariView.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SafariView.swift -// Kiwix -// -// Created by Chris Li on 8/14/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SafariServices import SwiftUI diff --git a/Views/BuildingBlocks/SearchResultRow.swift b/Views/BuildingBlocks/SearchResultRow.swift index 4b163172e..3532d13cf 100644 --- a/Views/BuildingBlocks/SearchResultRow.swift +++ b/Views/BuildingBlocks/SearchResultRow.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SearchResultRow.swift -// Kiwix for iOS -// -// Created by Chris Li on 6/3/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct SearchResultRow: View { diff --git a/Views/BuildingBlocks/SheetContent.swift b/Views/BuildingBlocks/SheetContent.swift index fbb38a97e..805207ac1 100644 --- a/Views/BuildingBlocks/SheetContent.swift +++ b/Views/BuildingBlocks/SheetContent.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SheetContent.swift -// Kiwix -// -// Created by Chris Li on 7/6/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct SheetContent: View { diff --git a/Views/BuildingBlocks/TabLabel.swift b/Views/BuildingBlocks/TabLabel.swift index 46f591f2c..9c965dbc1 100644 --- a/Views/BuildingBlocks/TabLabel.swift +++ b/Views/BuildingBlocks/TabLabel.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// TabLabel.swift -// Kiwix -// -// Created by Chris Li on 7/29/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI #if os(iOS) diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index 6e65818f5..3770611f9 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// WebView.swift -// Kiwix -// -// Created by Chris Li on 11/5/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - import Combine import CoreData import SwiftUI diff --git a/Views/BuildingBlocks/ZimFileCell.swift b/Views/BuildingBlocks/ZimFileCell.swift index d5d5bf77b..5cc8f0c2a 100644 --- a/Views/BuildingBlocks/ZimFileCell.swift +++ b/Views/BuildingBlocks/ZimFileCell.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFileCell.swift -// Kiwix -// -// Created by Chris Li on 12/31/21. -// Copyright © 2021 Chris Li. All rights reserved. -// - import CoreData import SwiftUI diff --git a/Views/BuildingBlocks/ZimFileMissingIndicator.swift b/Views/BuildingBlocks/ZimFileMissingIndicator.swift index b94746520..2bd2b387d 100644 --- a/Views/BuildingBlocks/ZimFileMissingIndicator.swift +++ b/Views/BuildingBlocks/ZimFileMissingIndicator.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFileMissingIndicator.swift -// Kiwix -// -// Created by Chris Li on 7/17/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct ZimFileMissingIndicator: View { diff --git a/Views/BuildingBlocks/ZimFileRow.swift b/Views/BuildingBlocks/ZimFileRow.swift index d030ec275..03a011e0c 100644 --- a/Views/BuildingBlocks/ZimFileRow.swift +++ b/Views/BuildingBlocks/ZimFileRow.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFileRow.swift -// Kiwix -// -// Created by Chris Li on 5/13/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import SwiftUI diff --git a/Views/Buttons/ArticleShortcutButtons.swift b/Views/Buttons/ArticleShortcutButtons.swift index 03949874a..b0da9df8b 100644 --- a/Views/Buttons/ArticleShortcutButtons.swift +++ b/Views/Buttons/ArticleShortcutButtons.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ArticleShortcutButtons.swift -// Kiwix -// -// Created by Chris Li on 9/3/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct ArticleShortcutButtons: View { diff --git a/Views/Buttons/BookmarkButton.swift b/Views/Buttons/BookmarkButton.swift index 6c7e89a6a..5e86029b1 100644 --- a/Views/Buttons/BookmarkButton.swift +++ b/Views/Buttons/BookmarkButton.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// BookmarkButton.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct BookmarkButton: View { diff --git a/Views/Buttons/NavigationButtons.swift b/Views/Buttons/NavigationButtons.swift index 50d0d745b..fa621b34e 100644 --- a/Views/Buttons/NavigationButtons.swift +++ b/Views/Buttons/NavigationButtons.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// NavigationButtons.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct NavigationButtons: View { diff --git a/Views/Buttons/OutlineButton.swift b/Views/Buttons/OutlineButton.swift index 0de29d946..d37841f1c 100644 --- a/Views/Buttons/OutlineButton.swift +++ b/Views/Buttons/OutlineButton.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// OutlineButton.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import SwiftUIBackports diff --git a/Views/Buttons/TabsManagerButton.swift b/Views/Buttons/TabsManagerButton.swift index 27cbf4761..19c3f8be3 100644 --- a/Views/Buttons/TabsManagerButton.swift +++ b/Views/Buttons/TabsManagerButton.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// TabsManagerButton.swift -// Kiwix -// -// Created by Chris Li on 9/1/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI #if os(iOS) diff --git a/Views/Commands.swift b/Views/Commands.swift index fc125964a..57c99e04e 100644 --- a/Views/Commands.swift +++ b/Views/Commands.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Commands.swift -// Kiwix -// -// Created by Chris Li on 8/17/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/Library/Library.swift b/Views/Library/Library.swift index 058b37ac0..51ff6b811 100644 --- a/Views/Library/Library.swift +++ b/Views/Library/Library.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Library.swift -// Kiwix -// -// Created by Chris Li on 4/23/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import UniformTypeIdentifiers import Defaults diff --git a/Views/Library/ZimFileDetail.swift b/Views/Library/ZimFileDetail.swift index 5b311c0f4..bd295637b 100644 --- a/Views/Library/ZimFileDetail.swift +++ b/Views/Library/ZimFileDetail.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFileDetail.swift -// Kiwix -// -// Created by Chris Li on 4/30/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import SwiftUI import UniformTypeIdentifiers diff --git a/Views/Library/ZimFilesCategories.swift b/Views/Library/ZimFilesCategories.swift index 49a88f730..f58014df3 100644 --- a/Views/Library/ZimFilesCategories.swift +++ b/Views/Library/ZimFilesCategories.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFilesCategories.swift -// Kiwix -// -// Created by Chris Li on 8/7/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/Library/ZimFilesDownloads.swift b/Views/Library/ZimFilesDownloads.swift index 433f7db77..7d53069b3 100644 --- a/Views/Library/ZimFilesDownloads.swift +++ b/Views/Library/ZimFilesDownloads.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFilesDownloads.swift -// Kiwix -// -// Created by Chris Li on 4/30/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import SwiftUI diff --git a/Views/Library/ZimFilesNew.swift b/Views/Library/ZimFilesNew.swift index b2daa1eb2..69f713280 100644 --- a/Views/Library/ZimFilesNew.swift +++ b/Views/Library/ZimFilesNew.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFilesNew.swift -// Kiwix -// -// Created by Chris Li on 4/24/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/Library/ZimFilesOpened.swift b/Views/Library/ZimFilesOpened.swift index 76a9617c9..4bd738ba3 100644 --- a/Views/Library/ZimFilesOpened.swift +++ b/Views/Library/ZimFilesOpened.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ZimFilesOpened.swift -// Kiwix -// -// Created by Chris Li on 5/15/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import UniformTypeIdentifiers diff --git a/Views/SearchResults.swift b/Views/SearchResults.swift index 5e6b63f84..3a47456a1 100644 --- a/Views/SearchResults.swift +++ b/Views/SearchResults.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// SearchResults.swift -// Kiwix -// -// Created by Chris Li on 8/19/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/Settings/About.swift b/Views/Settings/About.swift index e58ce98cd..daef45576 100644 --- a/Views/Settings/About.swift +++ b/Views/Settings/About.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// About.swift -// Kiwix -// -// Created by Chris Li on 6/10/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import CoreKiwix diff --git a/Views/Settings/LanguageSelector.swift b/Views/Settings/LanguageSelector.swift index beca9f3e5..b1c27933e 100644 --- a/Views/Settings/LanguageSelector.swift +++ b/Views/Settings/LanguageSelector.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// LanguageSelector.swift -// Kiwix -// -// Created by Chris Li on 7/10/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import CoreData import SwiftUI diff --git a/Views/Settings/Settings.swift b/Views/Settings/Settings.swift index 6d57a798c..9db162c41 100644 --- a/Views/Settings/Settings.swift +++ b/Views/Settings/Settings.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Settings.swift -// Kiwix -// -// Created by Chris Li on 10/1/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/ViewModifiers/AlertHandler.swift b/Views/ViewModifiers/AlertHandler.swift index aac33b1e7..947bf1e86 100644 --- a/Views/ViewModifiers/AlertHandler.swift +++ b/Views/ViewModifiers/AlertHandler.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// AlertHandler.swift -// Kiwix -// -// Created by Chris Li on 8/14/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct AlertHandler: ViewModifier { diff --git a/Views/ViewModifiers/BookmarkContextMenu.swift b/Views/ViewModifiers/BookmarkContextMenu.swift index ad2ccdea1..d2f7bd837 100644 --- a/Views/ViewModifiers/BookmarkContextMenu.swift +++ b/Views/ViewModifiers/BookmarkContextMenu.swift @@ -1,5 +1,5 @@ /* - * This file is part of Kiwix for iOS & macOS. +65;6800;1c * This file is part of Kiwix for iOS & macOS. * * Kiwix is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License as published by @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// BookmarkContextMenu.swift -// Kiwix -// -// Created by Chris Li on 9/17/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct BookmarkContextMenu: ViewModifier { diff --git a/Views/ViewModifiers/CellBackground.swift b/Views/ViewModifiers/CellBackground.swift index c2c6da630..9a1d66d4b 100644 --- a/Views/ViewModifiers/CellBackground.swift +++ b/Views/ViewModifiers/CellBackground.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// CellBackground.swift -// Kiwix -// -// Created by Chris Li on 6/4/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct CellBackground: ViewModifier { diff --git a/Views/ViewModifiers/ExternalLinkHandler.swift b/Views/ViewModifiers/ExternalLinkHandler.swift index 64cb1b73d..54f4d0e02 100644 --- a/Views/ViewModifiers/ExternalLinkHandler.swift +++ b/Views/ViewModifiers/ExternalLinkHandler.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ExternalLinkHandler.swift -// Kiwix -// -// Created by Chris Li on 8/13/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import Defaults diff --git a/Views/ViewModifiers/FileImport.swift b/Views/ViewModifiers/FileImport.swift index 8bcabb19a..965d5e718 100644 --- a/Views/ViewModifiers/FileImport.swift +++ b/Views/ViewModifiers/FileImport.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// FileImport.swift -// Kiwix -// -// Created by Chris Li on 8/18/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI import UniformTypeIdentifiers diff --git a/Views/ViewModifiers/GridCommon.swift b/Views/ViewModifiers/GridCommon.swift index cde14a22d..f8470a375 100644 --- a/Views/ViewModifiers/GridCommon.swift +++ b/Views/ViewModifiers/GridCommon.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// GridCommon.swift -// Kiwix -// -// Created by Chris Li on 5/22/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI /// Add padding around the modified view. On iOS, the padding is adjusted so that the modified view align with the search bar. diff --git a/Views/ViewModifiers/ViewModifiers.swift b/Views/ViewModifiers/ViewModifiers.swift index e2cc1fb4a..9b5c1d578 100644 --- a/Views/ViewModifiers/ViewModifiers.swift +++ b/Views/ViewModifiers/ViewModifiers.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// ToolbarRoleBrowser.swift -// Kiwix -// -// Created by Chris Li on 9/1/23. -// Copyright © 2023 Chris Li. All rights reserved. -// - import SwiftUI struct MarkAsHalfSheet: ViewModifier { diff --git a/Views/Welcome.swift b/Views/Welcome.swift index 9f11f0396..0157fa04a 100644 --- a/Views/Welcome.swift +++ b/Views/Welcome.swift @@ -15,14 +15,6 @@ * along with Kiwix; If not, see https://www.gnu.org/licenses/. */ -// -// Welcome.swift -// Kiwix -// -// Created by Chris Li on 6/4/22. -// Copyright © 2022 Chris Li. All rights reserved. -// - import SwiftUI struct Welcome: View { From f40b838ec976028837b0d748cd7d56173b169a90 Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 31 Mar 2024 16:12:42 +0200 Subject: [PATCH 3/5] Remove empty characters at end of lines --- App/App_iOS.swift | 12 ++-- App/App_macOS.swift | 4 +- App/SidebarViewController.swift | 40 +++++------ App/SplitViewController.swift | 18 ++--- Model/CategoriesToLanguage.swift | 8 +-- Model/DownloadService.swift | 66 +++++++++---------- Model/Entities/Entities.swift | 40 +++++------ Model/OPDSParser/OPDSParser.swift | 4 +- Model/Utilities/String+Extension.swift | 4 +- Model/Utilities/WebKitHandler.swift | 6 +- Model/ZimFileService/ZimFileService.swift | 30 ++++----- SwiftUI/Model/Database.swift | 18 ++--- SwiftUI/Model/DefaultKeys.swift | 2 +- SwiftUI/Model/DirectoryMonitor.swift | 34 +++++----- SwiftUI/Model/Enum.swift | 34 +++++----- SwiftUI/Model/Formatter.swift | 10 +-- SwiftUI/Model/HTMLParser.swift | 24 +++---- SwiftUI/Model/LibraryOperations.swift | 40 +++++------ .../SearchOperation/SearchOperation.swift | 14 ++-- SwiftUI/Patches.swift | 4 +- Tests/LibraryRefreshViewModelTest.swift | 28 ++++---- Tests/OPDSParserTests.swift | 12 ++-- ViewModel/BrowserViewModel.swift | 18 ++--- ViewModel/LibraryViewModel.swift | 18 ++--- ViewModel/NavigationViewModel.swift | 10 +-- ViewModel/SearchViewModel.swift | 16 ++--- Views/Bookmarks.swift | 6 +- Views/BrowserTab.swift | 2 +- Views/BuildingBlocks/ArticleCell.swift | 10 +-- Views/BuildingBlocks/Attribute.swift | 4 +- Views/BuildingBlocks/DownloadTaskCell.swift | 8 +-- Views/BuildingBlocks/Favicon.swift | 8 +-- Views/BuildingBlocks/FlavorTag.swift | 8 +-- Views/BuildingBlocks/GridSection.swift | 4 +- .../LibraryLastRefreshTime.swift | 2 +- Views/BuildingBlocks/Message.swift | 2 +- Views/BuildingBlocks/SafariView.swift | 2 +- Views/BuildingBlocks/SearchResultRow.swift | 4 +- Views/BuildingBlocks/SheetContent.swift | 4 +- Views/BuildingBlocks/TabLabel.swift | 2 +- Views/BuildingBlocks/WebView.swift | 24 +++---- Views/BuildingBlocks/ZimFileCell.swift | 14 ++-- Views/BuildingBlocks/ZimFileRow.swift | 10 +-- Views/Buttons/ArticleShortcutButtons.swift | 8 +-- Views/Buttons/BookmarkButton.swift | 4 +- Views/Buttons/NavigationButtons.swift | 6 +- Views/Buttons/OutlineButton.swift | 4 +- Views/Buttons/TabsManagerButton.swift | 6 +- Views/Commands.swift | 14 ++-- Views/Library/Library.swift | 12 ++-- Views/Library/ZimFileDetail.swift | 40 +++++------ Views/Library/ZimFilesCategories.swift | 18 ++--- Views/Library/ZimFilesDownloads.swift | 2 +- Views/Library/ZimFilesNew.swift | 4 +- Views/SearchResults.swift | 14 ++-- Views/Settings/About.swift | 22 +++---- Views/Settings/LanguageSelector.swift | 12 ++-- Views/Settings/Settings.swift | 22 +++---- Views/ViewModifiers/AlertHandler.swift | 4 +- Views/ViewModifiers/BookmarkContextMenu.swift | 4 +- Views/ViewModifiers/CellBackground.swift | 6 +- Views/ViewModifiers/ExternalLinkHandler.swift | 10 +-- Views/ViewModifiers/FileImport.swift | 20 +++--- Views/ViewModifiers/GridCommon.swift | 6 +- Views/Welcome.swift | 6 +- 65 files changed, 436 insertions(+), 436 deletions(-) diff --git a/App/App_iOS.swift b/App/App_iOS.swift index b5e57fda5..8829cd6c8 100644 --- a/App/App_iOS.swift +++ b/App/App_iOS.swift @@ -25,7 +25,7 @@ struct Kiwix: App { @StateObject private var library = LibraryViewModel() @StateObject private var navigation = NavigationViewModel() @UIApplicationDelegateAdaptor(AppDelegate.self) private var appDelegate - + private let fileMonitor: DirectoryMonitor init() { @@ -33,7 +33,7 @@ struct Kiwix: App { LibraryOperations.registerBackgroundTask() UNUserNotificationCenter.current().delegate = appDelegate } - + var body: some Scene { WindowGroup { RootView() @@ -84,7 +84,7 @@ struct Kiwix: App { } } } - + private class AppDelegate: NSObject, UIApplicationDelegate, UNUserNotificationCenterDelegate { /// Storing background download completion handler sent to application delegate func application(_ application: UIApplication, @@ -103,7 +103,7 @@ struct Kiwix: App { } completionHandler() } - + /// Purge some cached browser view models when receiving memory warning func applicationDidReceiveMemoryWarning(_ application: UIApplication) { BrowserViewModel.purgeCache() @@ -113,11 +113,11 @@ struct Kiwix: App { private struct RootView: UIViewControllerRepresentable { @EnvironmentObject private var navigation: NavigationViewModel - + func makeUIViewController(context: Context) -> SplitViewController { SplitViewController(navigationViewModel: navigation) } - + func updateUIViewController(_ controller: SplitViewController, context: Context) { } } diff --git a/App/App_macOS.swift b/App/App_macOS.swift index 97fe37030..ed4a56e84 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -37,7 +37,7 @@ struct Kiwix: App { init() { UNUserNotificationCenter.current().delegate = notificationCenterDelegate } - + var body: some Scene { WindowGroup { RootView() @@ -98,7 +98,7 @@ struct RootView: View { @Environment(\.controlActiveState) var controlActiveState @StateObject private var browser = BrowserViewModel() @StateObject private var navigation = NavigationViewModel() - + private let primaryItems: [NavigationItem] = [.reading, .bookmarks] private let libraryItems: [NavigationItem] = [.opened, .categories, .downloads, .new] private let openURL = NotificationCenter.default.publisher(for: .openURL) diff --git a/App/SidebarViewController.swift b/App/SidebarViewController.swift index db300cc73..8dd95f6c8 100644 --- a/App/SidebarViewController.swift +++ b/App/SidebarViewController.swift @@ -46,7 +46,7 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl sectionNameKeyPath: nil, cacheName: nil ) - + enum Section: String, CaseIterable { case primary case tabs @@ -61,7 +61,7 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl } } } - + init() { super.init(collectionViewLayout: UICollectionViewLayout()) collectionView.collectionViewLayout = UICollectionViewCompositionalLayout { sectionIndex, layoutEnvironment in @@ -74,11 +74,11 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl return section } } - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + func updateSelection() { guard let splitViewController = splitViewController as? SplitViewController, let currentItem = splitViewController.navigationViewModel.currentItem, @@ -86,13 +86,13 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl collectionView.indexPathsForSelectedItems?.first != indexPath else { return } collectionView.selectItem(at: indexPath, animated: true, scrollPosition: []) } - + // MARK: - Lifecycle - + override func viewDidLoad() { super.viewDidLoad() fetchedResultController.delegate = self - + // configure view navigationItem.title = Brand.appName navigationItem.rightBarButtonItem = UIBarButtonItem( @@ -121,7 +121,7 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl } ]) ) - + // apply initial snapshot var snapshot = NSDiffableDataSourceSnapshot() snapshot.appendSections(Section.allSections) @@ -133,19 +133,19 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl dataSource.apply(snapshot, animatingDifferences: false) try? fetchedResultController.performFetch() } - + override func viewWillAppear(_ animated: Bool) { super.viewWillAppear(animated) navigationController?.navigationBar.prefersLargeTitles = true } - + override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) updateSelection() } - + // MARK: - Delegations - + nonisolated func controller( _ controller: NSFetchedResultsController, didChangeContentWith snapshot: NSDiffableDataSourceSnapshotReference @@ -174,7 +174,7 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl } } } - + override func collectionView(_ collectionView: UICollectionView, didSelectItemAt indexPath: IndexPath) { guard let splitViewController = splitViewController as? SplitViewController, let navigationItem = dataSource.itemIdentifier(for: indexPath) else { return } @@ -183,13 +183,13 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl splitViewController.hide(.primary) } } - + override func collectionView(_ collectionView: UICollectionView, canFocusItemAt indexPath: IndexPath) -> Bool { return false } - + // MARK: - Collection View Configuration - + private func configureCell(cell: UICollectionViewListCell, indexPath: IndexPath, item: NavigationItem) { if case let .tab(objectID) = item, let tab = try? Database.viewContext.existingObject(with: objectID) as? Tab { if #available(iOS 16.0, *) { @@ -209,9 +209,9 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl config.image = UIImage(systemName: item.icon) cell.contentConfiguration = config } - + } - + private func configureHeader(headerView: UICollectionViewListCell, elementKind: String, indexPath: IndexPath) { let section = Section.allSections[indexPath.section] switch section { @@ -227,12 +227,12 @@ class SidebarViewController: UICollectionViewController, NSFetchedResultsControl headerView.contentConfiguration = nil } } - + private func configureSwipeAction(indexPath: IndexPath) -> UISwipeActionsConfiguration? { guard let splitViewController = splitViewController as? SplitViewController, let item = dataSource.itemIdentifier(for: indexPath), case let .tab(tabID) = item else { return nil } - let action = UIContextualAction(style: .destructive, + let action = UIContextualAction(style: .destructive, title: "sidebar_view.navigation.button.close".localized) { _, _, _ in splitViewController.navigationViewModel.deleteTab(tabID: tabID) } diff --git a/App/SplitViewController.swift b/App/SplitViewController.swift index f2fd04c09..ac61984ba 100644 --- a/App/SplitViewController.swift +++ b/App/SplitViewController.swift @@ -25,28 +25,28 @@ final class SplitViewController: UISplitViewController { private var navigationItemObserver: AnyCancellable? private var openURLObserver: NSObjectProtocol? private var toggleSidebarObserver: NSObjectProtocol? - + init(navigationViewModel: NavigationViewModel) { self.navigationViewModel = navigationViewModel super.init(style: .doubleColumn) } - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + deinit { NotificationCenter.default.removeObserver(self) } - + // MARK: - Lifecycle - + override func viewDidLoad() { super.viewDidLoad() if #available(iOS 16.0, *) {} else { presentsWithGesture = false } - + // setup controllers setViewController(UINavigationController(rootViewController: CompactViewController()), for: .compact) setViewController(SidebarViewController(), for: .primary) @@ -88,7 +88,7 @@ final class SplitViewController: UISplitViewController { } } } - + /// Dismiss any controller that is already presented when horizontal size class is about to change override func willTransition(to newCollection: UITraitCollection, with coordinator: UIViewControllerTransitionCoordinator) { @@ -96,7 +96,7 @@ final class SplitViewController: UISplitViewController { guard newCollection.horizontalSizeClass != traitCollection.horizontalSizeClass else { return } presentedViewController?.dismiss(animated: false) } - + override func traitCollectionDidChange(_ previousTraitCollection: UITraitCollection?) { super.traitCollectionDidChange(previousTraitCollection) guard previousTraitCollection?.horizontalSizeClass != traitCollection.horizontalSizeClass else { return } @@ -106,7 +106,7 @@ final class SplitViewController: UISplitViewController { setSecondaryController() } } - + private func setSecondaryController() { switch navigationViewModel.currentItem { case .bookmarks: diff --git a/Model/CategoriesToLanguage.swift b/Model/CategoriesToLanguage.swift index a80f95a92..242c5d887 100644 --- a/Model/CategoriesToLanguage.swift +++ b/Model/CategoriesToLanguage.swift @@ -24,9 +24,9 @@ import Foundation import Defaults struct CategoriesToLanguages { - + private let dictionary: [Category: Set] = Defaults[.categoriesToLanguages] - + func has(category: Category, inLanguages langCodes: Set) -> Bool { guard !langCodes.isEmpty, !dictionary.isEmpty else { return true // no languages or category filters provided, do not filter @@ -36,11 +36,11 @@ struct CategoriesToLanguages { } return !languages.isDisjoint(with: langCodes) } - + static func save(_ dictionary: [Category: Set]) { Defaults[.categoriesToLanguages] = dictionary } - + static func allCategories() -> [Category] { let categoriesToLanguages = CategoriesToLanguages() let contentLanguages = Defaults[.libraryLanguageCodes] diff --git a/Model/DownloadService.swift b/Model/DownloadService.swift index c393f51a4..74659eb8b 100644 --- a/Model/DownloadService.swift +++ b/Model/DownloadService.swift @@ -50,7 +50,7 @@ private final class DownloadProgress { final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegate, URLSessionDownloadDelegate { static let shared = DownloadService() - + private let queue = DispatchQueue(label: "downloads") private let progress = DownloadProgress() @MainActor private var heartbeat: Timer? @@ -64,9 +64,9 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat operationQueue.underlyingQueue = queue return URLSession(configuration: configuration, delegate: self, delegateQueue: operationQueue) }() - + // MARK: - Heartbeat - + /// Restart heartbeat if there are unfinished download task func restartHeartbeatIfNeeded() { session.getTasksWithCompletionHandler { _, _, downloadTasks in @@ -79,7 +79,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat self.startHeartbeat() } } - + /// Start heartbeat, which will update database every 0.25 second private func startHeartbeat() { DispatchQueue.main.async { @@ -101,7 +101,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat os_log("Heartbeat started.", log: Log.DownloadService, type: .info) } } - + /// Stop heartbeat, which stops periodical database update private func stopHeartbeat() { DispatchQueue.main.async { @@ -111,9 +111,9 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat os_log("Heartbeat stopped.", log: Log.DownloadService, type: .info) } } - + // MARK: - Download Actions - + /// Start a zim file download task /// - Parameters: /// - zimFile: the zim file to download @@ -131,7 +131,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat downloadTask.totalBytes = zimFile.size downloadTask.zimFile = zimFile try? context.save() - + if url.lastPathComponent.hasSuffix(".meta4") { url = url.deletingPathExtension() } @@ -144,7 +144,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat } startHeartbeat() } - + /// Cancel a zim file download task /// - Parameter zimFileID: identifier of the zim file func cancel(zimFileID: UUID) { @@ -155,7 +155,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat self.deleteDownloadTask(zimFileID: zimFileID) } } - + /// Pause a zim file download task /// - Parameter zimFileID: identifier of the zim file func pause(zimFileID: UUID) { @@ -172,32 +172,32 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat } } } - + /// Resume a zim file download task and start heartbeat /// - Parameter zimFileID: identifier of the zim file func resume(zimFileID: UUID) { requestNotificationAuthorization() Database.shared.container.performBackgroundTask { context in context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump - + let request = DownloadTask.fetchRequest(fileID: zimFileID) guard let downloadTask = try? context.fetch(request).first, let resumeData = downloadTask.resumeData else { return } - + let task = self.session.downloadTask(withResumeData: resumeData) task.taskDescription = zimFileID.uuidString task.resume() - + downloadTask.error = nil downloadTask.resumeData = nil try? context.save() - + self.startHeartbeat() } } - + // MARK: - Database - + private func deleteDownloadTask(zimFileID: UUID) { Database.shared.container.performBackgroundTask { context in context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump @@ -216,13 +216,13 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat } } } - + // MARK: - Notification - + private func requestNotificationAuthorization() { UNUserNotificationCenter.current().requestAuthorization(options: [.alert, .sound]) { _, _ in } } - + private func scheduleDownloadCompleteNotification(zimFileID: UUID) { let center = UNUserNotificationCenter.current() center.getNotificationSettings { settings in @@ -235,16 +235,16 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat if let zimFile = try? context.fetch(ZimFile.fetchRequest(fileID: zimFileID)).first { content.body = "download_service.complete.description".localizedWithFormat(withArgs: zimFile.name) } - + // schedule notification let request = UNNotificationRequest(identifier: zimFileID.uuidString, content: content, trigger: nil) center.add(request) } } } - + // MARK: - URLSessionTaskDelegate - + func urlSession(_ session: URLSession, task: URLSessionTask, didCompleteWithError error: Error?) { guard let taskDescription = task.taskDescription, let zimFileID = UUID(uuidString: taskDescription) else { return } @@ -252,7 +252,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat if progress.isEmpty() { stopHeartbeat() } - + // download finished successfully if there's no error guard let error = error as NSError? else { self.deleteDownloadTask(zimFileID: zimFileID) @@ -264,7 +264,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat ) return } - + /* Save the error description and resume data if there are new resule data Note: The result data equality check is used as a trick to distinguish user pausing the download task vs @@ -288,9 +288,9 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat error.localizedDescription ) } - + // MARK: - URLSessionDownloadDelegate - + func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didWriteData bytesWritten: Int64, @@ -300,7 +300,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat let zimFileID = UUID(uuidString: taskDescription) else { return } progress.updateFor(uuid: zimFileID, totalBytes: totalBytesWritten) } - + func urlSession(_ session: URLSession, downloadTask: URLSessionDownloadTask, didFinishDownloadingTo location: URL) { @@ -310,7 +310,7 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat #elseif os(iOS) let searchPath = FileManager.SearchPathDirectory.documentDirectory #endif - + // move file guard let directory = FileManager.default.urls(for: searchPath, in: .userDomainMask).first, let zimFileID = UUID(uuidString: downloadTask.taskDescription ?? "") else {return} @@ -319,16 +319,16 @@ final class DownloadService: NSObject, URLSessionDelegate, URLSessionTaskDelegat ?? zimFileID.uuidString + ".zim" let destination = directory.appendingPathComponent(fileName) try? FileManager.default.moveItem(at: location, to: destination) - + // open the file LibraryOperations.open(url: destination) - + // schedule notification scheduleDownloadCompleteNotification(zimFileID: zimFileID) } - + // MARK: - URLSessionDelegate - + func urlSessionDidFinishEvents(forBackgroundURLSession session: URLSession) { DispatchQueue.main.async { self.backgroundCompletionHandler?() diff --git a/Model/Entities/Entities.swift b/Model/Entities/Entities.swift index 6e2da7652..5beeb368e 100644 --- a/Model/Entities/Entities.swift +++ b/Model/Entities/Entities.swift @@ -20,15 +20,15 @@ import CoreData class Bookmark: NSManagedObject, Identifiable { var id: URL { articleURL } - + @NSManaged var articleURL: URL @NSManaged var thumbImageURL: URL? @NSManaged var title: String @NSManaged var snippet: String? @NSManaged var created: Date - + @NSManaged var zimFile: ZimFile? - + class func fetchRequest( predicate: NSPredicate? = nil, sortDescriptors: [NSSortDescriptor] = [] ) -> NSFetchRequest { @@ -48,15 +48,15 @@ class DownloadTask: NSManagedObject, Identifiable { @NSManaged var fileID: UUID @NSManaged var resumeData: Data? @NSManaged var totalBytes: Int64 - + @NSManaged var zimFile: ZimFile? - + class func fetchRequest(predicate: NSPredicate? = nil) -> NSFetchRequest { let request = super.fetchRequest() as! NSFetchRequest request.predicate = predicate return request } - + class func fetchRequest(fileID: UUID) -> NSFetchRequest { let request = super.fetchRequest() as! NSFetchRequest request.predicate = NSPredicate(format: "fileID == %@", fileID as CVarArg) @@ -69,7 +69,7 @@ struct Language: Identifiable, Comparable { let code: String let name: String let count: Int - + init?(code: String, count: Int) { let langCode = Locale.canonicalIdentifier(from: code) guard let name = Locale.current.localizedString(forLanguageCode: langCode) else { return nil } @@ -77,7 +77,7 @@ struct Language: Identifiable, Comparable { self.name = name self.count = count } - + static func < (lhs: Language, rhs: Language) -> Bool { switch lhs.name.caseInsensitiveCompare(rhs.name) { case .orderedAscending: @@ -96,20 +96,20 @@ class OutlineItem: ObservableObject, Identifiable { let text: String let level: Int private(set) var children: [OutlineItem]? - + @Published var isExpanded = true - + init(id: String, index: Int, text: String, level: Int) { self.id = id self.index = index self.text = text self.level = level } - + convenience init(index: Int, text: String, level: Int) { self.init(id: String(index), index: index, text: text, level: level) } - + func addChild(_ item: OutlineItem) { if children != nil { children?.append(item) @@ -117,7 +117,7 @@ class OutlineItem: ObservableObject, Identifiable { children = [item] } } - + @discardableResult func removeAllChildren() -> [OutlineItem] { defer { children = nil } @@ -130,9 +130,9 @@ class Tab: NSManagedObject, Identifiable { @NSManaged var interactionState: Data? @NSManaged var lastOpened: Date @NSManaged var title: String? - + @NSManaged var zimFile: ZimFile? - + class func fetchRequest( predicate: NSPredicate? = nil, sortDescriptors: [NSSortDescriptor] = [] ) -> NSFetchRequest { @@ -141,7 +141,7 @@ class Tab: NSManagedObject, Identifiable { request.sortDescriptors = sortDescriptors return request } - + class func fetchRequest(id: UUID) -> NSFetchRequest { let request = super.fetchRequest() as! NSFetchRequest request.predicate = NSPredicate(format: "id == %@", id as CVarArg) @@ -167,7 +167,7 @@ struct URLContent { final class ZimFile: NSManagedObject, Identifiable { var id: UUID { fileID } - + @NSManaged var articleCount: Int64 @NSManaged var category: String @NSManaged var created: Date @@ -190,7 +190,7 @@ final class ZimFile: NSManagedObject, Identifiable { @NSManaged var persistentID: String @NSManaged var requiresServiceWorkers: Bool @NSManaged var size: Int64 - + @NSManaged var bookmarks: Set @NSManaged var downloadTask: DownloadTask? @NSManaged var tabs: Set @@ -212,7 +212,7 @@ final class ZimFile: NSManagedObject, Identifiable { Predicate.isDownloaded, Predicate.notMissing ]) - + class func fetchRequest( predicate: NSPredicate? = nil, sortDescriptors: [NSSortDescriptor] = [] ) -> NSFetchRequest { @@ -221,7 +221,7 @@ final class ZimFile: NSManagedObject, Identifiable { request.sortDescriptors = sortDescriptors return request } - + class func fetchRequest(fileID: UUID) -> NSFetchRequest { let request = super.fetchRequest() as! NSFetchRequest request.predicate = NSPredicate(format: "fileID == %@", fileID as CVarArg) diff --git a/Model/OPDSParser/OPDSParser.swift b/Model/OPDSParser/OPDSParser.swift index d4a1d4f35..f55015651 100644 --- a/Model/OPDSParser/OPDSParser.swift +++ b/Model/OPDSParser/OPDSParser.swift @@ -25,13 +25,13 @@ extension OPDSParser: Parser { var zimFileIDs: Set { __getZimFileIDs() as? Set ?? Set() } - + func parse(data: Data) throws { if !self.__parseData(data) { throw LibraryRefreshError.parse } } - + func getMetaData(id: UUID) -> ZimFileMetaData? { return __getZimFileMetaData(id) } diff --git a/Model/Utilities/String+Extension.swift b/Model/Utilities/String+Extension.swift index c90e6bb5b..0e65b75dd 100644 --- a/Model/Utilities/String+Extension.swift +++ b/Model/Utilities/String+Extension.swift @@ -22,11 +22,11 @@ extension String { var localized: String { localizedWithFallback() } - + func localizedWith(comment: String) -> String { localizedWithFallback(comment: comment) } - + func localizedWithFormat(withArgs: CVarArg...) -> String { let format = localizedWithFallback() switch withArgs.count { diff --git a/Model/Utilities/WebKitHandler.swift b/Model/Utilities/WebKitHandler.swift index ea1f80632..7ef5282bc 100644 --- a/Model/Utilities/WebKitHandler.swift +++ b/Model/Utilities/WebKitHandler.swift @@ -19,11 +19,11 @@ import os import WebKit /// Skipping handling for HTTP 206 Partial Content -/// For video playback, WebKit makes a large amount of requests with small byte range (e.g. 8 bytes) +/// For video playback, WebKit makes a large amount of requests with small byte range (e.g. 8 bytes) /// to retrieve content of the video. /// As a result of the large volume of small requests, CPU usage will be very high, /// which can result in app or webpage frozen. -/// To mitigate, opting for the less "broken" behavior of ignoring Range header +/// To mitigate, opting for the less "broken" behavior of ignoring Range header /// until WebKit behavior is changed. final class KiwixURLSchemeHandler: NSObject, WKURLSchemeHandler { static let KiwixScheme = "kiwix" @@ -75,7 +75,7 @@ final class KiwixURLSchemeHandler: NSObject, WKURLSchemeHandler { self?.stopFor(hash) } } - + func webView(_ webView: WKWebView, stop urlSchemeTask: WKURLSchemeTask) { stopFor(urlSchemeTask.hash) } diff --git a/Model/ZimFileService/ZimFileService.swift b/Model/ZimFileService/ZimFileService.swift index db79e1529..35272ae5f 100644 --- a/Model/ZimFileService/ZimFileService.swift +++ b/Model/ZimFileService/ZimFileService.swift @@ -19,12 +19,12 @@ extension ZimFileService { /// Shared ZimFileService instance static let shared = ZimFileService.__sharedInstance() - + /// IDs of currently opened zim files private var fileIDs: [UUID] { get { return __getReaderIdentifiers().compactMap({ $0 as? UUID }) } } // MARK: - Reader Management - + /// Open a zim file from system file URL bookmark data /// - Parameter bookmark: url bookmark data of the zim file to open /// - Returns: new url bookmark data if the one used to open the zim file is stale @@ -43,21 +43,21 @@ extension ZimFileService { throw ZimFileOpenError.missing } #endif - + __open(url) return isStale ? ZimFileService.getFileURLBookmarkData(for: url) : nil } - + /// Close a zim file /// - Parameter fileID: ID of the zim file to close func close(fileID: UUID) { __close(fileID) } - + // MARK: - Metadata static func getMetaData(url: URL) -> ZimFileMetaData? { __getMetaData(withFileURL: url) } - + // MARK: - URL System Bookmark /// System URL bookmark for the ZIM file itself @@ -79,44 +79,44 @@ extension ZimFileService { return try? url.bookmarkData(options: .minimalBookmark) #endif } - + // MARK: - URL Retrieve - + func getFileURL(zimFileID: UUID) -> URL? { return __getFileURL(zimFileID) } - + func getRedirectedURL(url: URL) -> URL? { guard let zimFileID = url.host, let zimFileID = UUID(uuidString: zimFileID), let redirectedPath = __getRedirectedPath(zimFileID, contentPath: url.path) else { return nil } return URL(zimFileID: zimFileID.uuidString, contentPath: redirectedPath) } - + func getMainPageURL(zimFileID: UUID? = nil) -> URL? { guard let zimFileID = zimFileID ?? fileIDs.randomElement(), let path = __getMainPagePath(zimFileID) else { return nil } return URL(zimFileID: zimFileID.uuidString, contentPath: path) } - + func getRandomPageURL(zimFileID: UUID? = nil) -> URL? { guard let zimFileID = zimFileID ?? fileIDs.randomElement(), let path = __getRandomPagePath(zimFileID) else { return nil } return URL(zimFileID: zimFileID.uuidString, contentPath: path) } - + // MARK: - URL Response - + func getURLContent(url: URL) -> URLContent? { guard let zimFileID = url.host else { return nil } return getURLContent(zimFileID: zimFileID, contentPath: url.path) } - + func getURLContent(url: URL, start: UInt, end: UInt) -> URLContent? { guard let zimFileID = url.host else { return nil } return getURLContent(zimFileID: zimFileID, contentPath: url.path, start: start, end: end) } - + func getURLContent(zimFileID: String, contentPath: String, start: UInt = 0, end: UInt = 0) -> URLContent? { guard let zimFileID = UUID(uuidString: zimFileID), let content = __getContent(zimFileID, contentPath: contentPath, start: start, end: end), diff --git a/SwiftUI/Model/Database.swift b/SwiftUI/Model/Database.swift index c9a02d23f..bbc4c5ccc 100644 --- a/SwiftUI/Model/Database.swift +++ b/SwiftUI/Model/Database.swift @@ -23,7 +23,7 @@ final class Database { private var notificationToken: NSObjectProtocol? private var token: NSPersistentHistoryToken? private var tokenURL = NSPersistentContainer.defaultDirectoryURL().appendingPathComponent("token.data") - + private init() { // due to objc++ interop, only the older notification value is working for downloads: // https://developer.apple.com/documentation/coredata/nspersistentstoreremotechangenotification?language=objc @@ -37,21 +37,21 @@ final class Database { return try? NSKeyedUnarchiver.unarchivedObject(ofClass: NSPersistentHistoryToken.self, from: data) }() } - + deinit { if let token = notificationToken { NotificationCenter.default.removeObserver(token) } } - + static var viewContext: NSManagedObjectContext { Database.shared.container.viewContext } - + static func performBackgroundTask(_ block: @escaping (NSManagedObjectContext) -> Void) { Database.shared.container.performBackgroundTask(block) } - + static func performBackgroundTask(_ block: @escaping (NSManagedObjectContext) throws -> T) async rethrows -> T { try await Database.shared.container.performBackgroundTask(block) } @@ -87,7 +87,7 @@ final class Database { container.viewContext.shouldDeleteInaccessibleFaults = true return container }() - + /// Save image data to zim files. func saveImageData(url: URL, completion: @escaping (Data) -> Void) { URLSession.shared.dataTask(with: url) { data, response, _ in @@ -107,7 +107,7 @@ final class Database { completion(data) }.resume() } - + /// Merge changes performed on batch requests to view context. private func mergeChanges() throws { let context = container.newBackgroundContext() @@ -132,12 +132,12 @@ final class Database { self.token = transaction.token } } - + // update token guard let token = transactions.last?.token else { return } let data = try? NSKeyedArchiver.archivedData(withRootObject: token, requiringSecureCoding: true) UserDefaults.standard.set(data, forKey: "PersistentHistoryToken") - + // purge history let sevenDaysAgo = Date(timeIntervalSinceNow: -3600 * 24 * 7) let purgeRequest = NSPersistentHistoryChangeRequest.deleteHistory(before: sevenDaysAgo) diff --git a/SwiftUI/Model/DefaultKeys.swift b/SwiftUI/Model/DefaultKeys.swift index aa7905af0..a1fa1e1e0 100644 --- a/SwiftUI/Model/DefaultKeys.swift +++ b/SwiftUI/Model/DefaultKeys.swift @@ -43,7 +43,7 @@ extension Defaults.Keys { static let libraryAutoRefresh = Key("libraryAutoRefresh", default: true) static let libraryUsingOldISOLangCodes = Key("libraryUsingOldISOLangCodes", default: true) static let libraryLastRefresh = Key("libraryLastRefresh") - + static let isFirstLaunch = Key("isFirstLaunch", default: true) static let downloadUsingCellular = Key("downloadUsingCellular", default: false) static let backupDocumentDirectory = Key("backupDocumentDirectory", default: false) diff --git a/SwiftUI/Model/DirectoryMonitor.swift b/SwiftUI/Model/DirectoryMonitor.swift index 5dd4f33c0..f7e98159b 100644 --- a/SwiftUI/Model/DirectoryMonitor.swift +++ b/SwiftUI/Model/DirectoryMonitor.swift @@ -25,7 +25,7 @@ class DirectoryMonitor { weak var delegate: DirectoryMonitorDelegate? private let url: URL private let onChange: ((URL) -> Void)? - + private var descriptor: CInt = -1 private var source: DispatchSourceFileSystemObject? private let queue = DispatchQueue(label: "org.kiwix.directorymonitor", attributes: DispatchQueue.Attributes.concurrent) @@ -34,15 +34,15 @@ class DirectoryMonitor { self.url = url self.onChange = onChange } - + // MARK: Monitoring - + func start() { guard source == nil && descriptor == -1 else {return} - + descriptor = open(url.path, O_EVTONLY) source = DispatchSource.makeFileSystemObjectSource(fileDescriptor: descriptor, eventMask: .write, queue: queue) - + source?.setEventHandler(handler: { self.directoryContentDidChange() }) @@ -53,29 +53,29 @@ class DirectoryMonitor { }) source?.resume() } - + func stop() { guard let source = source else {return} source.cancel() } - + // MARK: - Custom Methods - + private var isCheckingChanges = false private var previousDirectoryHash: [String]? = nil private var currentDirectoryHash: [String]? = nil private var hashEqualCheck = 0 - + private func directoryContentDidChange() { hashEqualCheck = 0 if isCheckingChanges == false { checkDirectoryChanges() } } - + private func checkDirectoryChanges() { isCheckingChanges = true - + previousDirectoryHash = currentDirectoryHash currentDirectoryHash = directoryHashes() if let previousDirectoryHash = previousDirectoryHash, let currentDirectoryHash = currentDirectoryHash { @@ -98,22 +98,22 @@ class DirectoryMonitor { checkDirectoryChanges() } } - + private func directoryDidReachStasis() { DispatchQueue.main.asyncAfter(deadline: DispatchTime.now() + Double(Int64(NSEC_PER_SEC/10)) / Double(NSEC_PER_SEC) , execute: { () -> Void in self.delegate?.directoryContentDidChange(url: self.url) self.onChange?(self.url) }) } - + private func waitAndCheckAgain() { queue.asyncAfter(deadline: DispatchTime.now() + Double(Int64(NSEC_PER_SEC/2)) / Double(NSEC_PER_SEC) , execute: { () -> Void in self.checkDirectoryChanges() }) } - + // MARK: - Generate directory file info array - + private func directoryHashes() -> [String] { var hashes = [String]() do { @@ -128,7 +128,7 @@ class DirectoryMonitor { } return hashes } - + private func fileHash(_ fileName: String) -> String? { if let fileSize = fileSize(fileName) { return fileName + "_\(fileSize)" @@ -136,7 +136,7 @@ class DirectoryMonitor { return nil } } - + private func fileSize(_ fileName: String) -> Int64? { let path = self.url.appendingPathComponent(fileName).path if FileManager.default.fileExists(atPath: path) { diff --git a/SwiftUI/Model/Enum.swift b/SwiftUI/Model/Enum.swift index 886c6058b..3b4755232 100644 --- a/SwiftUI/Model/Enum.swift +++ b/SwiftUI/Model/Enum.swift @@ -22,13 +22,13 @@ import Defaults enum ActiveAlert: String, Identifiable { var id: String { rawValue } - + case articleFailedToLoad } enum ActiveSheet: Hashable, Identifiable { var id: Int { hashValue } - + case outline case bookmarks case library(tabItem: LibraryTabItem? = nil) @@ -41,7 +41,7 @@ enum Category: String, CaseIterable, Identifiable, LosslessStringConvertible { var description: String { rawValue } var id: String { rawValue } - + case wikipedia case wikibooks case wikinews @@ -91,7 +91,7 @@ enum Category: String, CaseIterable, Identifiable, LosslessStringConvertible { return "enum.category.other".localized } } - + var icon: String { switch self { case .wikipedia: @@ -124,9 +124,9 @@ enum Category: String, CaseIterable, Identifiable, LosslessStringConvertible { enum ExternalLinkLoadingPolicy: String, CaseIterable, Identifiable, Defaults.Serializable { case alwaysAsk, alwaysLoad, neverLoad - + var id: String { self.rawValue } - + var name: String { switch self { case .alwaysAsk: @@ -150,11 +150,11 @@ enum Flavor: String, CustomStringConvertible { case max = "maxi" case noPic = "nopic" case mini = "mini" - + init?(rawValue: String?) { self.init(rawValue: rawValue ?? "") } - + var description: String { switch self { case .max: @@ -169,9 +169,9 @@ enum Flavor: String, CustomStringConvertible { enum LibraryLanguageSortingMode: String, CaseIterable, Identifiable, Defaults.Serializable { case alphabetically, byCounts - + var id: String { self.rawValue } - + var name: String { switch self { case .alphabetically: @@ -184,9 +184,9 @@ enum LibraryLanguageSortingMode: String, CaseIterable, Identifiable, Defaults.Se enum LibraryTabItem: String, CaseIterable, Identifiable { case opened, categories, downloads, new - + var id: String { self.rawValue } - + var name: String { switch self { case .opened: @@ -199,7 +199,7 @@ enum LibraryTabItem: String, CaseIterable, Identifiable { return "enum.libray_tab_item.new".localized } } - + var icon: String { switch self { case .opened: @@ -246,7 +246,7 @@ enum NavigationItem: Hashable, Identifiable { return "enum.navigation_item.settings".localized } } - + var icon: String { switch self { case .loading: @@ -275,9 +275,9 @@ enum NavigationItem: Hashable, Identifiable { enum SearchResultSnippetMode: String, CaseIterable, Identifiable, Defaults.Serializable { case disabled, firstParagraph, firstSentence, matches - + var id: String { rawValue } - + var name: String { switch self { case .disabled: @@ -294,6 +294,6 @@ enum SearchResultSnippetMode: String, CaseIterable, Identifiable, Defaults.Seria enum SheetDisplayMode: String, Identifiable { case outline, bookmarks, library, settings - + var id: String { rawValue } } diff --git a/SwiftUI/Model/Formatter.swift b/SwiftUI/Model/Formatter.swift index 6cd1be026..d671dd456 100644 --- a/SwiftUI/Model/Formatter.swift +++ b/SwiftUI/Model/Formatter.swift @@ -24,32 +24,32 @@ enum Formatter { formatter.timeStyle = .none return formatter }() - + static let dateMedium: DateFormatter = { let formatter = DateFormatter() formatter.dateStyle = .medium formatter.timeStyle = .none return formatter }() - + static let size: ByteCountFormatter = { let formatter = ByteCountFormatter() formatter.countStyle = .file return formatter }() - + static let number: NumberFormatter = { let formatter = NumberFormatter() formatter.numberStyle = .decimal return formatter }() - + static let percent: NumberFormatter = { let formatter = NumberFormatter() formatter.numberStyle = .percent return formatter }() - + static func largeNumber(_ value: Int64) -> String { let sign = ((value < 0) ? "-" : "" ) let abs = Swift.abs(value) diff --git a/SwiftUI/Model/HTMLParser.swift b/SwiftUI/Model/HTMLParser.swift index 91fe1f561..7696af0f2 100644 --- a/SwiftUI/Model/HTMLParser.swift +++ b/SwiftUI/Model/HTMLParser.swift @@ -27,32 +27,32 @@ import Fuzi class HTMLParser { private let document: HTMLDocument - + #if os(macOS) static private let boldFont = NSFont.systemFont(ofSize: 12.0, weight: .medium) #elseif os(iOS) static private let boldFont = UIFont.systemFont(ofSize: 12.0, weight: .medium) #endif - + init(document: HTMLDocument) { self.document = document } - + convenience init(html: String) throws { self.init(document: try HTMLDocument(string: html)) } - + convenience init(data: Data) throws { self.init(document: try HTMLDocument(data: data)) } - + convenience init(url: URL) throws { guard let content = ZimFileService.shared.getURLContent(url: url) else { throw NSError() } try self.init(data: content.data) } - + var title: String? { document.title } - + func getFirstParagraph() -> NSAttributedString? { guard let firstParagraph = document.firstChild(xpath: "//p") else { return nil } let snippet = NSMutableAttributedString() @@ -72,12 +72,12 @@ class HTMLParser { } return snippet.length > 0 ? snippet : nil } - + func getFirstSentence(languageCode: String?) -> NSAttributedString? { guard let firstParagraph = self.getFirstParagraph() else { return nil } let text = firstParagraph.string var firstSentence: NSAttributedString? - + let tokenizer = NLTokenizer(unit: .sentence) if let languageCode = languageCode {tokenizer.setLanguage(NLLanguage(languageCode))} tokenizer.string = text @@ -87,12 +87,12 @@ class HTMLParser { } return firstSentence } - + func getFirstImagePath() -> String? { guard let firstImage = document.firstChild(xpath: "//img") else { return nil } return firstImage.attributes["src"] } - + // func getGeoCoordinate() -> CLLocationCoordinate2D? { // do { // let elements = try document.select("head > meta[name='geo.position']") @@ -102,7 +102,7 @@ class HTMLParser { // return CLLocationCoordinate2D(latitude: lat, longitude: lon) // } catch { return nil } // } - + class func parseBodyFragment(_ bodyFragment: String) -> NSAttributedString? { let html = "

\(bodyFragment)

" return (try? HTMLParser(html: html))?.getFirstParagraph() diff --git a/SwiftUI/Model/LibraryOperations.swift b/SwiftUI/Model/LibraryOperations.swift index cb410b9d6..e8a1ad52c 100644 --- a/SwiftUI/Model/LibraryOperations.swift +++ b/SwiftUI/Model/LibraryOperations.swift @@ -25,25 +25,25 @@ import Defaults struct LibraryOperations { private init() {} - + static let backgroundTaskIdentifier = "org.kiwix.library_refresh" - + // MARK: - Open - + /// Open a zim file with url /// - Parameter url: url of the zim file @discardableResult static func open(url: URL, onComplete: (() -> Void)? = nil) -> ZimFileMetaData? { guard let metadata = ZimFileService.getMetaData(url: url), let fileURLBookmark = ZimFileService.getFileURLBookmarkData(for: url) else { return nil } - + // open the file do { try ZimFileService.shared.open(fileURLBookmark: fileURLBookmark) } catch { return nil } - + // upsert zim file in the database Database.shared.container.performBackgroundTask { context in context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump @@ -60,16 +60,16 @@ struct LibraryOperations { } } } - + return metadata } - + /// Reopen zim files from url bookmark data. static func reopen(onComplete: (() -> Void)?) { var successCount = 0 let context = Database.shared.container.viewContext let request = ZimFile.fetchRequest(predicate: ZimFile.Predicate.isDownloaded) - + guard let zimFiles = try? context.fetch(request) else { onComplete?() return @@ -92,11 +92,11 @@ struct LibraryOperations { if context.hasChanges { try? context.save() } - + os_log("Reopened %d out of %d zim files", log: Log.LibraryOperations, type: .info, successCount, zimFiles.count) onComplete?() } - + /// Scan a directory and open available zim files inside it /// - Parameter url: directory to scan static func scanDirectory(_ url: URL) { @@ -110,9 +110,9 @@ struct LibraryOperations { LibraryOperations.open(url: fileURL) } } - + // MARK: - Configure - + /// Configure a zim file object based on its metadata. static func configureZimFile(_ zimFile: ZimFile, metadata: ZimFileMetaData) { zimFile.articleCount = metadata.articleCount.int64Value @@ -130,14 +130,14 @@ struct LibraryOperations { zimFile.persistentID = metadata.groupIdentifier zimFile.requiresServiceWorkers = metadata.requiresServiceWorkers zimFile.size = metadata.size.int64Value - + // Only overwrite favicon data and url if there is a new value if let url = metadata.downloadURL { zimFile.downloadURL = url } if let url = metadata.faviconURL { zimFile.faviconURL = url } } - + //MARK: - Deletion - + /// Unlink a zim file from library, delete associated bookmarks, and delete the file. /// - Parameter zimFile: the zim file to delete static func delete(zimFileID: UUID) { @@ -145,7 +145,7 @@ struct LibraryOperations { defer { try? FileManager.default.removeItem(at: url) } LibraryOperations.unlink(zimFileID: zimFileID) } - + /// Unlink a zim file from library, delete associated bookmarks, but don't delete the file. /// - Parameter zimFile: the zim file to unlink static func unlink(zimFileID: UUID) { @@ -163,9 +163,9 @@ struct LibraryOperations { if context.hasChanges { try? context.save() } } } - + // MARK: - Backup - + /// Apply iCloud backup setting on zim files in document directory. /// - Parameter isEnabled: if file should be included in backup static func applyFileBackupSetting(isEnabled: Bool? = nil) { @@ -194,7 +194,7 @@ struct LibraryOperations { ) } catch {} } - + #if os(iOS) // MARK: - Background Refresh @@ -213,7 +213,7 @@ struct LibraryOperations { os_log("Disabling background library refresh.", log: Log.LibraryOperations, type: .info) } } - + static func registerBackgroundTask() { BGTaskScheduler.shared.register( forTaskWithIdentifier: LibraryOperations.backgroundTaskIdentifier, using: nil diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.swift b/SwiftUI/Model/SearchOperation/SearchOperation.swift index 49a9a01da..e972e6838 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.swift +++ b/SwiftUI/Model/SearchOperation/SearchOperation.swift @@ -24,7 +24,7 @@ extension SearchOperation { // perform index and title search guard !searchText.isEmpty else { return } performSearch() - + // parse and extract search result snippet guard !isCancelled else { return } let snippetMode = Defaults[.searchResultSnippetMode] @@ -34,7 +34,7 @@ extension SearchOperation { DispatchQueue.global(qos: .userInitiated).async { defer { dispatchGroup.leave() } guard !self.isCancelled else { return } - + switch snippetMode { case .firstParagraph: guard let parser = try? HTMLParser(url: result.url) else { return } @@ -51,12 +51,12 @@ extension SearchOperation { } } dispatchGroup.wait() - + // start sorting search results guard !isCancelled else { return } let searchText = self.searchText.lowercased() let levenshtein = Levenshtein() - + // calculate score for all results for result in results { guard !isCancelled else { break } @@ -67,7 +67,7 @@ extension SearchOperation { result.score = NSNumber(integerLiteral: distance) } } - + // sort the results guard !isCancelled else { return } __results.sort { lhs, rhs in @@ -88,7 +88,7 @@ extension SearchOperation { private class Levenshtein { private(set) var cache = [Key: Int]() - + func calculate(_ a: String.SubSequence, _ b: String.SubSequence) -> Int { let key = Key(a: String(a), b: String(b)) if let distance = cache[key] { @@ -110,7 +110,7 @@ private class Levenshtein { return distance } } - + struct Key: Hashable { let a: String let b: String diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index 54f73182e..54fc486e4 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -85,11 +85,11 @@ extension NotificationCenter { guard let url else { return } NotificationCenter.default.post(name: .openURL, object: nil, userInfo: ["url": url, "inNewTab": inNewTab]) } - + static func openFiles(_ urls: [URL], context: OpenFileContext) { NotificationCenter.default.post(name: .openFiles, object: nil, userInfo: ["urls": urls, "context": context]) } - + static func toggleSidebar() { NotificationCenter.default.post(name: .toggleSidebar, object: nil, userInfo: nil) } diff --git a/Tests/LibraryRefreshViewModelTest.swift b/Tests/LibraryRefreshViewModelTest.swift index f2ffb9cba..7fecf078f 100644 --- a/Tests/LibraryRefreshViewModelTest.swift +++ b/Tests/LibraryRefreshViewModelTest.swift @@ -23,11 +23,11 @@ import Defaults private class HTTPTestingURLProtocol: URLProtocol { static var handler: ((URLProtocol) -> Void)? = nil - + override class func canInit(with request: URLRequest) -> Bool { true } override class func canonicalRequest(for request: URLRequest) -> URLRequest { request } override func stopLoading() { } - + override func startLoading() { if let handler = HTTPTestingURLProtocol.handler { handler(self) @@ -44,7 +44,7 @@ final class LibraryRefreshViewModelTest: XCTestCase { let config = URLSessionConfiguration.ephemeral config.protocolClasses = [HTTPTestingURLProtocol.self] urlSession = URLSession(configuration: config) - + HTTPTestingURLProtocol.handler = { urlProtocol in let response = HTTPURLResponse( url: URL(string: "https://library.kiwix.org/catalog/v2/entries?count=-1")!, @@ -60,7 +60,7 @@ final class LibraryRefreshViewModelTest: XCTestCase { override func tearDownWithError() throws { HTTPTestingURLProtocol.handler = nil } - + private func makeOPDSData(zimFileID: UUID) -> String { """ """ } - + /// Test time out fetching library data. @MainActor func testFetchTimeOut() async { @@ -150,7 +150,7 @@ final class LibraryRefreshViewModelTest: XCTestCase { "Error parsing library data." ) } - + /// Test zim file entity is created, and metadata are saved when new zim file becomes available in online catalog. @MainActor func testNewZimFileAndProperties() async throws { @@ -165,19 +165,19 @@ final class LibraryRefreshViewModelTest: XCTestCase { urlProtocol.client?.urlProtocol(urlProtocol, didReceive: response, cacheStoragePolicy: .notAllowed) urlProtocol.client?.urlProtocolDidFinishLoading(urlProtocol) } - + let viewModel = LibraryViewModel(urlSession: urlSession) await viewModel.start(isUserInitiated: true) - + // check no error has happened XCTAssertNil(viewModel.error) - + // check one zim file is in the database let context = Database.shared.container.viewContext let zimFiles = try context.fetch(ZimFile.fetchRequest()) XCTAssertEqual(zimFiles.count, 1) XCTAssertEqual(zimFiles[0].id, zimFileID) - + // check zim file can be retrieved by id, and properties are populated let zimFile = try XCTUnwrap(try context.fetch(ZimFile.fetchRequest(fileID: zimFileID)).first) XCTAssertEqual(zimFile.id, zimFileID) @@ -210,7 +210,7 @@ final class LibraryRefreshViewModelTest: XCTestCase { XCTAssertEqual(zimFile.requiresServiceWorkers, false) XCTAssertEqual(zimFile.size, 6515656704) } - + /// Test zim file deprecation @MainActor func testZimFileDeprecation() async throws { @@ -219,14 +219,14 @@ final class LibraryRefreshViewModelTest: XCTestCase { await viewModel.start(isUserInitiated: true) let context = Database.shared.container.viewContext let zimFile1 = try XCTUnwrap(try context.fetch(ZimFile.fetchRequest()).first) - + // refresh library for the second time, which should replace the old zim file with a new one await viewModel.start(isUserInitiated: true) var zimFiles = try context.fetch(ZimFile.fetchRequest()) XCTAssertEqual(zimFiles.count, 1) let zimFile2 = try XCTUnwrap(zimFiles.first) XCTAssertNotEqual(zimFile1.fileID, zimFile2.fileID) - + // set fileURLBookmark of zim file 2 zimFile2.fileURLBookmark = "/Users/tester/Downloads/file_url.zim".data(using: .utf8) try context.save() @@ -234,7 +234,7 @@ final class LibraryRefreshViewModelTest: XCTestCase { // refresh library for the third time await viewModel.start(isUserInitiated: true) zimFiles = try context.fetch(ZimFile.fetchRequest()) - + // check there are two zim files in the database, and zim file 2 is not deprecated XCTAssertEqual(zimFiles.count, 2) XCTAssertEqual(zimFiles.filter({ $0.fileID == zimFile2.fileID }).count, 1) diff --git a/Tests/OPDSParserTests.swift b/Tests/OPDSParserTests.swift index 51f5e6b47..9f20a4f4c 100644 --- a/Tests/OPDSParserTests.swift +++ b/Tests/OPDSParserTests.swift @@ -27,13 +27,13 @@ final class OPDSParserTests: XCTestCase { try OPDSParser().parse(data: content.data(using: .utf8)!) ) } - + /// Test OPDSParser.getMetaData returns nil when no metadata available with the given ID. func testMetadataNotFound() { let zimFileID = UUID(uuidString: "1ec90eab-5724-492b-9529-893959520de4")! XCTAssertNil(OPDSParser().getMetaData(id: zimFileID)) } - + /// Test OPDSParser can parse and extract zim file metadata. func test() throws { let content = """ @@ -64,15 +64,15 @@ final class OPDSParserTests: XCTestCase { """ - + // Parse data let parser = OPDSParser() XCTAssertNoThrow(try parser.parse(data: content.data(using: .utf8)!)) - + // check one zim file is populated let zimFileID = UUID(uuidString: "1ec90eab-5724-492b-9529-893959520de4")! XCTAssertEqual(parser.zimFileIDs, Set([zimFileID])) - + // check zim file metadata let metadata = try XCTUnwrap(parser.getMetaData(id: zimFileID)) XCTAssertEqual(metadata.fileID, zimFileID) @@ -92,7 +92,7 @@ final class OPDSParserTests: XCTestCase { XCTAssertEqual(metadata.hasPictures, true) XCTAssertEqual(metadata.hasVideos, false) XCTAssertEqual(metadata.requiresServiceWorkers, false) - + XCTAssertEqual( metadata.downloadURL, URL(string: "https://download.kiwix.org/zim/wikipedia/wikipedia_en_top_maxi_2023-01.zim.meta4") diff --git a/ViewModel/BrowserViewModel.swift b/ViewModel/BrowserViewModel.swift index c659d7fb8..128a149b3 100644 --- a/ViewModel/BrowserViewModel.swift +++ b/ViewModel/BrowserViewModel.swift @@ -229,7 +229,7 @@ final class BrowserViewModel: NSObject, ObservableObject, } // MARK: - New Tab Creation - + #if os(macOS) private func createNewTab(url: URL) -> Bool { guard let currentWindow = NSApp.keyWindow else { return false } @@ -245,7 +245,7 @@ final class BrowserViewModel: NSObject, ObservableObject, return true } #endif - + // MARK: - WKNavigationDelegate func webView( @@ -257,7 +257,7 @@ final class BrowserViewModel: NSObject, ObservableObject, decisionHandler(.cancel) return } - + #if os(macOS) // detect cmd + click event if navigationAction.modifierFlags.contains(.command) { @@ -267,7 +267,7 @@ final class BrowserViewModel: NSObject, ObservableObject, } } #endif - + if url.isKiwixURL, let redirectedURL = ZimFileService.shared.getRedirectedURL(url: url) { if webView.url != redirectedURL { DispatchQueue.main.async { webView.load(URLRequest(url: redirectedURL)) } @@ -379,27 +379,27 @@ final class BrowserViewModel: NSObject, ObservableObject, }, actionProvider: { _ in var actions = [UIAction]() - + // open url actions.append( - UIAction(title: "common.dialog.button.open".localized, + UIAction(title: "common.dialog.button.open".localized, image: UIImage(systemName: "doc.text")) { _ in webView.load(URLRequest(url: url)) } ) actions.append( - UIAction(title: "common.dialog.button.open_in_new_tab".localized, + UIAction(title: "common.dialog.button.open_in_new_tab".localized, image: UIImage(systemName: "doc.badge.plus")) { _ in NotificationCenter.openURL(url, inNewTab: true) } ) - + // bookmark let bookmarkAction: UIAction = { let context = Database.viewContext let predicate = NSPredicate(format: "articleURL == %@", url as CVarArg) let request = Bookmark.fetchRequest(predicate: predicate) - + if let bookmarks = try? context.fetch(request), !bookmarks.isEmpty { return UIAction(title: "common.dialog.button.remove_bookmark".localized, diff --git a/ViewModel/LibraryViewModel.swift b/ViewModel/LibraryViewModel.swift index 219853d8d..df864dd48 100644 --- a/ViewModel/LibraryViewModel.swift +++ b/ViewModel/LibraryViewModel.swift @@ -35,11 +35,11 @@ public class LibraryViewModel: ObservableObject { private let context: NSManagedObjectContext private var insertionCount = 0 private var deletionCount = 0 - + @MainActor public init(urlSession: URLSession? = nil) { self.urlSession = urlSession ?? URLSession.shared - + context = NSManagedObjectContext(concurrencyType: .privateQueueConcurrencyType) context.persistentStoreCoordinator = Database.shared.container.persistentStoreCoordinator context.mergePolicy = NSMergePolicy.mergeByPropertyObjectTrump @@ -50,11 +50,11 @@ public class LibraryViewModel: ObservableObject { state = .complete } } - + public func start(isUserInitiated: Bool) { Task { await start(isUserInitiated: isUserInitiated) } } - + @MainActor public func start(isUserInitiated: Bool) async { guard state != .inProgress else { return } @@ -81,7 +81,7 @@ public class LibraryViewModel: ObservableObject { } // process the feed try await process(parser: parser) - + // update library last refresh timestamp Defaults[.libraryLastRefresh] = Date() @@ -178,7 +178,7 @@ public class LibraryViewModel: ObservableObject { } } } - + private func parse(data: Data) async throws -> OPDSParser { try await withCheckedThrowingContinuation { continuation in DispatchQueue.global().async { @@ -192,7 +192,7 @@ public class LibraryViewModel: ObservableObject { } } } - + private func process(parser: Parser) async throws { try await withCheckedThrowingContinuation { continuation in context.perform { @@ -217,7 +217,7 @@ public class LibraryViewModel: ObservableObject { if let result = try self.context.execute(insertRequest) as? NSBatchInsertResult { self.insertionCount = result.result as? Int ?? 0 } - + // delete old zim entries not included in the feed let fetchRequest: NSFetchRequest = ZimFile.fetchRequest() fetchRequest.predicate = NSCompoundPredicate(andPredicateWithSubpredicates: [ @@ -229,7 +229,7 @@ public class LibraryViewModel: ObservableObject { if let result = try self.context.execute(deleteRequest) as? NSBatchDeleteResult { self.deletionCount = result.result as? Int ?? 0 } - + continuation.resume() } catch { os_log("Error saving OPDS Data: %s", log: Log.OPDS, type: .error, error.localizedDescription) diff --git a/ViewModel/NavigationViewModel.swift b/ViewModel/NavigationViewModel.swift index f79fa42c4..958e71925 100644 --- a/ViewModel/NavigationViewModel.swift +++ b/ViewModel/NavigationViewModel.swift @@ -24,7 +24,7 @@ final class NavigationViewModel: ObservableObject { @Published var currentItem: NavigationItem? = .loading // MARK: - Tab Management - + private func makeTab(context: NSManagedObjectContext) -> Tab { let tab = Tab(context: context) tab.created = Date() @@ -33,7 +33,7 @@ final class NavigationViewModel: ObservableObject { try? context.save() return tab } - + func navigateToMostRecentTab() { let context = Database.viewContext let fetchRequest = Tab.fetchRequest(sortDescriptors: [NSSortDescriptor(key: "lastOpened", ascending: false)]) @@ -46,7 +46,7 @@ final class NavigationViewModel: ObservableObject { } } - + @discardableResult func createTab() -> NSManagedObjectID { let context = Database.viewContext @@ -99,14 +99,14 @@ final class NavigationViewModel: ObservableObject { } } } - + /// Delete all tabs, and open a new tab func deleteAllTabs() { Database.performBackgroundTask { context in // delete all existing tabs let tabs = try? context.fetch(Tab.fetchRequest()) tabs?.forEach { context.delete($0) } - + // create new tab let newTab = self.makeTab(context: context) Task { diff --git a/ViewModel/SearchViewModel.swift b/ViewModel/SearchViewModel.swift index 7a70f9779..9f46c6f57 100644 --- a/ViewModel/SearchViewModel.swift +++ b/ViewModel/SearchViewModel.swift @@ -26,11 +26,11 @@ class SearchViewModel: NSObject, ObservableObject, NSFetchedResultsControllerDel @Published private(set) var zimFiles: [UUID: ZimFile] // ID of zim files that are included in search @Published private(set) var inProgress = false @Published private(set) var results = [SearchResult]() - + private let fetchedResultsController: NSFetchedResultsController private var searchSubscriber: AnyCancellable? private let queue = OperationQueue() - + override init() { // initialize fetched results controller let predicate = NSPredicate(format: "includedInSearch == true AND fileURLBookmark != nil") @@ -40,19 +40,19 @@ class SearchViewModel: NSObject, ObservableObject, NSFetchedResultsControllerDel sectionNameKeyPath: nil, cacheName: nil ) - + // initilze zim file IDs try? fetchedResultsController.performFetch() zimFiles = fetchedResultsController.fetchedObjects?.reduce(into: [:]) { result, zimFile in result?[zimFile.fileID] = zimFile } ?? [:] - + super.init() - + // additional configurations queue.maxConcurrentOperationCount = 1 fetchedResultsController.delegate = self - + // subscribers searchSubscriber = Publishers.CombineLatest($searchText.removeDuplicates(), $zimFiles) .map { [unowned self] searchText, zimFiles in @@ -65,13 +65,13 @@ class SearchViewModel: NSObject, ObservableObject, NSFetchedResultsControllerDel self.updateSearchResults(searchText, Set(zimFiles.keys)) } } - + func controllerDidChangeContent(_ controller: NSFetchedResultsController) { zimFiles = fetchedResultsController.fetchedObjects?.reduce(into: [:]) { result, zimFile in result?[zimFile.fileID] = zimFile } ?? [:] } - + private func updateSearchResults(_ searchText: String, _ zimFileIDs: Set) { queue.cancelAllOperations() let operation = SearchOperation(searchText: searchText, zimFileIDs: zimFileIDs) diff --git a/Views/Bookmarks.swift b/Views/Bookmarks.swift index 326c6be82..4398a3fcd 100644 --- a/Views/Bookmarks.swift +++ b/Views/Bookmarks.swift @@ -27,7 +27,7 @@ struct Bookmarks: View { animation: .easeInOut ) private var bookmarks: FetchedResults @State private var searchText = "" - + var body: some View { LazyVGrid(columns: ([gridItem]), spacing: 12) { ForEach(bookmarks) { bookmark in @@ -69,7 +69,7 @@ struct Bookmarks: View { #endif } } - + private var gridItem: GridItem { #if os(macOS) GridItem(.adaptive(minimum: 250, maximum: 500), spacing: 12) @@ -77,7 +77,7 @@ struct Bookmarks: View { GridItem(.adaptive(minimum: 250, maximum: 500), spacing: 12) #endif } - + private static func buildPredicate(searchText: String) -> NSPredicate? { guard !searchText.isEmpty else { return nil } return NSCompoundPredicate(orPredicateWithSubpredicates: [ diff --git a/Views/BrowserTab.swift b/Views/BrowserTab.swift index 89ad65222..ad63f758c 100644 --- a/Views/BrowserTab.swift +++ b/Views/BrowserTab.swift @@ -64,7 +64,7 @@ struct BrowserTab: View { browser.persistState() } } - + struct Content: View { @Environment(\.isSearching) private var isSearching @EnvironmentObject private var browser: BrowserViewModel diff --git a/Views/BuildingBlocks/ArticleCell.swift b/Views/BuildingBlocks/ArticleCell.swift index ffe5af4bd..29e5e22f5 100644 --- a/Views/BuildingBlocks/ArticleCell.swift +++ b/Views/BuildingBlocks/ArticleCell.swift @@ -20,12 +20,12 @@ import SwiftUI /// A rounded rect cell displaying preview of an article. struct ArticleCell: View { @State var isHovering: Bool = false - + let title: String let snippet: NSAttributedString? let zimFile: ZimFile? let alwaysShowSnippet: Bool - + init(bookmark: Bookmark) { self.title = bookmark.title if let snippet = bookmark.snippet { @@ -36,14 +36,14 @@ struct ArticleCell: View { self.zimFile = bookmark.zimFile self.alwaysShowSnippet = true } - + init(result: SearchResult, zimFile: ZimFile?) { self.title = result.title self.snippet = result.snippet self.zimFile = zimFile self.alwaysShowSnippet = false } - + var body: some View { HStack(alignment: .top) { VStack(alignment: .leading, spacing: 0) { @@ -80,7 +80,7 @@ struct ArticleCell_Previews: PreviewProvider { """) return result }() - + static var previews: some View { ArticleCell(result: ArticleCell_Previews.result, zimFile: nil) .frame(width: 500, height: 100) diff --git a/Views/BuildingBlocks/Attribute.swift b/Views/BuildingBlocks/Attribute.swift index 39109d788..2639dacfd 100644 --- a/Views/BuildingBlocks/Attribute.swift +++ b/Views/BuildingBlocks/Attribute.swift @@ -20,7 +20,7 @@ import SwiftUI struct Attribute: View { let title: String let detail: String? - + var body: some View { HStack { Text(title) @@ -33,7 +33,7 @@ struct Attribute: View { struct AttributeBool: View { let title: String let detail: Bool - + var body: some View { HStack { Text(title) diff --git a/Views/BuildingBlocks/DownloadTaskCell.swift b/Views/BuildingBlocks/DownloadTaskCell.swift index 69c0aa2df..cdf323156 100644 --- a/Views/BuildingBlocks/DownloadTaskCell.swift +++ b/Views/BuildingBlocks/DownloadTaskCell.swift @@ -20,10 +20,10 @@ import SwiftUI struct DownloadTaskCell: View { @State private var isHovering: Bool = false - + let downloadTask: DownloadTask let progress: Progress - + init(_ downloadTask: DownloadTask) { self.downloadTask = downloadTask self.progress = Progress(totalUnitCount: downloadTask.totalBytes) @@ -32,7 +32,7 @@ struct DownloadTaskCell: View { self.progress.fileTotalCount = 1 self.progress.fileOperationKind = .downloading } - + var body: some View { VStack(spacing: 8) { if let zimFile = downloadTask.zimFile { @@ -92,7 +92,7 @@ struct DownloadTaskCell_Previews: PreviewProvider { downloadTask.totalBytes = 200 return downloadTask }() - + static var previews: some View { DownloadTaskCell(DownloadTaskCell_Previews.downloadTask) .preferredColorScheme(.light) diff --git a/Views/BuildingBlocks/Favicon.swift b/Views/BuildingBlocks/Favicon.swift index c9eca63cf..f2e4f7be1 100644 --- a/Views/BuildingBlocks/Favicon.swift +++ b/Views/BuildingBlocks/Favicon.swift @@ -19,16 +19,16 @@ import SwiftUI struct Favicon: View { @State var imageData: Data? - + private let category: Category private let imageURL: URL? - + init(category: Category, imageData: Data? = nil, imageURL: URL? = nil) { self.category = category self.imageURL = imageURL self._imageData = State(wrappedValue: imageData) } - + var body: some View { ZStack(alignment: .center) { Color.white.clipShape(RoundedRectangle(cornerRadius: 3, style: .continuous)) @@ -42,7 +42,7 @@ struct Favicon: View { } } } - + @ViewBuilder var image: some View { #if os(macOS) diff --git a/Views/BuildingBlocks/FlavorTag.swift b/Views/BuildingBlocks/FlavorTag.swift index 7480cef74..cb490dac2 100644 --- a/Views/BuildingBlocks/FlavorTag.swift +++ b/Views/BuildingBlocks/FlavorTag.swift @@ -19,11 +19,11 @@ import SwiftUI struct FlavorTag: View { let flavor: Flavor - + init(_ flavor: Flavor) { self.flavor = flavor } - + var body: some View { Text(flavor.description) .fontWeight(.medium) @@ -35,7 +35,7 @@ struct FlavorTag: View { .overlay(Capsule(style: .continuous).stroke(Color.gray, lineWidth: 0.5)) .help(help) } - + var backgroundColor: Color { switch flavor { case .max: @@ -46,7 +46,7 @@ struct FlavorTag: View { return .orange } } - + var help: String { switch flavor { case .max: diff --git a/Views/BuildingBlocks/GridSection.swift b/Views/BuildingBlocks/GridSection.swift index ddcf01526..9b9e6dc44 100644 --- a/Views/BuildingBlocks/GridSection.swift +++ b/Views/BuildingBlocks/GridSection.swift @@ -20,12 +20,12 @@ import SwiftUI struct GridSection: View { let title: String let content: Content - + init(title: String, @ViewBuilder content: () -> Content) { self.title = title self.content = content() } - + var body: some View { Section { content diff --git a/Views/BuildingBlocks/LibraryLastRefreshTime.swift b/Views/BuildingBlocks/LibraryLastRefreshTime.swift index 855349190..46023918e 100644 --- a/Views/BuildingBlocks/LibraryLastRefreshTime.swift +++ b/Views/BuildingBlocks/LibraryLastRefreshTime.swift @@ -21,7 +21,7 @@ import Defaults struct LibraryLastRefreshTime: View { @Default(.libraryLastRefresh) private var lastRefresh - + var body: some View { if let lastRefresh = lastRefresh { if Date().timeIntervalSince(lastRefresh) < 120 { diff --git a/Views/BuildingBlocks/Message.swift b/Views/BuildingBlocks/Message.swift index 66183b037..b2364c586 100644 --- a/Views/BuildingBlocks/Message.swift +++ b/Views/BuildingBlocks/Message.swift @@ -19,7 +19,7 @@ import SwiftUI struct Message: View { let text: String - + var body: some View { VStack { Spacer() diff --git a/Views/BuildingBlocks/SafariView.swift b/Views/BuildingBlocks/SafariView.swift index 55c4acaf1..c081de375 100644 --- a/Views/BuildingBlocks/SafariView.swift +++ b/Views/BuildingBlocks/SafariView.swift @@ -21,7 +21,7 @@ import SwiftUI #if os(iOS) struct SafariView: UIViewControllerRepresentable { let url: URL - + func makeUIViewController(context: Context) -> SFSafariViewController { SFSafariViewController(url: url) } diff --git a/Views/BuildingBlocks/SearchResultRow.swift b/Views/BuildingBlocks/SearchResultRow.swift index 3532d13cf..0258e71a3 100644 --- a/Views/BuildingBlocks/SearchResultRow.swift +++ b/Views/BuildingBlocks/SearchResultRow.swift @@ -20,7 +20,7 @@ import SwiftUI struct SearchResultRow: View { let result: SearchResult let zimFile: ZimFile? - + var body: some View { HStack(alignment: .top, spacing: 0) { VStack(alignment: .leading) { @@ -55,7 +55,7 @@ struct SearchResultRow_Previews: PreviewProvider { """) return result }() - + static var previews: some View { SearchResultRow(result: SearchResultRow_Previews.result, zimFile: nil) .frame(width: 500) diff --git a/Views/BuildingBlocks/SheetContent.swift b/Views/BuildingBlocks/SheetContent.swift index 805207ac1..30d42d52b 100644 --- a/Views/BuildingBlocks/SheetContent.swift +++ b/Views/BuildingBlocks/SheetContent.swift @@ -19,13 +19,13 @@ import SwiftUI struct SheetContent: View { @Environment(\.dismiss) private var dismiss - + let content: Content init(@ViewBuilder content: () -> Content) { self.content = content() } - + var body: some View { #if os(macOS) content diff --git a/Views/BuildingBlocks/TabLabel.swift b/Views/BuildingBlocks/TabLabel.swift index 9c965dbc1..973032f7e 100644 --- a/Views/BuildingBlocks/TabLabel.swift +++ b/Views/BuildingBlocks/TabLabel.swift @@ -20,7 +20,7 @@ import SwiftUI #if os(iOS) struct TabLabel: View { @ObservedObject var tab: Tab - + var body: some View { if let zimFile = tab.zimFile, let category = Category(rawValue: zimFile.category) { Label { diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index 3770611f9..798be6a8a 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -25,20 +25,20 @@ import Defaults #if os(macOS) struct WebView: NSViewRepresentable { @EnvironmentObject private var browser: BrowserViewModel - + func makeNSView(context: Context) -> WKWebView { browser.webView } - + func updateNSView(_ webView: WKWebView, context: Context) { } - + func makeCoordinator() -> Coordinator { Coordinator(view: self) } - + class Coordinator { private let pageZoomObserver: Defaults.Observation - + init(view: WebView) { pageZoomObserver = Defaults.observe(.webViewPageZoom) { change in view.browser.webView.pageZoom = change.newValue @@ -64,7 +64,7 @@ class WebViewController: UIViewController { private var topSafeAreaConstraint: NSLayoutConstraint? private var layoutSubject = PassthroughSubject() private var layoutCancellable: AnyCancellable? - + init(webView: WKWebView) { self.webView = webView self.pageZoomObserver = Defaults.observe(.webViewPageZoom) { change in @@ -72,18 +72,18 @@ class WebViewController: UIViewController { } super.init(nibName: nil, bundle: nil) } - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } - + override func viewDidAppear(_ animated: Bool) { super.viewDidAppear(animated) - + webView.translatesAutoresizingMaskIntoConstraints = false view.addSubview(webView) webView.alpha = 0 - + /* HACK: Make sure the webview content does not jump after state restoration It appears the webview's state restoration does not properly take into account of the content inset. @@ -111,7 +111,7 @@ class WebViewController: UIViewController { self?.view.topAnchor.constraint(equalTo: webView.topAnchor).isActive = true } } - + override func viewDidLayoutSubviews() { super.viewDidLayoutSubviews() webView.setValue(view.safeAreaInsets, forKey: "_obscuredInsets") @@ -154,7 +154,7 @@ class WebViewConfiguration: WKWebViewConfiguration { return controller }() } - + required init?(coder: NSCoder) { fatalError("init(coder:) has not been implemented") } diff --git a/Views/BuildingBlocks/ZimFileCell.swift b/Views/BuildingBlocks/ZimFileCell.swift index 5cc8f0c2a..9f1895d1f 100644 --- a/Views/BuildingBlocks/ZimFileCell.swift +++ b/Views/BuildingBlocks/ZimFileCell.swift @@ -21,14 +21,14 @@ import SwiftUI struct ZimFileCell: View { @ObservedObject var zimFile: ZimFile @State var isHovering: Bool = false - + let prominent: Prominent - + init(_ zimFile: ZimFile, prominent: Prominent) { self.zimFile = zimFile self.prominent = prominent } - + var body: some View { VStack(spacing: 8) { switch prominent { @@ -86,20 +86,20 @@ struct ZimFileCell: View { .modifier(CellBackground(isHovering: isHovering)) .onHover { self.isHovering = $0 } } - + static let dateFormatter: DateFormatter = { let formatter = DateFormatter() formatter.dateStyle = .medium formatter.timeStyle = .none return formatter }() - + static let sizeFormatter: ByteCountFormatter = { let formatter = ByteCountFormatter() formatter.countStyle = .file return formatter }() - + enum Prominent { case name, size } @@ -121,7 +121,7 @@ struct ZimFileCell_Previews: PreviewProvider { zimFile.size = 1000000000 return zimFile }() - + static var previews: some View { Group { ZimFileCell(ZimFileCell_Previews.zimFile, prominent: .name) diff --git a/Views/BuildingBlocks/ZimFileRow.swift b/Views/BuildingBlocks/ZimFileRow.swift index 03a011e0c..acd243eb6 100644 --- a/Views/BuildingBlocks/ZimFileRow.swift +++ b/Views/BuildingBlocks/ZimFileRow.swift @@ -20,11 +20,11 @@ import SwiftUI struct ZimFileRow: View { @ObservedObject var zimFile: ZimFile - + init(_ zimFile: ZimFile) { self.zimFile = zimFile } - + var body: some View { HStack { Favicon( @@ -39,7 +39,7 @@ struct ZimFileRow: View { Formatter.size.string(fromByteCount: zimFile.size), { if #available(iOS 15.0, *) { - return "\(zimFile.articleCount.formatted(.number.notation(.compactName)))" + + return "\(zimFile.articleCount.formatted(.number.notation(.compactName)))" + "zim_file_cell_article_count_suffix".localized } else { return Formatter.largeNumber(zimFile.articleCount) @@ -67,10 +67,10 @@ struct ZimFileRow_Previews: PreviewProvider { zimFile.name = "Wikipedia Zim File Name" zimFile.persistentID = "" zimFile.size = 1000000000 - + return zimFile }() - + static var previews: some View { Group { ZimFileRow(ZimFileRow_Previews.zimFile) diff --git a/Views/Buttons/ArticleShortcutButtons.swift b/Views/Buttons/ArticleShortcutButtons.swift index b0da9df8b..b6eae3d1a 100644 --- a/Views/Buttons/ArticleShortcutButtons.swift +++ b/Views/Buttons/ArticleShortcutButtons.swift @@ -24,13 +24,13 @@ struct ArticleShortcutButtons: View { sortDescriptors: [NSSortDescriptor(keyPath: \ZimFile.size, ascending: false)], predicate: ZimFile.openedPredicate ) private var zimFiles: FetchedResults - + let displayMode: DisplayMode enum DisplayMode { case mainArticle, randomArticle, mainAndRandomArticle } - + var body: some View { switch displayMode { case .mainArticle: @@ -42,7 +42,7 @@ struct ArticleShortcutButtons: View { randomArticle } } - + private var mainArticle: some View { #if os(macOS) Button { @@ -71,7 +71,7 @@ struct ArticleShortcutButtons: View { .help("article_shortcut.main.button.help".localized) #endif } - + var randomArticle: some View { #if os(macOS) Button { diff --git a/Views/Buttons/BookmarkButton.swift b/Views/Buttons/BookmarkButton.swift index 5e86029b1..33214bf02 100644 --- a/Views/Buttons/BookmarkButton.swift +++ b/Views/Buttons/BookmarkButton.swift @@ -21,7 +21,7 @@ struct BookmarkButton: View { @Environment(\.horizontalSizeClass) private var horizontalSizeClass @EnvironmentObject private var browser: BrowserViewModel @State private var isShowingPopOver = false - + var body: some View { #if os(macOS) Button { @@ -32,7 +32,7 @@ struct BookmarkButton: View { } } label: { Label { - Text(browser.articleBookmarked ? + Text(browser.articleBookmarked ? "common.dialog.button.remove_bookmark".localized : "common.dialog.button.add_bookmark".localized) } icon: { Image(systemName: browser.articleBookmarked ? "star.fill" : "star") diff --git a/Views/Buttons/NavigationButtons.swift b/Views/Buttons/NavigationButtons.swift index fa621b34e..5c8229f4a 100644 --- a/Views/Buttons/NavigationButtons.swift +++ b/Views/Buttons/NavigationButtons.swift @@ -21,7 +21,7 @@ struct NavigationButtons: View { @Environment(\.dismissSearch) private var dismissSearch @Environment(\.horizontalSizeClass) private var horizontalSizeClass @EnvironmentObject private var browser: BrowserViewModel - + var body: some View { if horizontalSizeClass == .regular { goBackButton @@ -32,7 +32,7 @@ struct NavigationButtons: View { goForwardButton } } - + var goBackButton: some View { Button { browser.webView.goBack() @@ -41,7 +41,7 @@ struct NavigationButtons: View { Label("common.button.go_back".localized, systemImage: "chevron.left") }.disabled(!browser.canGoBack) } - + var goForwardButton: some View { Button { browser.webView.goForward() diff --git a/Views/Buttons/OutlineButton.swift b/Views/Buttons/OutlineButton.swift index d37841f1c..195dab1a3 100644 --- a/Views/Buttons/OutlineButton.swift +++ b/Views/Buttons/OutlineButton.swift @@ -78,12 +78,12 @@ struct OutlineButton: View { } #endif } - + struct OutlineNode: View { @ObservedObject var item: OutlineItem let action: ((OutlineItem) -> Void)? - + var body: some View { if let children = item.children { DisclosureGroup(isExpanded: $item.isExpanded) { diff --git a/Views/Buttons/TabsManagerButton.swift b/Views/Buttons/TabsManagerButton.swift index 19c3f8be3..ce6605b74 100644 --- a/Views/Buttons/TabsManagerButton.swift +++ b/Views/Buttons/TabsManagerButton.swift @@ -26,12 +26,12 @@ struct TabsManagerButton: View { predicate: ZimFile.openedPredicate ) private var zimFiles: FetchedResults @State private var presentedSheet: PresentedSheet? - + private enum PresentedSheet: String, Identifiable { var id: String { rawValue } case tabsManager } - + var body: some View { Menu { Section { @@ -83,7 +83,7 @@ struct TabManager: View { sortDescriptors: [SortDescriptor(\Tab.created, order: .reverse)], animation: .easeInOut ) private var tabs: FetchedResults - + var body: some View { List(tabs) { tab in Button { diff --git a/Views/Commands.swift b/Views/Commands.swift index 57c99e04e..50e627367 100644 --- a/Views/Commands.swift +++ b/Views/Commands.swift @@ -40,17 +40,17 @@ extension FocusedValues { get { self[BrowserViewModelKey.self] } set { self[BrowserViewModelKey.self] = newValue } } - + var canGoBack: CanGoBackKey.Value? { get { self[CanGoBackKey.self] } set { self[CanGoBackKey.self] = newValue } } - + var canGoForward: CanGoForwardKey.Value? { get { self[CanGoForwardKey.self] } set { self[CanGoForwardKey.self] = newValue } } - + var navigationItem: NavigationItemKey.Value? { get { self[NavigationItemKey.self] } set { self[NavigationItemKey.self] = newValue } @@ -61,7 +61,7 @@ struct NavigationCommands: View { @FocusedValue(\.canGoBack) var canGoBack: Bool? @FocusedValue(\.canGoForward) var canGoForward: Bool? @FocusedValue(\.browserViewModel) var browser: BrowserViewModel? - + var body: some View { Button("common.button.go_back".localized) { browser?.webView.goBack() } .keyboardShortcut("[") @@ -75,7 +75,7 @@ struct NavigationCommands: View { struct PageZoomCommands: View { @Default(.webViewPageZoom) var webViewPageZoom @FocusedValue(\.browserViewModel) var browser: BrowserViewModel? - + var body: some View { Button("commands.button.actual_size".localized) { webViewPageZoom = 1 } .keyboardShortcut("0") @@ -92,7 +92,7 @@ struct PageZoomCommands: View { /// Only used on macOS struct SidebarNavigationCommands: View { @FocusedBinding(\.navigationItem) var navigationItem: NavigationItem?? - + var body: some View { buildButtons([.reading, .bookmarks], modifiers: [.command]) if FeatureFlags.hasLibrary { @@ -100,7 +100,7 @@ struct SidebarNavigationCommands: View { buildButtons([.opened, .categories, .downloads, .new], modifiers: [.command, .control]) } } - + private func buildButtons(_ navigationItems: [NavigationItem], modifiers: EventModifiers = []) -> some View { ForEach(Array(navigationItems.enumerated()), id: \.element) { index, item in Button(item.name) { diff --git a/Views/Library/Library.swift b/Views/Library/Library.swift index 51ff6b811..1c7373288 100644 --- a/Views/Library/Library.swift +++ b/Views/Library/Library.swift @@ -24,7 +24,7 @@ import Defaults struct Library: View { @EnvironmentObject private var viewModel: LibraryViewModel @SceneStorage("LibraryTabItem") private var tabItem: LibraryTabItem = .opened - + private let defaultTabItem: LibraryTabItem? private let categories: [Category] let dismiss: (() -> Void)? @@ -34,7 +34,7 @@ struct Library: View { self.dismiss = dismiss categories = CategoriesToLanguages.allCategories() } - + var body: some View { TabView(selection: $tabItem) { ForEach(LibraryTabItem.allCases) { tabItem in @@ -91,7 +91,7 @@ struct Library_Previews: PreviewProvider { /// On macOS, adds a panel to the right of the modified view to show zim file detail. struct LibraryZimFileDetailSidePanel: ViewModifier { @EnvironmentObject private var viewModel: LibraryViewModel - + func body(content: Content) -> some View { VStack(spacing: 0) { Divider() @@ -115,7 +115,7 @@ struct LibraryZimFileDetailSidePanel: ViewModifier { /// On iOS, converts the modified view to a NavigationLink that goes to the zim file detail. struct LibraryZimFileContext: ViewModifier { @EnvironmentObject private var viewModel: LibraryViewModel - + let zimFile: ZimFile let dismiss: (() -> Void)? // iOS only @@ -146,7 +146,7 @@ struct LibraryZimFileContext: ViewModifier { Section { supplementaryActions } } } - + @ViewBuilder var articleActions: some View { Button { @@ -162,7 +162,7 @@ struct LibraryZimFileContext: ViewModifier { Label("library.zim_file_context.random.label".localized, systemImage: "die.face.5") } } - + @ViewBuilder var supplementaryActions: some View { if let downloadURL = zimFile.downloadURL { diff --git a/Views/Library/ZimFileDetail.swift b/Views/Library/ZimFileDetail.swift index bd295637b..1489e7e06 100644 --- a/Views/Library/ZimFileDetail.swift +++ b/Views/Library/ZimFileDetail.swift @@ -36,7 +36,7 @@ struct ZimFileDetail: View { #if os(macOS) List { Section("zim_file.list.name.text".localized) { Text(zimFile.name).lineLimit(nil) }.collapsible(false) - Section("zim_file.list.description.text".localized) { + Section("zim_file.list.description.text".localized) { Text(zimFile.fileDescription).lineLimit(nil) }.collapsible(false) Section("zim_file.list.actions.text".localized) { actions }.collapsible(false) @@ -87,7 +87,7 @@ struct ZimFileDetail: View { .navigationBarTitleDisplayMode(.inline) #endif } - + @ViewBuilder var actions: some View { if let downloadTask = zimFile.downloadTask { // zim file is being downloaded @@ -125,7 +125,7 @@ struct ZimFileDetail: View { downloadAction } } - + var unlinkAction: some View { Action(title: "zim_file.action.unlink.title".localized, isDestructive: true) { isPresentingUnlinkAlert = true @@ -143,7 +143,7 @@ struct ZimFileDetail: View { ) } } - + var deleteAction: some View { Action(title: "zim_file.action.delete.title".localized, isDestructive: true) { isPresentingDeleteAlert = true @@ -161,7 +161,7 @@ struct ZimFileDetail: View { ) } } - + var downloadAction: some View { Action(title: "zim_file.action.download.title".localized) { if let freeSpace = freeSpace, zimFile.size >= freeSpace - 10^9 { @@ -186,19 +186,19 @@ struct ZimFileDetail: View { ) } } - + @ViewBuilder var basicInfo: some View { Attribute(title: "zim_file.base_info.attribute.language".localized, detail: zimFile.languageCodesListed) Attribute(title: "zim_file.base_info.attribute.category".localized, detail: Category(rawValue: zimFile.category)?.name) - Attribute(title: "zim_file.base_info.attribute.size".localized, + Attribute(title: "zim_file.base_info.attribute.size".localized, detail: Formatter.size.string(fromByteCount: zimFile.size)) - Attribute(title: "zim_file.base_info.attribute.created".localized, + Attribute(title: "zim_file.base_info.attribute.created".localized, detail: Formatter.dateMedium.string(from: zimFile.created)) } - + @ViewBuilder var boolInfo: some View { AttributeBool(title: "zim_file.bool_info.pictures".localized, detail: zimFile.hasPictures) @@ -209,7 +209,7 @@ struct ZimFileDetail: View { detail: zimFile.requiresServiceWorkers) } } - + @ViewBuilder var counts: some View { Attribute( @@ -221,12 +221,12 @@ struct ZimFileDetail: View { detail: Formatter.number.string(from: NSNumber(value: zimFile.mediaCount)) ) } - + @ViewBuilder var id: some View { Attribute(title: "zim_file.detail.id.title".localized, detail: String(zimFile.fileID.uuidString.prefix(8))) } - + private var freeSpace: Int64? { try? FileManager.default .urls(for: .documentDirectory, in: .userDomainMask) @@ -237,7 +237,7 @@ struct ZimFileDetail: View { private struct FileLocator: ViewModifier { @Binding var isPresenting: Bool - + func body(content: Content) -> some View { content.fileImporter( isPresented: $isPresenting, @@ -252,7 +252,7 @@ private struct FileLocator: ViewModifier { private struct DownloadTaskDetail: View { @ObservedObject var downloadTask: DownloadTask - + var body: some View { Action(title: "zim_file.download_task.action.title.cancel".localized, isDestructive: true) { DownloadService.shared.cancel(zimFileID: downloadTask.fileID) @@ -277,7 +277,7 @@ private struct DownloadTaskDetail: View { Attribute(title: "zim_file.download_task.action.paused".localized, detail: detail) } } - + var detail: String { if let percent = percent { return "\(size) - \(percent)" @@ -285,11 +285,11 @@ private struct DownloadTaskDetail: View { return size } } - + var size: String { Formatter.size.string(fromByteCount: downloadTask.downloadedBytes) } - + var percent: String? { guard downloadTask.totalBytes > 0 else { return nil } let fractionCompleted = NSNumber(value: Double(downloadTask.downloadedBytes) / Double(downloadTask.totalBytes)) @@ -302,7 +302,7 @@ private struct Action: View { let isDestructive: Bool let alignment: HorizontalAlignment let action: (() -> Void) - + init(title: String, isDestructive: Bool = false, alignment: HorizontalAlignment = .center, @@ -313,7 +313,7 @@ private struct Action: View { self.alignment = alignment self.action = action } - + var body: some View { Button(action: action, label: { HStack { @@ -358,7 +358,7 @@ struct ZimFileDetail_Previews: PreviewProvider { zimFile.size = 1000000000 return zimFile }() - + static var previews: some View { ZimFileDetail(zimFile: zimFile, dismissParent: nil).frame(width: 300).previewLayout(.sizeThatFits) } diff --git a/Views/Library/ZimFilesCategories.swift b/Views/Library/ZimFilesCategories.swift index f58014df3..1689dcb98 100644 --- a/Views/Library/ZimFilesCategories.swift +++ b/Views/Library/ZimFilesCategories.swift @@ -60,7 +60,7 @@ struct ZimFilesCategories: View { struct ZimFilesCategory: View { @Binding var category: Category @State private var searchText = "" - + var body: some View { if category == .ted || category == .stackExchange || category == .other { CategoryList(category: $category, searchText: $searchText) @@ -68,7 +68,7 @@ struct ZimFilesCategory: View { CategoryGrid(category: $category, searchText: $searchText) } } - + static func buildPredicate(category: Category, searchText: String) -> NSPredicate { var predicates = [ NSPredicate(format: "category == %@", category.rawValue), @@ -89,7 +89,7 @@ private struct CategoryGrid: View { @EnvironmentObject private var viewModel: LibraryViewModel @Environment(\.horizontalSizeClass) private var horizontalSizeClass @SectionedFetchRequest private var sections: SectionedFetchResults - + init(category: Binding, searchText: Binding) { self._category = category self._searchText = searchText @@ -102,7 +102,7 @@ private struct CategoryGrid: View { animation: .easeInOut ) } - + var body: some View { Group { if sections.isEmpty { @@ -150,7 +150,7 @@ private struct CategoryGrid: View { sections.nsPredicate = ZimFilesCategory.buildPredicate(category: category, searchText: searchText) } } - + private var gridItem: GridItem { if horizontalSizeClass == .regular { return GridItem(.adaptive(minimum: 200, maximum: 400), spacing: 12) @@ -158,13 +158,13 @@ private struct CategoryGrid: View { return GridItem(.adaptive(minimum: 175, maximum: 400), spacing: 12) } } - + private struct SectionHeader: View { let title: String let category: Category let imageData: Data? let imageURL: URL? - + var body: some View { Label { Text(title).font(.title3).fontWeight(.semibold) @@ -181,7 +181,7 @@ private struct CategoryList: View { @Default(.libraryLanguageCodes) private var languageCodes @EnvironmentObject private var viewModel: LibraryViewModel @FetchRequest private var zimFiles: FetchedResults - + init(category: Binding, searchText: Binding) { self._category = category self._searchText = searchText @@ -198,7 +198,7 @@ private struct CategoryList: View { animation: .easeInOut ) } - + var body: some View { Group { if zimFiles.isEmpty { diff --git a/Views/Library/ZimFilesDownloads.swift b/Views/Library/ZimFilesDownloads.swift index 7d53069b3..fcefc6bd4 100644 --- a/Views/Library/ZimFilesDownloads.swift +++ b/Views/Library/ZimFilesDownloads.swift @@ -25,7 +25,7 @@ struct ZimFilesDownloads: View { sortDescriptors: [NSSortDescriptor(keyPath: \DownloadTask.created, ascending: false)], animation: .easeInOut ) private var downloadTasks: FetchedResults - + var body: some View { LazyVGrid( columns: ([GridItem(.adaptive(minimum: 250, maximum: 500), spacing: 12)]), diff --git a/Views/Library/ZimFilesNew.swift b/Views/Library/ZimFilesNew.swift index 69f713280..fa1fb5c29 100644 --- a/Views/Library/ZimFilesNew.swift +++ b/Views/Library/ZimFilesNew.swift @@ -34,7 +34,7 @@ struct ZimFilesNew: View { animation: .easeInOut ) private var zimFiles: FetchedResults @State private var searchText = "" - + var body: some View { LazyVGrid( columns: ([GridItem(.adaptive(minimum: 250, maximum: 500), spacing: 12)]), @@ -94,7 +94,7 @@ struct ZimFilesNew: View { } } } - + private static func buildPredicate(searchText: String) -> NSPredicate { var predicates = [ NSPredicate(format: "languageCode IN %@", Defaults[.libraryLanguageCodes]), diff --git a/Views/SearchResults.swift b/Views/SearchResults.swift index 3a47456a1..658ad9819 100644 --- a/Views/SearchResults.swift +++ b/Views/SearchResults.swift @@ -31,9 +31,9 @@ struct SearchResults: View { animation: .easeInOut ) private var zimFiles: FetchedResults @State private var isClearSearchConfirmationPresented = false - + private let openURL = NotificationCenter.default.publisher(for: .openURL) - + var body: some View { Group { if zimFiles.isEmpty { @@ -61,7 +61,7 @@ struct SearchResults: View { dismissSearch() } } - + @ViewBuilder var content: some View { if viewModel.inProgress { @@ -96,7 +96,7 @@ struct SearchResults: View { } } } - + var sidebar: some View { List { if !recentSearchTexts.isEmpty { @@ -134,7 +134,7 @@ struct SearchResults: View { } } } - + private var recentSearchHeader: some View { HStack { Text("search_result.header.text".localized) @@ -143,7 +143,7 @@ struct SearchResults: View { isClearSearchConfirmationPresented = true } label: { Text("search_result.button.clear".localized).font(.caption).fontWeight(.medium) - }.confirmationDialog("search_result.clear_dialog.title".localized, + }.confirmationDialog("search_result.clear_dialog.title".localized, isPresented: $isClearSearchConfirmationPresented) { Button("search_result.clear_dialog.button.all".localized, role: .destructive) { recentSearchTexts.removeAll() @@ -153,7 +153,7 @@ struct SearchResults: View { } } } - + private var searchFilterHeader: some View { HStack { Text("search_result.filter_hearder.text".localized) diff --git a/Views/Settings/About.swift b/Views/Settings/About.swift index daef45576..8f9ce1b2d 100644 --- a/Views/Settings/About.swift +++ b/Views/Settings/About.swift @@ -22,7 +22,7 @@ import CoreKiwix struct About: View { @State private var dependencies = [Dependency]() @State private var externalLinkURL: URL? - + var body: some View { #if os(macOS) VStack(spacing: 16) { @@ -87,43 +87,43 @@ struct About: View { .task { await getDependencies() } #endif } - + private var about: some View { Text(Brand.aboutText) } - + private var release: some View { Text("settings.about.license-description".localized) } - + private var appVersion: some View { Attribute(title: "settings.about.appverion.title".localized, detail: Bundle.main.infoDictionary?["CFBundleShortVersionString"] as? String) } - + private var buildNumber: some View { Attribute(title: "settings.about.build.title".localized, detail: Bundle.main.infoDictionary?["CFBundleVersion"] as? String) } - + private var ourWebsite: some View { Button("settings.about.our_website.button".localized) { externalLinkURL = URL(string: "\(Brand.aboutWebsite)") } } - + private var source: some View { Button("settings.about.source.title".localized) { externalLinkURL = URL(string: "https://github.com/kiwix/kiwix-apple") } } - + private var license: some View { Button("settings.about.button.license".localized) { externalLinkURL = URL(string: "https://www.gnu.org/licenses/gpl-3.0.en.html") } } - + private func getDependencies() async { dependencies = kiwix.getVersions().map { datum in Dependency(name: String(datum.first), version: String(datum.second)) @@ -133,10 +133,10 @@ struct About: View { private struct Dependency: Identifiable { var id: String { name } - + let name: String let version: String - + var license: String? { switch name { case "libkiwix": diff --git a/Views/Settings/LanguageSelector.swift b/Views/Settings/LanguageSelector.swift index b1c27933e..1ac802e5e 100644 --- a/Views/Settings/LanguageSelector.swift +++ b/Views/Settings/LanguageSelector.swift @@ -112,7 +112,7 @@ struct LanguageSelector: View { hiding.sort(by: Languages.compare(lhs:rhs:)) } } - + private func show(_ language: Language) { Defaults[.libraryLanguageCodes].insert(language.code) withAnimation { @@ -121,7 +121,7 @@ struct LanguageSelector: View { showing.sort(by: Languages.compare(lhs:rhs:)) } } - + private func hide(_ language: Language) { guard Defaults[.libraryLanguageCodes].count > 1 else { // we should not remove all languages, it will produce empty results @@ -138,7 +138,7 @@ struct LanguageSelector: View { private struct LanguageLabel: View { let language: Language - + var body: some View { HStack { Text(language.name).foregroundColor(.primary) @@ -157,7 +157,7 @@ class Languages { count.name = "count" count.expression = NSExpression(forFunction: "count:", arguments: [NSExpression(forKeyPath: "languageCode")]) count.expressionResultType = .integer16AttributeType - + let fetchRequest = NSFetchRequest(entityName: "ZimFile") // exclude the already downloaded files, they might have invalid language set // but we are mainly interested in fetched content @@ -165,7 +165,7 @@ class Languages { fetchRequest.propertiesToFetch = ["languageCode", count] fetchRequest.propertiesToGroupBy = ["languageCode"] fetchRequest.resultType = .dictionaryResultType - + let languages: [Language] = await withCheckedContinuation { continuation in let context = Database.shared.container.newBackgroundContext() context.perform { @@ -184,7 +184,7 @@ class Languages { } return languages } - + /// Compare two languages based on library language sorting order. /// Can be removed once support for iOS 14 drops. /// - Parameters: diff --git a/Views/Settings/Settings.swift b/Views/Settings/Settings.swift index 9db162c41..a4f25a1dc 100644 --- a/Views/Settings/Settings.swift +++ b/Views/Settings/Settings.swift @@ -24,7 +24,7 @@ struct ReadingSettings: View { @Default(.externalLinkLoadingPolicy) private var externalLinkLoadingPolicy @Default(.searchResultSnippetMode) private var searchResultSnippetMode @Default(.webViewPageZoom) private var webViewPageZoom - + var body: some View { VStack(spacing: 16) { SettingSection(name: "reading_settings.zoom.title".localized) { @@ -63,7 +63,7 @@ struct ReadingSettings: View { struct LibrarySettings: View { @Default(.libraryAutoRefresh) private var libraryAutoRefresh @EnvironmentObject private var library: LibraryViewModel - + var body: some View { VStack(spacing: 16) { SettingSection(name: "library_settings.catalog.title".localized, alignment: .top) { @@ -97,7 +97,7 @@ struct SettingSection: View { let name: String let alignment: VerticalAlignment var content: () -> Content - + init( name: String, alignment: VerticalAlignment = .firstTextBaseline, @@ -107,7 +107,7 @@ struct SettingSection: View { self.alignment = alignment self.content = content } - + var body: some View { HStack(alignment: alignment) { Text("\(name):").frame(width: 100, alignment: .trailing) @@ -127,11 +127,11 @@ struct Settings: View { @Default(.searchResultSnippetMode) private var searchResultSnippetMode @Default(.webViewPageZoom) private var webViewPageZoom @EnvironmentObject private var library: LibraryViewModel - + enum Route { case languageSelector, about } - + var body: some View { if FeatureFlags.hasLibrary { List { @@ -152,7 +152,7 @@ struct Settings: View { .navigationTitle("settings.navigation.title".localized) } } - + var readingSettings: some View { Section("reading_settings.tab.reading".localized) { Stepper(value: $webViewPageZoom, in: 0.5...2, step: 0.05) { @@ -175,7 +175,7 @@ struct Settings: View { } } } - + var librarySettings: some View { Section { NavigationLink { @@ -190,7 +190,7 @@ struct Settings: View { Text("library_settings.new-download-task-description".localized) } } - + var catalogSettings: some View { Section { HStack { @@ -216,7 +216,7 @@ struct Settings: View { Text("catalog_settings.footer.text".localized) }.onChange(of: libraryAutoRefresh) { LibraryOperations.applyLibraryAutoRefreshSetting(isEnabled: $0) } } - + var backupSettings: some View { Section { Toggle("backup_settings.toggle.title".localized, isOn: $backupDocumentDirectory) @@ -226,7 +226,7 @@ struct Settings: View { Text("backup_settings.footer.text".localized) }.onChange(of: backupDocumentDirectory) { LibraryOperations.applyFileBackupSetting(isEnabled: $0) } } - + var miscellaneous: some View { Section("settings.miscellaneous.title".localized) { Button("settings.miscellaneous.button.feedback".localized) { diff --git a/Views/ViewModifiers/AlertHandler.swift b/Views/ViewModifiers/AlertHandler.swift index 947bf1e86..6e944d0aa 100644 --- a/Views/ViewModifiers/AlertHandler.swift +++ b/Views/ViewModifiers/AlertHandler.swift @@ -19,9 +19,9 @@ import SwiftUI struct AlertHandler: ViewModifier { @State private var activeAlert: ActiveAlert? - + private let alert = NotificationCenter.default.publisher(for: .alert) - + func body(content: Content) -> some View { content.onReceive(alert) { notification in guard let rawValue = notification.userInfo?["rawValue"] as? String else { return } diff --git a/Views/ViewModifiers/BookmarkContextMenu.swift b/Views/ViewModifiers/BookmarkContextMenu.swift index d2f7bd837..dddca7112 100644 --- a/Views/ViewModifiers/BookmarkContextMenu.swift +++ b/Views/ViewModifiers/BookmarkContextMenu.swift @@ -19,9 +19,9 @@ import SwiftUI struct BookmarkContextMenu: ViewModifier { @Environment(\.managedObjectContext) private var managedObjectContext - + let bookmark: Bookmark - + func body(content: Content) -> some View { content.contextMenu { Button { diff --git a/Views/ViewModifiers/CellBackground.swift b/Views/ViewModifiers/CellBackground.swift index 9a1d66d4b..58b308ec6 100644 --- a/Views/ViewModifiers/CellBackground.swift +++ b/Views/ViewModifiers/CellBackground.swift @@ -19,15 +19,15 @@ import SwiftUI struct CellBackground: ViewModifier { @Environment(\.colorScheme) var colorScheme: ColorScheme - + let isHovering: Bool - + func body(content: Content) -> some View { content .background(backgroundColor) .clipShape(RoundedRectangle(cornerRadius: 12, style: .continuous)) } - + private var backgroundColor: Color { switch (colorScheme, isHovering) { case (.dark, true): diff --git a/Views/ViewModifiers/ExternalLinkHandler.swift b/Views/ViewModifiers/ExternalLinkHandler.swift index 54f4d0e02..af37a2205 100644 --- a/Views/ViewModifiers/ExternalLinkHandler.swift +++ b/Views/ViewModifiers/ExternalLinkHandler.swift @@ -24,17 +24,17 @@ struct ExternalLinkHandler: ViewModifier { @State private var activeAlert: ActiveAlert? @State private var activeSheet: ActiveSheet? @Binding var externalURL: URL? - + enum ActiveAlert { case ask(url: URL) case notLoading } - + enum ActiveSheet: Hashable, Identifiable { var id: Int { hashValue } case safari(url: URL) } - + func body(content: Content) -> some View { content.onChange(of: externalURL) { url in guard let url else { return } @@ -49,7 +49,7 @@ struct ExternalLinkHandler: ViewModifier { activeAlert = .notLoading } } - .alert("external_link_handler.alert.title".localized, + .alert("external_link_handler.alert.title".localized, isPresented: $isAlertPresented, presenting: activeAlert) { alert in if case .ask(let url) = alert { @@ -77,7 +77,7 @@ struct ExternalLinkHandler: ViewModifier { } #endif } - + private func load(url: URL) { #if os(macOS) NSWorkspace.shared.open(url) diff --git a/Views/ViewModifiers/FileImport.swift b/Views/ViewModifiers/FileImport.swift index 965d5e718..ecbbf5e9e 100644 --- a/Views/ViewModifiers/FileImport.swift +++ b/Views/ViewModifiers/FileImport.swift @@ -26,15 +26,15 @@ import UniformTypeIdentifiers /// and the multitab implementation on iOS / iPadOS does not support open multiple tabs with an url right now. struct OpenFileButton: View { @State private var isPresented: Bool = false - + let context: OpenFileContext let label: Label - + init(context: OpenFileContext, @ViewBuilder label: () -> Label) { self.context = context self.label = label() } - + var body: some View { Button { isPresented = false @@ -59,18 +59,18 @@ struct OpenFileButton: View { struct OpenFileHandler: ViewModifier { @State private var isAlertPresented = false @State private var activeAlert: ActiveAlert? - + private let importFiles = NotificationCenter.default.publisher(for: .openFiles) - + enum ActiveAlert { case unableToOpen(filenames: [String]) } - + func body(content: Content) -> some View { content.onReceive(importFiles) { notification in guard let urls = notification.userInfo?["urls"] as? [URL], let context = notification.userInfo?["context"] as? OpenFileContext else { return } - + // try open zim files var openedZimFileIDs = Set() var invalidURLs = Set() @@ -81,7 +81,7 @@ struct OpenFileHandler: ViewModifier { invalidURLs.insert(url) } } - + // action for zim files that can be opened (e.g. open main page) switch context { case .command, .file: @@ -103,13 +103,13 @@ struct OpenFileHandler: ViewModifier { default: break } - + // show alert if there are any files that cannot be opened if !invalidURLs.isEmpty { isAlertPresented = true activeAlert = .unableToOpen(filenames: invalidURLs.map({ $0.lastPathComponent })) } - }.alert("file_import.alert.no_open.title".localized, + }.alert("file_import.alert.no_open.title".localized, isPresented: $isAlertPresented, presenting: activeAlert) { _ in } message: { alert in switch alert { diff --git a/Views/ViewModifiers/GridCommon.swift b/Views/ViewModifiers/GridCommon.swift index f8470a375..8e22157d7 100644 --- a/Views/ViewModifiers/GridCommon.swift +++ b/Views/ViewModifiers/GridCommon.swift @@ -21,13 +21,13 @@ import SwiftUI struct GridCommon: ViewModifier { @Environment(\.horizontalSizeClass) var horizontalSizeClass @Environment(\.verticalSizeClass) var verticalSizeClass - + let edges: Edge.Set? - + init(edges: Edge.Set? = nil) { self.edges = edges } - + func body(content: Content) -> some View { #if os(macOS) ScrollView { diff --git a/Views/Welcome.swift b/Views/Welcome.swift index 0157fa04a..ca8e4255f 100644 --- a/Views/Welcome.swift +++ b/Views/Welcome.swift @@ -32,7 +32,7 @@ struct Welcome: View { animation: .easeInOut ) private var zimFiles: FetchedResults @State private var isLibraryPresented = false - + var body: some View { if zimFiles.isEmpty { HStack { @@ -103,7 +103,7 @@ struct Welcome: View { }.modifier(GridCommon(edges: .all)) } } - + /// App logo shown in onboarding view private var logo: some View { VStack(spacing: 6) { @@ -115,7 +115,7 @@ struct Welcome: View { Text(Brand.appName.uppercased()).font(.largeTitle).fontWeight(.bold) } } - + /// Onboarding actions, open a zim file or refresh catalog private var actions: some View { HStack { From a0267a71d7fc9783ce32fd69d02e341b799bd97a Mon Sep 17 00:00:00 2001 From: Emmanuel Engelhart Date: Sun, 31 Mar 2024 16:19:17 +0200 Subject: [PATCH 4/5] First AUTHORS file --- AUTHORS | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 AUTHORS diff --git a/AUTHORS b/AUTHORS new file mode 100644 index 000000000..fff5c165e --- /dev/null +++ b/AUTHORS @@ -0,0 +1,13 @@ +Automactic +BPH +rgaudin +Kelson +translatewiki.net +tvision251 +Alistair Findlay +codnee +Denis Gladkikh +Ernesto Cedeno +Julian Harty +quocduyvu6262 +Valentin Vila From ec98aae051d11504be187fd0b50ba6cc244c9741 Mon Sep 17 00:00:00 2001 From: Balazs Perlaki-Horvath Date: Sat, 6 Apr 2024 10:19:47 +0200 Subject: [PATCH 5/5] Update header style, add Xcode template, update XcodeGen --- App/App_iOS.swift | 30 +++++++++---------- App/App_macOS.swift | 30 +++++++++---------- App/CompactViewController.swift | 30 +++++++++---------- App/SidebarViewController.swift | 30 +++++++++---------- App/SplitViewController.swift | 30 +++++++++---------- IDETemplateMacros.plist | 21 +++++++++++++ Model/Brand.swift | 30 +++++++++---------- Model/CategoriesToLanguage.swift | 30 +++++++++---------- Model/DownloadService.swift | 30 +++++++++---------- Model/Entities/Entities.swift | 30 +++++++++---------- Model/Entities/Errors.swift | 30 +++++++++---------- Model/Entities/SearchResult.h | 30 +++++++++---------- Model/Entities/SearchResult.m | 30 +++++++++---------- Model/Entities/SearchResult.swift | 30 +++++++++---------- .../ZimFileMetaData/ZimFileMetaData.h | 30 +++++++++---------- .../ZimFileMetaData/ZimFileMetaData.mm | 30 +++++++++---------- Model/LanguagesConverter.swift | 30 +++++++++---------- Model/OPDSParser/OPDSParser.h | 30 +++++++++---------- Model/OPDSParser/OPDSParser.mm | 30 +++++++++---------- Model/OPDSParser/OPDSParser.swift | 30 +++++++++---------- Model/Utilities/AlphaCodesLookUpTable.swift | 30 +++++++++---------- Model/Utilities/FeatureFlags.swift | 30 +++++++++---------- Model/Utilities/InSync.swift | 30 +++++++++---------- Model/Utilities/Log.swift | 30 +++++++++---------- Model/Utilities/String+Extension.swift | 30 +++++++++---------- Model/Utilities/URL.swift | 30 +++++++++---------- Model/Utilities/WebKitHandler.swift | 30 +++++++++---------- Model/ZimFileService/ZimFileService.h | 30 +++++++++---------- Model/ZimFileService/ZimFileService.mm | 30 +++++++++---------- Model/ZimFileService/ZimFileService.swift | 30 +++++++++---------- Support/en.lproj/Localizable.strings | 30 +++++++++---------- SwiftUI/Model/Database.swift | 30 +++++++++---------- SwiftUI/Model/DefaultKeys.swift | 30 +++++++++---------- SwiftUI/Model/DirectoryMonitor.swift | 30 +++++++++---------- SwiftUI/Model/Enum.swift | 30 +++++++++---------- SwiftUI/Model/Formatter.swift | 30 +++++++++---------- SwiftUI/Model/HTMLParser.swift | 30 +++++++++---------- SwiftUI/Model/LibraryOperations.swift | 30 +++++++++---------- .../Model/SearchOperation/SearchOperation.h | 30 +++++++++---------- .../Model/SearchOperation/SearchOperation.mm | 30 +++++++++---------- .../SearchOperation/SearchOperation.swift | 30 +++++++++---------- SwiftUI/Model/ZimMigration.swift | 30 +++++++++---------- SwiftUI/Patches.swift | 30 +++++++++---------- Tests/BookmarkMigrationTests.swift | 30 +++++++++---------- Tests/LanguagesConverterTests.swift | 30 +++++++++---------- Tests/LibraryRefreshViewModelTest.swift | 30 +++++++++---------- Tests/NavigationViewModelTest.swift | 30 +++++++++---------- Tests/OPDSParserTests.swift | 30 +++++++++---------- ViewModel/BrowserViewModel.swift | 30 +++++++++---------- ViewModel/LibraryViewModel.swift | 30 +++++++++---------- ViewModel/NavigationViewModel.swift | 30 +++++++++---------- ViewModel/SearchViewModel.swift | 30 +++++++++---------- Views/Bookmarks.swift | 30 +++++++++---------- Views/BrowserTab.swift | 30 +++++++++---------- Views/BuildingBlocks/ArticleCell.swift | 30 +++++++++---------- Views/BuildingBlocks/Attribute.swift | 30 +++++++++---------- Views/BuildingBlocks/Favicon.swift | 30 +++++++++---------- Views/BuildingBlocks/FlavorTag.swift | 30 +++++++++---------- Views/BuildingBlocks/GridSection.swift | 30 +++++++++---------- .../LibraryLastRefreshTime.swift | 30 +++++++++---------- Views/BuildingBlocks/LoadingView.swift | 30 +++++++++---------- Views/BuildingBlocks/Message.swift | 30 +++++++++---------- Views/BuildingBlocks/SafariView.swift | 30 +++++++++---------- Views/BuildingBlocks/SearchResultRow.swift | 30 +++++++++---------- Views/BuildingBlocks/SheetContent.swift | 30 +++++++++---------- Views/BuildingBlocks/TabLabel.swift | 30 +++++++++---------- Views/BuildingBlocks/WebView.swift | 30 +++++++++---------- Views/BuildingBlocks/ZimFileCell.swift | 30 +++++++++---------- .../ZimFileMissingIndicator.swift | 30 +++++++++---------- Views/BuildingBlocks/ZimFileRow.swift | 30 +++++++++---------- Views/Buttons/ArticleShortcutButtons.swift | 30 +++++++++---------- Views/Buttons/BookmarkButton.swift | 30 +++++++++---------- Views/Buttons/NavigationButtons.swift | 30 +++++++++---------- Views/Buttons/OutlineButton.swift | 30 +++++++++---------- Views/Buttons/TabsManagerButton.swift | 30 +++++++++---------- Views/Commands.swift | 30 +++++++++---------- Views/Library/Library.swift | 30 +++++++++---------- Views/Library/ZimFileDetail.swift | 30 +++++++++---------- Views/Library/ZimFilesCategories.swift | 30 +++++++++---------- Views/Library/ZimFilesDownloads.swift | 30 +++++++++---------- Views/Library/ZimFilesNew.swift | 30 +++++++++---------- Views/Library/ZimFilesOpened.swift | 30 +++++++++---------- Views/SearchResults.swift | 30 +++++++++---------- Views/Settings/About.swift | 30 +++++++++---------- Views/Settings/LanguageSelector.swift | 30 +++++++++---------- Views/Settings/Settings.swift | 30 +++++++++---------- Views/ViewModifiers/AlertHandler.swift | 30 +++++++++---------- Views/ViewModifiers/CellBackground.swift | 30 +++++++++---------- Views/ViewModifiers/ExternalLinkHandler.swift | 30 +++++++++---------- Views/ViewModifiers/FileImport.swift | 30 +++++++++---------- Views/ViewModifiers/GridCommon.swift | 30 +++++++++---------- Views/ViewModifiers/ViewModifiers.swift | 30 +++++++++---------- Views/Welcome.swift | 30 +++++++++---------- project.yml | 1 + 94 files changed, 1310 insertions(+), 1472 deletions(-) create mode 100644 IDETemplateMacros.plist diff --git a/App/App_iOS.swift b/App/App_iOS.swift index 8829cd6c8..54cd06c8f 100644 --- a/App/App_iOS.swift +++ b/App/App_iOS.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI import UserNotifications diff --git a/App/App_macOS.swift b/App/App_macOS.swift index ed4a56e84..318b33204 100644 --- a/App/App_macOS.swift +++ b/App/App_macOS.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI import UserNotifications diff --git a/App/CompactViewController.swift b/App/CompactViewController.swift index d1c422b28..aca21162e 100644 --- a/App/CompactViewController.swift +++ b/App/CompactViewController.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // CompactViewController.swift diff --git a/App/SidebarViewController.swift b/App/SidebarViewController.swift index 8dd95f6c8..58084bef6 100644 --- a/App/SidebarViewController.swift +++ b/App/SidebarViewController.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #if os(iOS) import CoreData diff --git a/App/SplitViewController.swift b/App/SplitViewController.swift index ac61984ba..135710b53 100644 --- a/App/SplitViewController.swift +++ b/App/SplitViewController.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #if os(iOS) import Combine diff --git a/IDETemplateMacros.plist b/IDETemplateMacros.plist new file mode 100644 index 000000000..fbd6f3d84 --- /dev/null +++ b/IDETemplateMacros.plist @@ -0,0 +1,21 @@ + + + + + FILEHEADER + This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. + + diff --git a/Model/Brand.swift b/Model/Brand.swift index 119cd84b8..b9df76374 100644 --- a/Model/Brand.swift +++ b/Model/Brand.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation import os diff --git a/Model/CategoriesToLanguage.swift b/Model/CategoriesToLanguage.swift index 242c5d887..030409d3f 100644 --- a/Model/CategoriesToLanguage.swift +++ b/Model/CategoriesToLanguage.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // CategoriesToLanguage.swift diff --git a/Model/DownloadService.swift b/Model/DownloadService.swift index 74659eb8b..011549702 100644 --- a/Model/DownloadService.swift +++ b/Model/DownloadService.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // DownloadService.swift diff --git a/Model/Entities/Entities.swift b/Model/Entities/Entities.swift index 5beeb368e..eee7001df 100644 --- a/Model/Entities/Entities.swift +++ b/Model/Entities/Entities.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Combine import CoreData diff --git a/Model/Entities/Errors.swift b/Model/Entities/Errors.swift index d97898790..d699ed14c 100644 --- a/Model/Entities/Errors.swift +++ b/Model/Entities/Errors.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/Model/Entities/SearchResult.h b/Model/Entities/SearchResult.h index 4b1c94e80..508b7f509 100644 --- a/Model/Entities/SearchResult.h +++ b/Model/Entities/SearchResult.h @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import diff --git a/Model/Entities/SearchResult.m b/Model/Entities/SearchResult.m index 0183524a8..8baeaacf4 100644 --- a/Model/Entities/SearchResult.m +++ b/Model/Entities/SearchResult.m @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import "SearchResult.h" diff --git a/Model/Entities/SearchResult.swift b/Model/Entities/SearchResult.swift index 188344bb8..77422e0fd 100644 --- a/Model/Entities/SearchResult.swift +++ b/Model/Entities/SearchResult.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. extension SearchResult: Identifiable { public var id: Int { hashValue } diff --git a/Model/Entities/ZimFileMetaData/ZimFileMetaData.h b/Model/Entities/ZimFileMetaData/ZimFileMetaData.h index 3d50e9cc8..6f2efd757 100644 --- a/Model/Entities/ZimFileMetaData/ZimFileMetaData.h +++ b/Model/Entities/ZimFileMetaData/ZimFileMetaData.h @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import diff --git a/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm b/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm index 67500e493..467bf30d4 100644 --- a/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm +++ b/Model/Entities/ZimFileMetaData/ZimFileMetaData.mm @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" diff --git a/Model/LanguagesConverter.swift b/Model/LanguagesConverter.swift index 80dd0c627..47bbc0b2b 100644 --- a/Model/LanguagesConverter.swift +++ b/Model/LanguagesConverter.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // Languages.swift diff --git a/Model/OPDSParser/OPDSParser.h b/Model/OPDSParser/OPDSParser.h index 8d86a8061..ae6b69457 100644 --- a/Model/OPDSParser/OPDSParser.h +++ b/Model/OPDSParser/OPDSParser.h @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import #import "ZimFileMetaData.h" diff --git a/Model/OPDSParser/OPDSParser.mm b/Model/OPDSParser/OPDSParser.mm index 613ac9541..4a3dd972f 100644 --- a/Model/OPDSParser/OPDSParser.mm +++ b/Model/OPDSParser/OPDSParser.mm @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdocumentation" diff --git a/Model/OPDSParser/OPDSParser.swift b/Model/OPDSParser/OPDSParser.swift index f55015651..5edbd842a 100644 --- a/Model/OPDSParser/OPDSParser.swift +++ b/Model/OPDSParser/OPDSParser.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. protocol Parser { var zimFileIDs: Set { get } diff --git a/Model/Utilities/AlphaCodesLookUpTable.swift b/Model/Utilities/AlphaCodesLookUpTable.swift index 3c5e1a5b9..9aa59b057 100644 --- a/Model/Utilities/AlphaCodesLookUpTable.swift +++ b/Model/Utilities/AlphaCodesLookUpTable.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // AlphaCodesLookUpTable.swift diff --git a/Model/Utilities/FeatureFlags.swift b/Model/Utilities/FeatureFlags.swift index aac5d644a..d7d2b3580 100644 --- a/Model/Utilities/FeatureFlags.swift +++ b/Model/Utilities/FeatureFlags.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/Model/Utilities/InSync.swift b/Model/Utilities/InSync.swift index cf9b369c0..a805ce221 100644 --- a/Model/Utilities/InSync.swift +++ b/Model/Utilities/InSync.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // InSync.swift diff --git a/Model/Utilities/Log.swift b/Model/Utilities/Log.swift index cc1e53cda..42130830f 100644 --- a/Model/Utilities/Log.swift +++ b/Model/Utilities/Log.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import os diff --git a/Model/Utilities/String+Extension.swift b/Model/Utilities/String+Extension.swift index 0e65b75dd..6b3b52d32 100644 --- a/Model/Utilities/String+Extension.swift +++ b/Model/Utilities/String+Extension.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/Model/Utilities/URL.swift b/Model/Utilities/URL.swift index 17c95cd2c..85afa565b 100644 --- a/Model/Utilities/URL.swift +++ b/Model/Utilities/URL.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/Model/Utilities/WebKitHandler.swift b/Model/Utilities/WebKitHandler.swift index 7ef5282bc..42652e65d 100644 --- a/Model/Utilities/WebKitHandler.swift +++ b/Model/Utilities/WebKitHandler.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import os import WebKit diff --git a/Model/ZimFileService/ZimFileService.h b/Model/ZimFileService/ZimFileService.h index 37efafcf6..3cb034c61 100644 --- a/Model/ZimFileService/ZimFileService.h +++ b/Model/ZimFileService/ZimFileService.h @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import #import "ZimFileMetaData.h" diff --git a/Model/ZimFileService/ZimFileService.mm b/Model/ZimFileService/ZimFileService.mm index 43c7fd3d1..5437f65f0 100644 --- a/Model/ZimFileService/ZimFileService.mm +++ b/Model/ZimFileService/ZimFileService.mm @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #include diff --git a/Model/ZimFileService/ZimFileService.swift b/Model/ZimFileService/ZimFileService.swift index 35272ae5f..fe660c567 100644 --- a/Model/ZimFileService/ZimFileService.swift +++ b/Model/ZimFileService/ZimFileService.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. /// A service to interact with zim files extension ZimFileService { diff --git a/Support/en.lproj/Localizable.strings b/Support/en.lproj/Localizable.strings index 4e8df13ab..450b5fff0 100644 --- a/Support/en.lproj/Localizable.strings +++ b/Support/en.lproj/Localizable.strings @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. /* Library Refresh Error */ "library_refresh_error.retrieve.description" = "Error retrieving library data."; diff --git a/SwiftUI/Model/Database.swift b/SwiftUI/Model/Database.swift index bbc4c5ccc..f7c76a54b 100644 --- a/SwiftUI/Model/Database.swift +++ b/SwiftUI/Model/Database.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import os diff --git a/SwiftUI/Model/DefaultKeys.swift b/SwiftUI/Model/DefaultKeys.swift index a1fa1e1e0..2fb06bd8a 100644 --- a/SwiftUI/Model/DefaultKeys.swift +++ b/SwiftUI/Model/DefaultKeys.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Defaults import Foundation diff --git a/SwiftUI/Model/DirectoryMonitor.swift b/SwiftUI/Model/DirectoryMonitor.swift index f7e98159b..1212a065d 100644 --- a/SwiftUI/Model/DirectoryMonitor.swift +++ b/SwiftUI/Model/DirectoryMonitor.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/SwiftUI/Model/Enum.swift b/SwiftUI/Model/Enum.swift index 3b4755232..36537bf8a 100644 --- a/SwiftUI/Model/Enum.swift +++ b/SwiftUI/Model/Enum.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import MapKit diff --git a/SwiftUI/Model/Formatter.swift b/SwiftUI/Model/Formatter.swift index d671dd456..24450c1ee 100644 --- a/SwiftUI/Model/Formatter.swift +++ b/SwiftUI/Model/Formatter.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation diff --git a/SwiftUI/Model/HTMLParser.swift b/SwiftUI/Model/HTMLParser.swift index 7696af0f2..7b7804e65 100644 --- a/SwiftUI/Model/HTMLParser.swift +++ b/SwiftUI/Model/HTMLParser.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreLocation import NaturalLanguage diff --git a/SwiftUI/Model/LibraryOperations.swift b/SwiftUI/Model/LibraryOperations.swift index e8a1ad52c..b2dad67a9 100644 --- a/SwiftUI/Model/LibraryOperations.swift +++ b/SwiftUI/Model/LibraryOperations.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #if canImport(BackgroundTasks) import BackgroundTasks diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.h b/SwiftUI/Model/SearchOperation/SearchOperation.h index b59ecc781..4c4199f1b 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.h +++ b/SwiftUI/Model/SearchOperation/SearchOperation.h @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #import diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.mm b/SwiftUI/Model/SearchOperation/SearchOperation.mm index 119b84070..11714698a 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.mm +++ b/SwiftUI/Model/SearchOperation/SearchOperation.mm @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. #include diff --git a/SwiftUI/Model/SearchOperation/SearchOperation.swift b/SwiftUI/Model/SearchOperation/SearchOperation.swift index e972e6838..737a9fc47 100644 --- a/SwiftUI/Model/SearchOperation/SearchOperation.swift +++ b/SwiftUI/Model/SearchOperation/SearchOperation.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Defaults diff --git a/SwiftUI/Model/ZimMigration.swift b/SwiftUI/Model/ZimMigration.swift index 858582df1..0ce2fbf3f 100644 --- a/SwiftUI/Model/ZimMigration.swift +++ b/SwiftUI/Model/ZimMigration.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // ZimMigration.swift diff --git a/SwiftUI/Patches.swift b/SwiftUI/Patches.swift index 54fc486e4..0d633e902 100644 --- a/SwiftUI/Patches.swift +++ b/SwiftUI/Patches.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Foundation import SwiftUI diff --git a/Tests/BookmarkMigrationTests.swift b/Tests/BookmarkMigrationTests.swift index febf17771..2afbdfd24 100644 --- a/Tests/BookmarkMigrationTests.swift +++ b/Tests/BookmarkMigrationTests.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // BookmarkMigrationTests.swift diff --git a/Tests/LanguagesConverterTests.swift b/Tests/LanguagesConverterTests.swift index 58ed20d8d..f03263118 100644 --- a/Tests/LanguagesConverterTests.swift +++ b/Tests/LanguagesConverterTests.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // LanguagesConverterTests.swift diff --git a/Tests/LibraryRefreshViewModelTest.swift b/Tests/LibraryRefreshViewModelTest.swift index 7fecf078f..fad69f8ab 100644 --- a/Tests/LibraryRefreshViewModelTest.swift +++ b/Tests/LibraryRefreshViewModelTest.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import XCTest diff --git a/Tests/NavigationViewModelTest.swift b/Tests/NavigationViewModelTest.swift index e778240e5..2e4d0f8e6 100644 --- a/Tests/NavigationViewModelTest.swift +++ b/Tests/NavigationViewModelTest.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. // // NavigationViewModelTest.swift diff --git a/Tests/OPDSParserTests.swift b/Tests/OPDSParserTests.swift index 9f20a4f4c..5888ff585 100644 --- a/Tests/OPDSParserTests.swift +++ b/Tests/OPDSParserTests.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import XCTest @testable import Kiwix diff --git a/ViewModel/BrowserViewModel.swift b/ViewModel/BrowserViewModel.swift index 128a149b3..60033b67f 100644 --- a/ViewModel/BrowserViewModel.swift +++ b/ViewModel/BrowserViewModel.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Combine import CoreData diff --git a/ViewModel/LibraryViewModel.swift b/ViewModel/LibraryViewModel.swift index df864dd48..6fa23cd6f 100644 --- a/ViewModel/LibraryViewModel.swift +++ b/ViewModel/LibraryViewModel.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import os diff --git a/ViewModel/NavigationViewModel.swift b/ViewModel/NavigationViewModel.swift index 958e71925..8491bddb4 100644 --- a/ViewModel/NavigationViewModel.swift +++ b/ViewModel/NavigationViewModel.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import WebKit diff --git a/ViewModel/SearchViewModel.swift b/ViewModel/SearchViewModel.swift index 9f46c6f57..446ed70c6 100644 --- a/ViewModel/SearchViewModel.swift +++ b/ViewModel/SearchViewModel.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Combine import CoreData diff --git a/Views/Bookmarks.swift b/Views/Bookmarks.swift index 4398a3fcd..69141564e 100644 --- a/Views/Bookmarks.swift +++ b/Views/Bookmarks.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BrowserTab.swift b/Views/BrowserTab.swift index ad63f758c..62c4c95cc 100644 --- a/Views/BrowserTab.swift +++ b/Views/BrowserTab.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/ArticleCell.swift b/Views/BuildingBlocks/ArticleCell.swift index 29e5e22f5..41bcf599a 100644 --- a/Views/BuildingBlocks/ArticleCell.swift +++ b/Views/BuildingBlocks/ArticleCell.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/Attribute.swift b/Views/BuildingBlocks/Attribute.swift index 2639dacfd..b3002e80d 100644 --- a/Views/BuildingBlocks/Attribute.swift +++ b/Views/BuildingBlocks/Attribute.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/Favicon.swift b/Views/BuildingBlocks/Favicon.swift index f2e4f7be1..7d8e1c1a9 100644 --- a/Views/BuildingBlocks/Favicon.swift +++ b/Views/BuildingBlocks/Favicon.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/FlavorTag.swift b/Views/BuildingBlocks/FlavorTag.swift index cb490dac2..def744f84 100644 --- a/Views/BuildingBlocks/FlavorTag.swift +++ b/Views/BuildingBlocks/FlavorTag.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/GridSection.swift b/Views/BuildingBlocks/GridSection.swift index 9b9e6dc44..553b13210 100644 --- a/Views/BuildingBlocks/GridSection.swift +++ b/Views/BuildingBlocks/GridSection.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/LibraryLastRefreshTime.swift b/Views/BuildingBlocks/LibraryLastRefreshTime.swift index 46023918e..4607edcb3 100644 --- a/Views/BuildingBlocks/LibraryLastRefreshTime.swift +++ b/Views/BuildingBlocks/LibraryLastRefreshTime.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/LoadingView.swift b/Views/BuildingBlocks/LoadingView.swift index 6403b113f..1d92e3805 100644 --- a/Views/BuildingBlocks/LoadingView.swift +++ b/Views/BuildingBlocks/LoadingView.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/Message.swift b/Views/BuildingBlocks/Message.swift index b2364c586..2c9c3877b 100644 --- a/Views/BuildingBlocks/Message.swift +++ b/Views/BuildingBlocks/Message.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/SafariView.swift b/Views/BuildingBlocks/SafariView.swift index c081de375..d051a4102 100644 --- a/Views/BuildingBlocks/SafariView.swift +++ b/Views/BuildingBlocks/SafariView.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SafariServices import SwiftUI diff --git a/Views/BuildingBlocks/SearchResultRow.swift b/Views/BuildingBlocks/SearchResultRow.swift index 0258e71a3..0f91117e9 100644 --- a/Views/BuildingBlocks/SearchResultRow.swift +++ b/Views/BuildingBlocks/SearchResultRow.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/SheetContent.swift b/Views/BuildingBlocks/SheetContent.swift index 30d42d52b..7ab299c8b 100644 --- a/Views/BuildingBlocks/SheetContent.swift +++ b/Views/BuildingBlocks/SheetContent.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/TabLabel.swift b/Views/BuildingBlocks/TabLabel.swift index 973032f7e..9761e56d7 100644 --- a/Views/BuildingBlocks/TabLabel.swift +++ b/Views/BuildingBlocks/TabLabel.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/WebView.swift b/Views/BuildingBlocks/WebView.swift index 798be6a8a..9d14e55d4 100644 --- a/Views/BuildingBlocks/WebView.swift +++ b/Views/BuildingBlocks/WebView.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import Combine import CoreData diff --git a/Views/BuildingBlocks/ZimFileCell.swift b/Views/BuildingBlocks/ZimFileCell.swift index 9f1895d1f..4ea31b290 100644 --- a/Views/BuildingBlocks/ZimFileCell.swift +++ b/Views/BuildingBlocks/ZimFileCell.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import SwiftUI diff --git a/Views/BuildingBlocks/ZimFileMissingIndicator.swift b/Views/BuildingBlocks/ZimFileMissingIndicator.swift index 2bd2b387d..3d0553dcd 100644 --- a/Views/BuildingBlocks/ZimFileMissingIndicator.swift +++ b/Views/BuildingBlocks/ZimFileMissingIndicator.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/BuildingBlocks/ZimFileRow.swift b/Views/BuildingBlocks/ZimFileRow.swift index acd243eb6..63b26eb42 100644 --- a/Views/BuildingBlocks/ZimFileRow.swift +++ b/Views/BuildingBlocks/ZimFileRow.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import SwiftUI diff --git a/Views/Buttons/ArticleShortcutButtons.swift b/Views/Buttons/ArticleShortcutButtons.swift index b6eae3d1a..87a4fb68e 100644 --- a/Views/Buttons/ArticleShortcutButtons.swift +++ b/Views/Buttons/ArticleShortcutButtons.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Buttons/BookmarkButton.swift b/Views/Buttons/BookmarkButton.swift index 33214bf02..81b5c0138 100644 --- a/Views/Buttons/BookmarkButton.swift +++ b/Views/Buttons/BookmarkButton.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Buttons/NavigationButtons.swift b/Views/Buttons/NavigationButtons.swift index 5c8229f4a..3ad552113 100644 --- a/Views/Buttons/NavigationButtons.swift +++ b/Views/Buttons/NavigationButtons.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Buttons/OutlineButton.swift b/Views/Buttons/OutlineButton.swift index 195dab1a3..13d65b163 100644 --- a/Views/Buttons/OutlineButton.swift +++ b/Views/Buttons/OutlineButton.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Buttons/TabsManagerButton.swift b/Views/Buttons/TabsManagerButton.swift index ce6605b74..c3c160037 100644 --- a/Views/Buttons/TabsManagerButton.swift +++ b/Views/Buttons/TabsManagerButton.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Commands.swift b/Views/Commands.swift index 50e627367..3b47d353e 100644 --- a/Views/Commands.swift +++ b/Views/Commands.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Library/Library.swift b/Views/Library/Library.swift index 1c7373288..5f7569be9 100644 --- a/Views/Library/Library.swift +++ b/Views/Library/Library.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI import UniformTypeIdentifiers diff --git a/Views/Library/ZimFileDetail.swift b/Views/Library/ZimFileDetail.swift index 1489e7e06..003fa6c5e 100644 --- a/Views/Library/ZimFileDetail.swift +++ b/Views/Library/ZimFileDetail.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import SwiftUI diff --git a/Views/Library/ZimFilesCategories.swift b/Views/Library/ZimFilesCategories.swift index 1689dcb98..a29ac4b26 100644 --- a/Views/Library/ZimFilesCategories.swift +++ b/Views/Library/ZimFilesCategories.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Library/ZimFilesDownloads.swift b/Views/Library/ZimFilesDownloads.swift index fcefc6bd4..5694a2b20 100644 --- a/Views/Library/ZimFilesDownloads.swift +++ b/Views/Library/ZimFilesDownloads.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import SwiftUI diff --git a/Views/Library/ZimFilesNew.swift b/Views/Library/ZimFilesNew.swift index fa1fb5c29..f014c7db6 100644 --- a/Views/Library/ZimFilesNew.swift +++ b/Views/Library/ZimFilesNew.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Library/ZimFilesOpened.swift b/Views/Library/ZimFilesOpened.swift index 4bd738ba3..763fbb32a 100644 --- a/Views/Library/ZimFilesOpened.swift +++ b/Views/Library/ZimFilesOpened.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI import UniformTypeIdentifiers diff --git a/Views/SearchResults.swift b/Views/SearchResults.swift index 658ad9819..8f062b41a 100644 --- a/Views/SearchResults.swift +++ b/Views/SearchResults.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Settings/About.swift b/Views/Settings/About.swift index 8f9ce1b2d..60d7602a6 100644 --- a/Views/Settings/About.swift +++ b/Views/Settings/About.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Settings/LanguageSelector.swift b/Views/Settings/LanguageSelector.swift index 1ac802e5e..6a970e1c2 100644 --- a/Views/Settings/LanguageSelector.swift +++ b/Views/Settings/LanguageSelector.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import CoreData import SwiftUI diff --git a/Views/Settings/Settings.swift b/Views/Settings/Settings.swift index a4f25a1dc..9a467ffb1 100644 --- a/Views/Settings/Settings.swift +++ b/Views/Settings/Settings.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/ViewModifiers/AlertHandler.swift b/Views/ViewModifiers/AlertHandler.swift index 6e944d0aa..69fd70791 100644 --- a/Views/ViewModifiers/AlertHandler.swift +++ b/Views/ViewModifiers/AlertHandler.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/ViewModifiers/CellBackground.swift b/Views/ViewModifiers/CellBackground.swift index 58b308ec6..c2cffe641 100644 --- a/Views/ViewModifiers/CellBackground.swift +++ b/Views/ViewModifiers/CellBackground.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/ViewModifiers/ExternalLinkHandler.swift b/Views/ViewModifiers/ExternalLinkHandler.swift index af37a2205..f3fe0050c 100644 --- a/Views/ViewModifiers/ExternalLinkHandler.swift +++ b/Views/ViewModifiers/ExternalLinkHandler.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/ViewModifiers/FileImport.swift b/Views/ViewModifiers/FileImport.swift index ecbbf5e9e..6b060f593 100644 --- a/Views/ViewModifiers/FileImport.swift +++ b/Views/ViewModifiers/FileImport.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI import UniformTypeIdentifiers diff --git a/Views/ViewModifiers/GridCommon.swift b/Views/ViewModifiers/GridCommon.swift index 8e22157d7..c303355c6 100644 --- a/Views/ViewModifiers/GridCommon.swift +++ b/Views/ViewModifiers/GridCommon.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/ViewModifiers/ViewModifiers.swift b/Views/ViewModifiers/ViewModifiers.swift index 9b5c1d578..13e0e4485 100644 --- a/Views/ViewModifiers/ViewModifiers.swift +++ b/Views/ViewModifiers/ViewModifiers.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/Views/Welcome.swift b/Views/Welcome.swift index ca8e4255f..b0094fdc4 100644 --- a/Views/Welcome.swift +++ b/Views/Welcome.swift @@ -1,19 +1,17 @@ -/* - * This file is part of Kiwix for iOS & macOS. - * - * Kiwix is free software; you can redistribute it and/or modify it - * under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 3 of the License, or - * any later version. - * - * Kiwix is distributed in the hope that it will be useful, but - * WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU - * General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with Kiwix; If not, see https://www.gnu.org/licenses/. -*/ +// This file is part of Kiwix for iOS & macOS. +// +// Kiwix is free software; you can redistribute it and/or modify it +// under the terms of the GNU General Public License as published by +// the Free Software Foundation; either version 3 of the License, or +// any later version. +// +// Kiwix is distributed in the hope that it will be useful, but +// WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +// General Public License for more details. +// +// You should have received a copy of the GNU General Public License +// along with Kiwix; If not, see https://www.gnu.org/licenses/. import SwiftUI diff --git a/project.yml b/project.yml index ee578fb95..daf9cbec0 100644 --- a/project.yml +++ b/project.yml @@ -7,6 +7,7 @@ options: generateEmptyDirectories: true useTabs: false groupSortPosition: top + postGenCommand: cp IDETemplateMacros.plist Kiwix.xcodeproj/xcshareddata/ settings: base: