ELOS-License-Builder/src/License/Hippocratic.elm

259 lines
6.1 KiB
Elm

module License.Hippocratic exposing
( Module
, info
)
import License exposing
( DownloadType
, LicenseInfo
, ModuleInfo
)
import Html exposing (text)
import Html exposing (a)
import Html.Attributes exposing (href)
info : LicenseInfo Module
info =
{ availableModules = availableModules
, templates = getTemplate
, moduleInfo = moduleInfo
}
type Module
= CarbonUnderground
| Ecocide
| Extractive
| BDS
| Taliban
| Myanmar
| XinjiangUygar
| UsTariff
| Surveillance
| Military
| LawEnforcement
| Media
| SocialAuditing
| BoardOfDirectors
| SupplyChain
| Copyleft
availableModules : List Module
availableModules =
[ CarbonUnderground
, Ecocide
, Extractive
, BDS
, Taliban
, Myanmar
, XinjiangUygar
, UsTariff
, Surveillance
, Military
, LawEnforcement
, Media
, SocialAuditing
, BoardOfDirectors
, SupplyChain
, Copyleft
]
moduleInfo : Module -> ModuleInfo
moduleInfo mod = case mod of
CarbonUnderground ->
{ name = "Carbon Underground 200"
, desc =
[ text
"""
Disallow use by the top global publicly-owned coal, oil, and gas reserve (judged
by
"""
, a
[ href "https://www.ffisolutions.com/research-analytics-index-solutions/research-screening/the-carbon-underground-200/"
]
[ text "the FFI Carbon Underground 200)" ]
]
, index = 0
}
Ecocide ->
{ name = "Ecocide"
, desc = [text "Disallow anyone who knowingly commits widespread or long term ecocide"]
, index = 1
}
Extractive ->
{ name = "Extractive Industries"
, desc =
[text
"""
Disallow use by anyone involved in fossil fuel / mineral exploitation,
extraction, development, and sale
"""
]
, index = 2
}
BDS ->
{ name = "BDS (Boycott, Divestment, Sanctions)"
, desc =
[ text "Disallow use by anyone on the "
, a
[ href "https://bdsmovement.net/" ]
[ text "Boycott, Divestment, Sanctions'" ]
, text "list"
]
, index = 3
}
Taliban ->
{ name = "Taliban"
, desc = [text "Disallow use by anyone who trades with, works with, or is the Taliban"]
, index = 4
}
Myanmar ->
{ name = "Myanmar"
, desc =
[ text
"""
Disallow use by anyone who trades with, works with, or is the Myanmar/Burmese
military
"""
]
, index = 5
}
XinjiangUygar ->
{ name = "Xinjiang Uygur Autonomous Region"
, desc =
[ text
"""
Disallow use by anyone who works with or is someone who benefits from goods
produced in the Xinjiang Uygur Autonomous Region of China
"""
]
, index = 6
}
UsTariff ->
{ name = "U.S. Tariff Act"
, desc =
[ text
"""
Disallow use by anyone who works with or is someone who the U.S. Customs and
Border Protection believes uses forced labor
"""
]
, index = 7
}
Surveillance ->
{ name = "Mass Surveillance"
, desc =
[ text
"""
Disallow use by anyone who works with or is a goverment/multinational corporation
who participates in a mass-surveilence program
"""
]
, index = 8
}
Military ->
{ name = "Military Activities"
, desc =
[ text
"""
Disallow use by anyone who works with or is a goverment/multinational corporation
who conducts military activities
"""
]
, index = 9
}
LawEnforcement ->
{ name = "Law Enforcement"
, desc =
[ text
"""
Disallow use by anyone who works with or anyone who trades with or offers support
to local, state, or federal law enforcement
"""
]
, index = 10
}
Media ->
{ name = "Media"
, desc =
[ text
"""
Disallow use by anyone who is or works with someone who broadcasts messages
promoting violence
"""
]
, index = 11
}
SocialAuditing ->
{ name = "Social Auditing"
, desc =
[ text
"""
Require that organizations that use your software only use social auditing methods
that adhere to the principles of the
"""
, a
[ href "https://wsr-network.org/what-is-wsr/statement-of-principles/" ]
[ text "Worker-Driven Social Responsibility Network," ]
, text
"""
or not use social auditing methods at all
"""
]
, index = 12
}
BoardOfDirectors ->
{ name = "Workers on Board of Directors"
, desc =
[ text
"""
If the organization using your software has a board of directors, require that
they have at least 30% of the seats on the board be paid less than twice the
amount of the the lowest paid worker in the organization
"""
]
, index = 13
}
SupplyChain ->
{ name = "Supply Chain Transparency"
, desc =
[ text
"""
Require that whoever uses your software must publish information about their
supply chain on a public website
"""
]
, index = 14
}
Copyleft ->
{ name = "Copyleft"
, desc =
[ text
"""
Require that any modifications or derivitive works based on your software or
source code be licensed under the exact same license
"""
]
, index = 15
}
getTemplate : DownloadType -> List (Maybe Module, String)
getTemplate _ =
[ (Nothing, "Hippocratic filler text")
, (Just CarbonUnderground, "CU200 enabled")
, (Just Ecocide, "Ecocide enabled")
, (Just Extractive, "Extractive enabled")
, (Just BDS, "BDS enabled")
, (Just Taliban, "Taliban enabled")
, (Just Myanmar, "Myanmar enabled")
, (Just XinjiangUygar, "Uygar enabled")
, (Just UsTariff, "UST enabled")
, (Just Surveillance, "Surv enabled")
, (Just Military, "MILI enabled")
, (Just LawEnforcement, "COPS enabled")
, (Just Media, "MEDIA enabled")
, (Just SocialAuditing, "AUDIT enabled")
, (Just BoardOfDirectors, "BOD enabled")
, (Just SupplyChain, "CHAIN enabled")
, (Just Copyleft, "COPYLEFT enabled")
]