ocdude / mbzextract Goto Github PK
View Code? Open in Web Editor NEWA simple utility to extract content from a Moodle 2 backup file
License: MIT License
A simple utility to extract content from a Moodle 2 backup file
License: MIT License
Clean up path handling for safer directory creation
Please specify how to install in the README file, viz.
Thanks!
I am not a Python expert, so hope this makes sense.
Having modified the path at the top of mbextract to the Python interpreter on my system (v2.6 provided by CentOS yum installer), I keep getting the above error.
I tried changing the folder name, and mbz.py is there in the same folder, but it still won't work.
I've tried chmod 777 *.py and that didn't help.
Hi, when I run the mbzextract it can’t find the input file — unless I provide an absolute path.
Thanks — Andy
$ mbzextract backup.mbz
Parsing the moodle backup file...
Course: Physics 101
Extract files to '/Users/aanderson/Downloads' (y)es, (n)o? y
Traceback (most recent call last):
File "/Applications/anaconda/lib/python3.6/runpy.py", line 193, in _run_module_as_main
"main", mod_spec)
File "/Applications/anaconda/lib/python3.6/runpy.py", line 85, in _run_code
exec(code, run_globals)
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbzextract.py", line 35, in
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbz.py", line 196, in extract
File "/Applications/anaconda/lib/python3.6/site-packages/mbzextract-0.0.1a1-py3.6.egg/mbzextract/mbz.py", line 319, in open
File "/Applications/anaconda/lib/python3.6/tarfile.py", line 1586, in open
return func(name, filemode, fileobj, **kwargs)
File "/Applications/anaconda/lib/python3.6/tarfile.py", line 1633, in gzopen
fileobj = gzip.GzipFile(name, mode + "b", compresslevel, fileobj)
File "/Applications/anaconda/lib/python3.6/gzip.py", line 163, in init
fileobj = self.myfileobj = builtins.open(filename, mode or 'rb')
FileNotFoundError: [Errno 2] No such file or directory: 'backup.mbz'
However:
$ mbzextract /Users/aanderson/Downloads/backup.mbz
Parsing the moodle backup file...
Course: Physics 101
Extract files to '/Users/aanderson/Downloads' (y)es, (n)o? y
Skipping forum
Skipping ereservesall
Extracting resource
Skipping videoreservesall
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting url
Extracting page
Extracting url
Extracting url
Extracting url
Extracting url
Python setuptools.find_packages looks for Python modules only, not including template folders in the package list. This can be fixed by adding the option include_package_data=True
to the setup() call in setup.py and by creating a file MANIFEST.in in the project directory containing the lines
include mbzextract/plugins/page/templates/*
include mbzextract/plugins/assignment/templates/*
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.