packages feed

pinboard-notes-backup 1.0.5.7 → 1.0.6

raw patch · 8 files changed

+54/−29 lines, 8 filesdep +tlsdep ~aesondep ~bytestringdep ~containers

Dependencies added: tls

Dependency ranges changed: aeson, bytestring, containers, text, time

Files

CHANGELOG.md view
@@ -4,6 +4,11 @@  [PVP]: https://pvp.haskell.org/ +## 1.0.6 (2025-02-01)++- If the database contains two notes with the same ID, the program will now abort rather than try to update any of them. (A database constraint should have prevented this situation from ever occurring; this is more of a “belt and braces” change than anything.)+- The application now builds against a wider range of dependencies.+ ## 1.0.5.7 (2024-01-16)  The program now builds against a wider set of dependencies. There were no changes in functionality.
README.md view
@@ -28,7 +28,7 @@  ### Manual installation -Prebuilt binaries are available for OS X and Linux—find them on [the page for the most recent release][release]. To install the program from one of these,+Prebuilt binaries are available for macOS and Linux—find them on [the page for the most recent release][release]. To install the program from one of these,  1. Download the archive for your OS and unpack it. @@ -41,13 +41,13 @@ 4. *Optional:* Generate and install a Bash completion script by running         mkdir -p /usr/local/etc/bash_completion.d-       pnbackup --bash-completion-script $(which pnbackup) > \+       pnbackup --bash-completion-script "$(which pnbackup)" > \            /usr/local/etc/bash_completion.d/pnbackup.bash  5. *Optional:* Generate and install a Zsh completion script by running         mkdir -p /usr/local/share/zsh/site-functions-       pnbackup --zsh-completion-script $(which pnbackup) > \+       pnbackup --zsh-completion-script "$(which pnbackup)" > \            /usr/local/share/zsh/site-functions/_pnbackup  [release]: https://github.com/bdesham/pinboard-notes-backup/releases/latest@@ -60,19 +60,20 @@  to download and install GHC (the Haskell compiler) and then -    stack install+    stack install --local-bin-path=/usr/local/bin -to build the `pnbackup` binary and install it. (The default installation directory is `~/.local/bin`; pass an argument like `--local-bin-path=/usr/local/bin` to change this.)+to build the `pnbackup` binary and install it. You may of course specify a different installation directory if you wish.  [Stack]: http://docs.haskellstack.org/en/stable/README/  You can also build the project with cabal-install, but I’m less familiar with that approach. -This project [uses GitHub Actions][actions] for automated building. The build is checked on the latest versions of macOS and Ubuntu Linux, with various combinations of Stack, cabal-install, and GHC 8.6.x, 8.8.x, 8.10.x, and 9.0.x. The project does *not* currently build under GHC 9.2.x because of [a temporary incompatibility] between [req] and that GHC version.+> [!WARNING]+> The project currently doesn’t build with cabal-install: the tool isn’t able to satisfy all of the version requirements given in the cabal file. It’s possible that some manual intervention could guide cabal-install toward a solution, but I’m not sure. The sticking point is the `tls < 2.0` constraint that prevents issue #1 from occurring at runtime. +This project [uses GitHub Actions][actions] for automated building. The build is checked on the latest versions of macOS and Ubuntu Linux, with various combinations of Stack, cabal-install, and GHC 8.6 through 9.8.+ [actions]: https://github.com/bdesham/pinboard-notes-backup/actions-[a temporary incompatibility]: https://github.com/mrkkrp/req/pull/125-[req]: https://github.com/mrkkrp/req  ## Usage @@ -141,7 +142,7 @@  ## License -Copyright © 2016–2017, 2019, 2021–2024 Benjamin D. Esham.+Copyright © 2016–2017, 2019, 2021–2025 Benjamin D. Esham.  This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. 
man/pnbackup.1 view
@@ -121,7 +121,7 @@ <https://github.com/bdesham/pinboard-notes-backup>. .SH LICENSE .PP-Copyright \[co] 2016\[en]2017, 2019, 2021\[en]2024 Benjamin D.\ Esham.+Copyright \[co] 2016\[en]2017, 2019, 2021\[en]2025 Benjamin D.\ Esham. .PP This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the
pinboard-notes-backup.cabal view
@@ -1,5 +1,5 @@ name:                pinboard-notes-backup-version:             1.0.5.7+version:             1.0.6 synopsis:            Back up the notes you've saved to Pinboard description:         A command-line application to back up your notes from the                      Pinboard bookmarking service to a local SQLite database.@@ -8,7 +8,7 @@ license-file:        LICENSE.txt author:              Benjamin Esham maintainer:          benjamin@esham.io-copyright:           2016-2017, 2019, 2021-2024 Benjamin D. Esham+copyright:           2016-2017, 2019, 2021-2025 Benjamin D. Esham category:            Backup, CLI, Pinboard build-type:          Simple cabal-version:       >= 1.10@@ -28,18 +28,19 @@   other-modules:       Paths_pinboard_notes_backup Pinboard Types Utils Utils.FriendlyReqError   default-language:    Haskell2010   build-depends:       base                   >= 4.7  && < 5-                       , aeson                >= 0.8  && < 2.2+                       , aeson                >= 0.8  && < 2.3                        , ansi-wl-pprint       >= 0.6  && < 1.1-                       , bytestring           >= 0.10 && < 0.12-                       , containers           >= 0.5  && < 0.7+                       , bytestring           >= 0.10 && < 0.13+                       , containers           >= 0.5  && < 0.8                        , http-client          >= 0.5  && < 0.8                        , http-types           >= 0.12 && < 0.13                        , mtl                  >= 2.2  && < 2.4                        , optparse-applicative >= 0.11 && < 0.19                        , req                  >= 1.0  && < 3.14                        , sqlite-simple        >= 0.4  && < 0.5-                       , text                 >= 1.2  && < 2.1-                       , time                 >= 1.5  && < 1.13+                       , text                 >= 1.2  && < 2.2+                       , time                 >= 1.5  && < 1.15+                       , tls                             < 2.0   default-extensions:  DataKinds                        DeriveFunctor                        GeneralizedNewtypeDeriving
src/Main.hs view
@@ -51,7 +51,7 @@ footerText :: Doc footerText = vsep [ "For more information, see \"man pnbackup\"."                   , ""-                  , "Copyright © 2016–2017, 2019, 2021–2024 Benjamin D. Esham"+                  , "Copyright © 2016–2017, 2019, 2021–2025 Benjamin D. Esham"                   , ""                   , "License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>."                   , "This is free software: you are free to change and redistribute it."
src/Pinboard.hs view
@@ -145,11 +145,17 @@ handleNote :: Connection -> NoteSignature -> PinboardM NoteStatus handleNote conn (NoteSignature noteId lastUpdated) = do     lastUpdatedLocally <- liftIO $ query conn selectUpdatedQuery (Only noteId)-    if length (lastUpdatedLocally :: [Only UTCTime]) == 0-       then updateNoteFromServer conn noteId >> return New-       else if (fromOnly $ head lastUpdatedLocally) < lastUpdated-               then updateNoteFromServer conn noteId >> return Updated-               else return UpToDate+    case lastUpdatedLocally of+        [] -> updateNoteFromServer conn noteId >> return New+        [Only lastUpdatedLocally'] ->+            if lastUpdatedLocally' < lastUpdated+                then updateNoteFromServer conn noteId >> return Updated+                else return UpToDate+        _ ->+            throwError $+                "There are multiple notes with the id "+                    <> noteIdToText noteId+                    <> ". This should never happen!"  getNote :: NoteId -> PinboardM Note getNote noteId = do
stack.yaml view
@@ -1,1 +1,6 @@-resolver: lts-22.4+resolver: lts-23.5+extra-deps:+  # Version 2.0 of the tls package started requiring hosts to support Extended+  # Main Secret, but the Pinboard server doesn't support this and so the+  # program would fail at runtime if build with tls 2.0 or later. See issue #1.+  - tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571
stack.yaml.lock view
@@ -3,10 +3,17 @@ # For more information, please see the documentation at: #   https://docs.haskellstack.org/en/stable/lock_files -packages: []+packages:+- completed:+    hackage: tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571+    pantry-tree:+      sha256: 91d022739795013aad4d5fee48ff5248623ed4cc83a611c9aa7c52e21766221b+      size: 4897+  original:+    hackage: tls-1.9.0@sha256:8ad332dc0224decb1b137bf6c9678b4f786487b9aaa5c9068cd3ad19d42c39a7,5571 snapshots: - completed:-    sha256: 8b211c5a6aad3787e023dfddaf7de7868968e4f240ecedf14ad1c5b2199046ca-    size: 714097-    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/22/4.yaml-  original: lts-22.4+    sha256: 2d580e973dc1a5ff70cd2bb1248613f835829b38eed5db5dafc3615a22cb1bcd+    size: 679292+    url: https://raw.githubusercontent.com/commercialhaskell/stackage-snapshots/master/lts/23/5.yaml+  original: lts-23.5