Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
B
blackboard-extractor
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Richard Torenvliet
blackboard-extractor
Commits
2372d1a8
Commit
2372d1a8
authored
Nov 24, 2014
by
Richard Torenvliet
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
update readme and upload gitigore
parent
a6a090df
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
31 additions
and
8 deletions
+31
-8
.gitignore
.gitignore
+1
-0
README.md
README.md
+25
-1
bb_extract
bb_extract
+5
-7
No files found.
.gitignore
0 → 100644
View file @
2372d1a8
*.sw[a-zA-Z]
README.md
View file @
2372d1a8
##
Extract assignments
##
Why is it needed
This bash script is created to extract files from blackboard. Blackboard has a
This bash script is created to extract files from blackboard. Blackboard has a
horrible way of creating a zipfile. This tries to fix it.
horrible way of creating a zipfile. This tries to fix it.
## Usage
This bash script is used to unpack the zipfile blackboard generates when
you download all the files in the "full grade center" -> Assignment Download
File -> select all students -> download zipfile. Use help functionality to
guide you to use this bash script.
The following output is generated when you call the script with -h.
~~~
Help documentation for bb_extract.
Basic usage: bb_extract gradebook.zip
Command line switches are optional. The following switches are recognized.
-d --Set output directory. /tmp/bb_cleaned.
-h --Displays this help message. No further functions are performed.
Example: bb_extract -d assignment1 gradebook.zip
~~~
## advise
Clone this repo into your ~/.config directory and add it to your the path into
your
`$PATH`
env variable for maximum convenience.
## References
## References
This guy helped me in making the bashscript useable for other people:
This guy helped me in making the bashscript useable for other people:
http://tuxtweaks.com/2014/05/bash-getopts/
http://tuxtweaks.com/2014/05/bash-getopts/
...
...
bb_extract
View file @
2372d1a8
...
@@ -23,12 +23,12 @@
...
@@ -23,12 +23,12 @@
# default extract directory
# default extract directory
BB_EXTRACT_DIR=/tmp/blackboard
BB_EXTRACT_DIR=/tmp/blackboard
#Set Script Name variable
SCRIPT=`basename ${BASH_SOURCE[0]}`
#Initialize variables to default values.
#Initialize variables to default values.
OUTPUT_DIR=/tmp/bb_cleaned
OUTPUT_DIR=/tmp/bb_cleaned
#Set Script Name variable
SCRIPT=`basename ${BASH_SOURCE[0]}`
#Set fonts for Help.
#Set fonts for Help.
NORM=`tput sgr0`
NORM=`tput sgr0`
BOLD=`tput bold`
BOLD=`tput bold`
...
@@ -50,8 +50,7 @@ function extract() {
...
@@ -50,8 +50,7 @@ function extract() {
*) echo "'$ARCHIVE' cannot be extracted via >extract<" && exit 1;;
*) echo "'$ARCHIVE' cannot be extracted via >extract<" && exit 1;;
esac
esac
else
else
echo "'$ARCHIVE' is not a valid file $OUTPUT"
echo "'$ARCHIVE' is not a valid file $OUTPUT, continueing"
exit 1
fi
fi
}
}
...
@@ -89,8 +88,7 @@ function find_and_unpack() {
...
@@ -89,8 +88,7 @@ function find_and_unpack() {
cp $PDF_LIST $SUBMIT_NAME
cp $PDF_LIST $SUBMIT_NAME
done
done
if [ -z $ARCHIVE_LIST ]; then
if [ -z $ARCHIVE_LIST ]; then echo $SUBMIT_NAME >> "error.txt"
echo $SUBMIT_NAME >> "error.txt"
else
else
for ARCHIVE in $ARCHIVE_LIST; do
for ARCHIVE in $ARCHIVE_LIST; do
extract $ARCHIVE $SUBMIT_NAME
extract $ARCHIVE $SUBMIT_NAME
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment