group-by-date 0.0 → 0.0.1
raw patch · 2 files changed
+11/−12 lines, 2 filesdep −old-localedep ~directorydep ~filepathdep ~time
Dependencies removed: old-locale
Dependency ranges changed: directory, filepath, time
Files
- group-by-date.cabal +9/−9
- src/GroupByDate.hs +2/−3
group-by-date.cabal view
@@ -1,5 +1,5 @@ Name: group-by-date-Version: 0.0+Version: 0.0.1 License: BSD3 License-File: LICENSE Author: Henning Thielemann <haskell@henning-thielemann.de>@@ -26,9 +26,10 @@ . > group-by-date -r photos | bash .- If you want a different command, say @cp@, you can call+ If you want a different command,+ say copying with preservation of modification time, you can call .- > group-by-date --command=cp -r photos+ > group-by-date --command='cp -p' -r photos . Alternatively, you can run the actions immediately, that is, without a Bash script:@@ -43,12 +44,12 @@ Attention: Media for photographies is often formatted with FAT. This may yield trouble with respect to timezones.-Tested-With: GHC==7.8.3+Tested-With: GHC==7.8.4, GHC==8.2.1 Cabal-Version: >=1.6 Build-Type: Simple Source-Repository this- Tag: 0.0+ Tag: 0.0.1 Type: darcs Location: http://hub.darcs.net/thielema/group-by-date/ @@ -60,11 +61,10 @@ Build-Depends: hsshellscript >=3.1.0 && <3.4, filemanip >=0.3.5 && <0.4,- filepath >=1.3 && <1.4,+ filepath >=1.3 && <1.5, -- version for directory needed for getModificationTime returning UTCTime- directory >=1.2 && <1.3,- time >=1.4 && <1.6,- old-locale >=1.0 && <1.1,+ directory >=1.2 && <1.4,+ time >=1.5 && <1.9, unix-compat >=0.3 && <0.5, explicit-exception >=0.1 && <0.2, transformers >=0.2 && <0.6,
src/GroupByDate.hs view
@@ -8,7 +8,6 @@ import qualified Data.Time.Format as Time import Data.Time.Clock.POSIX (posixSecondsToUTCTime, )-import System.Locale (defaultTimeLocale, ) import Text.Printf (printf, ) @@ -17,13 +16,13 @@ folderFromStatus :: String -> Files.FileStatus -> FilePath folderFromStatus fmt =- Time.formatTime defaultTimeLocale fmt .+ Time.formatTime Time.defaultTimeLocale fmt . posixSecondsToUTCTime . realToFrac . Files.modificationTime folderFromPath :: String -> FilePath -> IO FilePath folderFromPath fmt =- fmap (Time.formatTime defaultTimeLocale fmt) .+ fmap (Time.formatTime Time.defaultTimeLocale fmt) . Dir.getModificationTime