将学生作业上传至http://prof.fil.univ-lille1.fr的工具
prof的Python项目详细描述
[Prof]是在Lille1学习计算机科学的人应该上传他们的工作的网站。
此工具使您能够从命令行上载存档。
##安装
##在您的大学帐户上
您可以将prof安装到$HOME目录中
export HTTP_PROXY=cache-etu.univ-lille1.fr:3128 pip-3.2 install –user prof ~/.local/bin/prof
我建议您在.bashrc
中创建以下别名alias prof=HTTP_PROXY=cache-etu.univ-lille1.fr:3128 $HOME/.local/bin/prof
###在您的计算机上(如果您是根用户)
从pypi下载并运行程序
sudo pip3 install prof prof
##配置
您必须指定prof需要在$HOME/.profrc中连接到哪个服务器,如下所示:
[DEFAULT] baseurl = https://your-prof-instance login = yourlogin
注意login不是必需的,但是您应该为了方便而设置它。
##用法
在命令行上,运行
prof list
如果需要,会弹出一个firefox窗口,这样您就可以填写您的凭据,并检查验证码。
作为交换,它给了你一切可行的工作之树。
TP_ACT_Groupe1 - 23 : TP Ordres de Grandeu Closed (calve-act-1.tar.gz) - 88 : TP Diviser pour Régn Closed (calve-act2.tar.gz) - 103 : TP 3 Compression Im Open - Time remaining: 6 days, 17:09:56.090487 TP ASE Contextes - 45 : TP 2 Closed (calve-ase-2.tar.gz) - 46 : TP 4 Closed (calve-ase-2.tar.gz) TP ASE Disques - 47 : TP 1 Closed (calve-ase-3.tar.gz) - 48 : TP 2 Open - Time remaining: 4 days, 20:54:56.090348 - 49 : TP 3 Open - Time remaining: 32 days, 20:54:56.090310 TP ASE MMU - 50 : TP 1 Open - Time remaining: 53 days, 20:54:56.090262 - 51 : TP 2 Open - Time remaining: 60 days, 20:54:56.090225 M1AEO - 95 : Bonus TD Closed - 184 : TP roulette Open - Time remaining: 5 days, 17:54:56.090157
然后您可以使用
prof upload 184 test.tar.gz
如果文件是tar.gz,则它将在临时目录中对其进行解压缩,并尝试使用make编译项目。您可以用--compil-command "cmake"或--no-compile
Running make in /tmp/tmp3n3knca6prof for file test.tar.gz mkdir -p bin gcc -Wall -ansi -pedantic -m32 -g -c -o src/mkhd.o src/mkhd.c gcc -Wall -ansi -pedantic -m32 -g -o ./lib/mkhd.o -c src/mkhd.c -I./include Successfully compiled
完成了
done, you should verify the upload on the website
教授还在发展中,它可能会崩溃,丢失你的文件,吃掉你的山羊。 始终检查您的文件是否在远程服务器上实际发送。
[教授]:https://prof.fil.univ-lille1.fr
##为git设置提交后挂钩
您可以很容易地为git设置一个postcommit钩子,以便它在每次提交时编译并上传您的工作。 在项目中,创建.git/hooks/post-commit
git archive –output archive.tar.gz HEAD prof upload workid archive.tar.gz –compil-command “make”
以及chmod +x .git/hooks/post-commit
##更改日志
- Persisting sessions
- True Pypi package
- Check proper compilation before pushing
- ^{tt12}$ option came back
- Rewrite in Python
- Better ui, now loop thru tp and ue list
- Fix : Date comparaison
- Added argument –sorted to list all TPs sorted by time. Still experimental
- QuickFix : Clear buffer containing downloaded pages before getting TP list
- TPs contains their UE
- TPs contains their deadline. Maybe in a future we could sort TP by deadline
- TPs and UEs numbers are now from 0 to n, and not the actual id on the server
- raise exception when procedures fail
- upload a file
- delete a remote file
- retrieve TP list
- connect to the prof website, get cookie, log and retrieve an UE list
##开发
git clone https://github.com/calve/prof cd prof pip3 install -r requirements.txt python3 run.py
##联系人
calvinh34 at gmail
欢迎使用错误、补丁和建议!
##最后一个词
如果什么都不起作用,或者您只是想要一个简单的sh脚本,那么您可能会在legacy/prof.sh中找到一个几乎做同样事情的脚本。