Skip to content

Commit e9fd990

Browse files
luispedroclaude
andcommitted
MIN Use configurable baseURL for demo downloads
Build the demo download URL from the configurable download base URL instead of hardcoding https://ngless.embl.de, and update the default base URL to the new resources host. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 88b091c commit e9fd990

2 files changed

Lines changed: 5 additions & 3 deletions

File tree

Execs/Main.hs

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,10 @@ modeExec (CmdArgs.DownloadDemoMode demo) = do
321321
let known = ["gut-short", "ocean-short"]
322322
if demo `elem` known
323323
then do
324-
let url = "https://ngless.embl.de/resources/Demos/" ++ demo ++ ".tar.gz"
325-
runNGLessIO "downloading a demo" $ downloadExpandTar url "."
324+
runNGLessIO "downloading a demo" $ do
325+
baseURL <- nConfDownloadBaseURL <$> nglConfiguration
326+
let url = baseURL </> "Demos" </> demo <.> "tar.gz"
327+
downloadExpandTar url "."
326328
putStrLn ("\nDemo downloaded to " ++ demo)
327329
else do
328330
hPutStrLn stderr (redColor ++ "Unknown demo '"++ demo ++ "'.\n"++

NGLess/Configuration.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import qualified Data.Configurator as CF
2222
import CmdArgs
2323

2424
defaultBaseURL :: FilePath
25-
defaultBaseURL = "https://ngless.embl.de/resources/"
25+
defaultBaseURL = "https://ngless-resources.big-data-biology.org/"
2626

2727
data NGLessOutputDestination = NGLOutStdout | NGLOutStderr deriving (Eq, Show)
2828

0 commit comments

Comments
 (0)