summaryrefslogtreecommitdiff
path: root/Types
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2013-04-25 12:23:36 -0400
committerGravatar Joey Hess <joey@kitenet.net>2013-04-25 12:23:36 -0400
commit9676d206217f93dbc8da215fb0c0214730b22e09 (patch)
tree331d84cc1bde1d4bbc0ff49291ff36d2583fffd5 /Types
parentac9dfc1fbc936349a6596402e78592e94e90279c (diff)
Internet Archive!
* Add public repository group. * webapp: Can now set up Internet Archive repositories. TODO: Enabling IA repositories.
Diffstat (limited to 'Types')
-rw-r--r--Types/StandardGroups.hs5
1 files changed, 5 insertions, 0 deletions
diff --git a/Types/StandardGroups.hs b/Types/StandardGroups.hs
index 417d6bec1..055dffe6e 100644
--- a/Types/StandardGroups.hs
+++ b/Types/StandardGroups.hs
@@ -16,6 +16,7 @@ data StandardGroup
| FullArchiveGroup
| SourceGroup
| ManualGroup
+ | PublicGroup
| UnwantedGroup
deriving (Eq, Ord, Enum, Bounded, Show)
@@ -28,6 +29,7 @@ fromStandardGroup SmallArchiveGroup = "smallarchive"
fromStandardGroup FullArchiveGroup = "archive"
fromStandardGroup SourceGroup = "source"
fromStandardGroup ManualGroup = "manual"
+fromStandardGroup PublicGroup = "public"
fromStandardGroup UnwantedGroup = "unwanted"
toStandardGroup :: String -> Maybe StandardGroup
@@ -39,6 +41,7 @@ toStandardGroup "smallarchive" = Just SmallArchiveGroup
toStandardGroup "archive" = Just FullArchiveGroup
toStandardGroup "source" = Just SourceGroup
toStandardGroup "manual" = Just ManualGroup
+toStandardGroup "public" = Just PublicGroup
toStandardGroup "unwanted" = Just UnwantedGroup
toStandardGroup _ = Nothing
@@ -51,6 +54,7 @@ descStandardGroup SmallArchiveGroup = "small archive: archives files located in
descStandardGroup FullArchiveGroup = "full archive: archives all files not archived elsewhere"
descStandardGroup SourceGroup = "file source: moves files on to other repositories"
descStandardGroup ManualGroup = "manual mode: only stores files you manually choose"
+descStandardGroup PublicGroup = "public: only stores files located in \"public\" directories"
descStandardGroup UnwantedGroup = "unwanted: remove content from this repository"
{- See doc/preferred_content.mdwn for explanations of these expressions. -}
@@ -67,6 +71,7 @@ preferredContent SmallArchiveGroup = lastResort $
preferredContent FullArchiveGroup = lastResort notArchived
preferredContent SourceGroup = "not (copies=1)"
preferredContent ManualGroup = "present and (" ++ preferredContent ClientGroup ++ ")"
+preferredContent PublicGroup = "include=*/public/* or include=public/*"
preferredContent UnwantedGroup = "exclude=*"
notArchived :: String