Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
CodiMD export script
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
stgroup
misc
CodiMD export script
Merge requests
!1
Hedgedoc import
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Hedgedoc import
hedgedoc-import
into
main
Overview
2
Commits
38
Pipelines
0
Changes
1
Merged
Andreas Domanowski
requested to merge
hedgedoc-import
into
main
2 years ago
Overview
2
Commits
38
Pipelines
0
Changes
1
Expand
0
0
Merge request reports
Viewing commit
8b5d96a9
Prev
Next
Show latest version
1 file
+
10
−
8
Side-by-side
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
8b5d96a9
Open URLs with default browser
· 8b5d96a9
Andreas Domanowski
authored
2 years ago
history_scripts/visit_migrated_documents.sh
+
10
−
8
Options
#!/bin/bash
#!/usr/bin/env bash
open_command
=
open
if
[[
$(
command
-v
xdg-oasasdpen
)
]]
;
then
open_command
=
xdg-open
fi
script_directory
=
$(
cd
--
"
$(
dirname
--
"
${
BASH_SOURCE
[0]
}
"
)
"
&> /dev/null
&&
pwd
)
script_directory
=
$(
cd
--
"
$(
dirname
--
"
${
BASH_SOURCE
[0]
}
"
)
"
&> /dev/null
&&
pwd
)
url_file
=
$script_directory
/hedgedoc_documents_to_visit.url
url_file
=
$script_directory
/hedgedoc_documents_to_visit.url
echo
"Please specify which browser should be used to access the newly created documents"
echo
"This browser needs to have an active and logged-in HedgeDoc session."
echo
"ATTENTION: your input will be evaluated as part of a shell script"
echo
"ATTENTION: your input string needs to be present on your path (e.g. firefox or google-chrome)"
echo
"Specify the browser:"
read
browser
readarray
-t
url_array <
$url_file
readarray
-t
url_array <
$url_file
echo
"
${
url_array
[@]
}
"
| xargs
-n50
$browser
for
i
in
"
${
url_array
[@]
}
"
\ No newline at end of file
do
$(
$open_command
$i
)
done
\ No newline at end of file
Loading