diff --git a/Makefile b/Makefile deleted file mode 100644 index 5f4043f..0000000 --- a/Makefile +++ /dev/null @@ -1,23 +0,0 @@ - -default: all -.PHONY: default - -all: -.PHONY: all - - - -TEX:= $(wildcard ./*/*.tex) -tex: $(TEX) - pdflatex - - -## Licences ## -## Convert svg licence files to pdf+pdf_tex -LICENCES:= $(wildcard ./licences/*.svg) -LICENCES_PDF:= $(patsubst %.svg,%.pdf,$(wildcard ./licences/*.svg)) -licences: $(LICENCES_PDF) -$(LICENCES_PDF): $(LICENCES) - echo $(TEX) - inkscape -D $^ -o $@ --export-latex - diff --git a/donnees_structurees/tp_nextcloud/login.png b/donnees_structurees/tp_nextcloud/login.png new file mode 100644 index 0000000..9324f5b Binary files /dev/null and b/donnees_structurees/tp_nextcloud/login.png differ diff --git a/donnees_structurees/tp_nextcloud/modification_partage.png b/donnees_structurees/tp_nextcloud/modification_partage.png new file mode 100644 index 0000000..58cf872 Binary files /dev/null and b/donnees_structurees/tp_nextcloud/modification_partage.png differ diff --git a/donnees_structurees/tp_nextcloud/nouveau_document_texte.png b/donnees_structurees/tp_nextcloud/nouveau_document_texte.png new file mode 100644 index 0000000..6231fdb Binary files /dev/null and b/donnees_structurees/tp_nextcloud/nouveau_document_texte.png differ diff --git a/donnees_structurees/tp_nextcloud/nouveau_dossier.png b/donnees_structurees/tp_nextcloud/nouveau_dossier.png new file mode 100644 index 0000000..b10a61e Binary files /dev/null and b/donnees_structurees/tp_nextcloud/nouveau_dossier.png differ diff --git a/donnees_structurees/tp_nextcloud/partage.png b/donnees_structurees/tp_nextcloud/partage.png new file mode 100644 index 0000000..ce89766 Binary files /dev/null and b/donnees_structurees/tp_nextcloud/partage.png differ diff --git a/donnees_structurees/tp_nextcloud/partage_lien.png b/donnees_structurees/tp_nextcloud/partage_lien.png new file mode 100644 index 0000000..aaf8dbd Binary files /dev/null and b/donnees_structurees/tp_nextcloud/partage_lien.png differ diff --git a/donnees_structurees/tp_nextcloud/partage_utilisateur.png b/donnees_structurees/tp_nextcloud/partage_utilisateur.png new file mode 100644 index 0000000..6035a67 Binary files /dev/null and b/donnees_structurees/tp_nextcloud/partage_utilisateur.png differ diff --git a/donnees_structurees/tp_nextcloud/sujet.pdf b/donnees_structurees/tp_nextcloud/sujet.pdf new file mode 100644 index 0000000..26cd028 Binary files /dev/null and b/donnees_structurees/tp_nextcloud/sujet.pdf differ diff --git a/donnees_structurees/tp_nextcloud/sujet.tex b/donnees_structurees/tp_nextcloud/sujet.tex new file mode 100644 index 0000000..b8eae82 --- /dev/null +++ b/donnees_structurees/tp_nextcloud/sujet.tex @@ -0,0 +1,56 @@ +\documentclass[11pt,a4paper]{../../template_cours} +\usepackage{listings} + +\usepackage{minted} + +\title{Stocker ses données en ligne} +\author{Adrian Amaglio} +\def\thesequence{Données structurées} + +\begin{document} +Durée : 1h + + +% --- +\section{Utiliser un stockage de fichiers en ligne} +\begin{exercice} + Connectez vous au service de stockage de fichiers dont l’adresse et les identifiants vous sont donnés par le professeur. +\end{exercice} + +\begin{exercice} + Créez un dossier nommé selon vos noms et prénoms et placez vous dedans. + \fbox{\includegraphics[width=\textwidth]{nouveau_dossier.png}} +\end{exercice} + +\begin{exercice} + Créez un fichier texte dont vous choisirez le nom.\\ + \fbox{\includegraphics[width=\textwidth]{nouveau_document_texte.png}} +\end{exercice} + +\begin{exercice} + puis partagez le « par lien » avec autorisation de modification.\\ + \fbox{\includegraphics[width=.4\textwidth]{partage.png}}\\ + \fbox{\includegraphics[width=.4\textwidth]{modification_partage.png}} +\end{exercice} + +\begin{exercice} + Vérifiez en navigation privée que le partage est bien paramétré. +\end{exercice} + +\begin{exercice} + Modifiez le fichier et collez y le lien de partage précédemment créé. +\end{exercice} + +\begin{exercice} + Partagez votre dossier en lecture seule au compte « prof » sur votre instance Nextcloud. + \fbox{\includegraphics[width=.6\textwidth]{partage_utilisateur.png}} +\end{exercice} + +% --- +\section{Partage avec une autre instance} +\begin{exercice} + Choisissez un binôme dans le groupe qui est sur une autre instance Nextcloud. + Partagez lui votre dossier en lecture seule à l’aide de son identifiant nextcloud. +\end{exercice} + +\end{document} diff --git a/licences/cc-by-sa.pdf b/licences/cc-by-sa.pdf deleted file mode 100644 index 91bb249..0000000 Binary files a/licences/cc-by-sa.pdf and /dev/null differ diff --git a/licences/cc-by-sa.pdf_tex b/licences/cc-by-sa.pdf_tex deleted file mode 100644 index 47b8216..0000000 --- a/licences/cc-by-sa.pdf_tex +++ /dev/null @@ -1,58 +0,0 @@ -%% Creator: Inkscape 1.0 (4035a4fb49, 2020-05-01), www.inkscape.org -%% PDF/EPS/PS + LaTeX output extension by Johan Engelen, 2010 -%% Accompanies image file 'cc-by-sa.pdf' (pdf, eps, ps) -%% -%% To include the image in your LaTeX document, write -%% \input{.pdf_tex} -%% instead of -%% \includegraphics{.pdf} -%% To scale the image, write -%% \def\svgwidth{} -%% \input{.pdf_tex} -%% instead of -%% \includegraphics[width=]{.pdf} -%% -%% Images with a different path to the parent latex file can -%% be accessed with the `import' package (which may need to be -%% installed) using -%% \usepackage{import} -%% in the preamble, and then including the image with -%% \import{}{.pdf_tex} -%% Alternatively, one can specify -%% \graphicspath{{/}} -%% -%% For more information, please see info/svg-inkscape on CTAN: -%% http://tug.ctan.org/tex-archive/info/svg-inkscape -%% -\begingroup% - \makeatletter% - \providecommand\color[2][]{% - \errmessage{(Inkscape) Color is used for the text in Inkscape, but the package 'color.sty' is not loaded}% - \renewcommand\color[2][]{}% - }% - \providecommand\transparent[1]{% - \errmessage{(Inkscape) Transparency is used (non-zero) for the text in Inkscape, but the package 'transparent.sty' is not loaded}% - \renewcommand\transparent[1]{}% - }% - \providecommand\rotatebox[2]{#2}% - \newcommand*\fsize{\dimexpr\f@size pt\relax}% - \newcommand*\lineheight[1]{\fontsize{\fsize}{#1\fsize}\selectfont}% - \ifx\svgwidth\undefined% - \setlength{\unitlength}{90.00000253bp}% - \ifx\svgscale\undefined% - \relax% - \else% - \setlength{\unitlength}{\unitlength * \real{\svgscale}}% - \fi% - \else% - \setlength{\unitlength}{\svgwidth}% - \fi% - \global\let\svgwidth\undefined% - \global\let\svgscale\undefined% - \makeatother% - \begin{picture}(1,0.35)% - \lineheight{1}% - \setlength\tabcolsep{0pt}% - \put(0,0){\includegraphics[width=\unitlength,page=1]{../../licences/cc-by-sa.pdf}}% - \end{picture}% -\endgroup% diff --git a/licences/cc-by-sa.svg b/licences/cc-by-sa.svg deleted file mode 100644 index 205052b..0000000 --- a/licences/cc-by-sa.svg +++ /dev/null @@ -1,74 +0,0 @@ - - - - - - - - - image/svg+xml - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/template_cours.cls b/template_cours.cls index b59fe16..e9e6957 100755 --- a/template_cours.cls +++ b/template_cours.cls @@ -6,16 +6,18 @@ % terms of the Do What The Fuck You Want To Public License, Version 2, % as published by Sam Hocevar. See http://www.wtfpl.net/ for more details. +% Contributors : Marie D, + +% ----------------------------------------------------------------------------- +% Define Document properties +% ----------------------------------------------------------------------------- % --- Class structure: identification part % --- -\ProvidesClass{article_adrian}[Cours en lycée] +\ProvidesClass{../../template_cours}[Cours en lycée] \NeedsTeXFormat{LaTeX2e} -%\usepackage{../tof2} - - % --- Class structure: declaration of options part % --- % This class extends the article class @@ -34,21 +36,25 @@ \LoadClass{article} +% --- Force A4 paper +% --- +% TODO: Can we create a A3 or A5 document with this template? +\usepackage[a4paper]{geometry} + + % --- Loading common packages % --- -% Be utf-8 % + + +% --- Be french and utf-8 +% --- \usepackage[utf8]{inputenc} \usepackage[french]{babel} \usepackage[T1]{fontenc} %\usepackage{amsmath}%why %\usepackage{amsfonts}%why %\usepackage{amssymb}%why -% Include pictures % -\usepackage{graphicx} -% Why -%\usepackage{array} -% To display typewriter style text -\usepackage{listings} + % --- Define hyperlinks style % --- @@ -69,14 +75,16 @@ breaklinks=true, % --- Define document margins % --- -\setlength{\textheight}{715pt} \addtolength{\voffset}{-90pt} -\setlength{\textwidth}{485pt} \addtolength{\hoffset}{-70pt} +\geometry{top=2cm, bottom=2cm, left=2cm, right=2cm} +%\setlength{\textheight}{715pt} \addtolength{\voffset}{-90pt} +%\setlength{\textwidth}{485pt} \addtolength{\hoffset}{-70pt} % --- Paper and page layout % --- \setlength{\parindent}{0pt} -\setlength{\headheight}{20pt} +%\setlength{\headheight}{20pt} +\setlength{\headheight}{14.2pt} % --- New page for each section @@ -89,15 +97,42 @@ breaklinks=true, % --- Define document font % --- \usepackage{mathpazo} +% TODO dyslexic friendly font +%\usepackage{newcent} %Dyslexie %OpenDyslexic (open-dyslexic) by Abelardo Gonzalez is licensed under a Creative Commons Attribution 3.0 Unported License %Lexia Readable +% ----------------------------------------------------------------------------- +% Include and define nice functions +% ----------------------------------------------------------------------------- + +% --- Include pictures +% --- +\usepackage{graphicx} +% \usepackage{rotating, graphicx} +% Why +%\usepackage{array} + + +% --- To display typewriter style text +% --- +\usepackage{listings} + + +% --- Some useful commands +\newcommand{\bigO}{\textit{O}} +\newcommand\ignore[1]{{}} +\newcommand{\correc}[1]{\textbf{\textcolor{codegreen}{#1}}} +\newcommand{\motcle}[1]{\texttt{\textcolor{blue}{#1}}} +\newcommand{\mothtml}[1]{\texttt{<\textcolor{blue}{#1}>}} +\newcommand{\todo}[1]{\textcolor{red}{#1}} + % --- Register some information about the document % --- -\newcommand{\thelicence}{\def\svgwidth{.1\columnwidth}\input{../../licences/cc-by-sa.pdf_tex}} -\renewcommand{\thelicence}{CC-BY-SA \url{https://creativecommons.org}} %TODO XXX remove +% TODO clickable licence +\newcommand{\thelicence}{\includegraphics[height=\baselineskip]{../../licences/cc-by-sa.png}} \newcommand{\thelevel}{SNT} \newcommand{\thesequence}{Séquence 0} @@ -139,6 +174,8 @@ breaklinks=true, \rfoot{\thelicence} +\def \ifempty#1{\def\temp{#1} \ifx\temp\empty } + % --- Document title % --- % remove spacing around date: @@ -148,51 +185,127 @@ breaklinks=true, \AtBeginDocument{% \dateoriginal{} % clear date \authororiginal{} - \maketitle + \ifx \@title\empty \else \maketitle \fi \thispagestyle{fancy} } -% --- Academic year +% --- Academic year command % --- Use: \academicyear to display text like "2020-2021" % --- Use: \academicyear[-1] to display text like "2019-2020" % --- Use: \academicyear[0][/][ to display text like "2020/2021" -% TODO without global : https://tex.stackexchange.com/questions/94710/what-is-the-difference-between-local-and-global-in-a-tex-meaning \usepackage{xparse} \newcounter{myyear} \newcounter{myyearprevious} \newcounter{myyearnext} \NewDocumentCommand{\academicyear}{O{0} O{-}}{ - \begingroup % Current year % - \setcounter{myyear}{\year} - \addtocounter{myyear}{#1} + \newcommand{\myyear}{\the\year} % Previous year % - \setcounter{myyearprevious}{\value{myyear}} - \addtocounter{myyearprevious}{-1} - \addtocounter{myyearprevious}{#1} + \newcommand\myyearprevious{\the\numexpr\myyear+#1-1\relax} % Next year % - \setcounter{myyearnext}{\value{myyear}} - \stepcounter{myyearnext} - \addtocounter{myyearnext}{#1} - % Print academic year % - \ifnum\month<8 \arabic{myyearprevious}#2\arabic{myyear} \else\arabic{myyear}#2\arabic{myyearnext}\fi - \endgroup + \newcommand\myyearnext{\the\numexpr\myyear+#1+1\relax} + %% Print academic year % + \ifnum\month<8 \myyearprevious#2\myyear \else\myyear#2\myyearnext\fi } +% --- some optional packages +% \usepackage{multirow} % to use multirow in tabular +\usepackage{amsmath} % for more maths symbols and so on +% --- pour barrer du texte +\usepackage{ulem} +% --- Some color definitions +\definecolor{codegreen}{rgb}{0,0.6,0} +\definecolor{codegray}{rgb}{0.5,0.5,0.5} +\definecolor{codepurple}{rgb}{0.58,0,0.82} +\definecolor{backcolour}{rgb}{0.95,0.95,0.92} +\definecolor{rouge_brique}{HTML}{B6321C} +\xdefinecolor{darkblue}{rgb}{0,0,0.4} +\xdefinecolor{darkred}{rgb}{0.4,0,0} - - - -% --- my environments +% --- Javascript listing coloration % --- +\lstdefinelanguage{JavaScript}{ + keywords={typeof, new, true, false, catch, function, return, null, catch, switch, var, if, in, while, do, else, case, break, let}, + keywordstyle=\color{blue}\bfseries, + ndkeywords={class, export, boolean, throw, implements, import, this, document}, + ndkeywordstyle=\color{darkgray}\bfseries, + identifierstyle=\color{black}, + sensitive=false, + comment=[l]{//}, + morecomment=[s]{/*}{*/}, + commentstyle=\color{purple}\ttfamily, + stringstyle=\color{red}\ttfamily, + morestring=[b]', + morestring=[b]" +} + +% --- Some Python highlightings presets +% --- +\lstdefinestyle{mystyle}{ + backgroundcolor=\color{backcolour}, + commentstyle=\color{codegreen}, + % keywordstyle=\color{magenta}, + keywordstyle=\color{blue}, + % keywordstyle=\color{darkblue}, + numberstyle=\tiny\color{codegray}, + % stringstyle=\color{codepurple}, + stringstyle=\color{rouge_brique}, + basicstyle=\ttfamily\footnotesize, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2 +} + +% --- Some HTML highlightings presets +% --- +\lstdefinestyle{mystylehtml}{ + backgroundcolor=\color{backcolour}, + commentstyle=\color{codegreen}, + % keywordstyle=\color{orange}, + keywordstyle=\color{blue}, + numberstyle=\tiny\color{codegray}, + % stringstyle=\color{codepurple}, + stringstyle=\color{red}, + basicstyle=\ttfamily\footnotesize, + breakatwhitespace=false, + breaklines=true, + captionpos=b, + keepspaces=true, + numbers=left, + numbersep=5pt, + showspaces=false, + showstringspaces=false, + showtabs=false, + tabsize=2 +} + +% --- Style configuration +\lstset{style=mystyle} +\lstset{language=Python} +\lstset{frame=lines} +\lstset{basicstyle=\footnotesize} + + +% --- Environment creator +% --- Handy to have a standard environment +% TODO add a symbole to each environment for daltonian students or B&W printing \usepackage[many]{tcolorbox} +% This command define a new environment, cartouche style. % 1: name % 2: Text to display in cartouche % 3: font color of cartouche % 4: back color of cartouche +% TODO is there a way to reset the counter from a document? \newcommand{\myenvironment}[4]{ \newtcolorbox[ auto counter, @@ -223,36 +336,49 @@ breaklinks=true, } } +% --- Some nice color sets +% --- \definecolor{yellowtitle}{RGB}{133,100,4} \definecolor{yellowtitleback}{RGB}{255,243,205} \definecolor{yellowtitleborder}{RGB}{255,238,196} -\myenvironment{example}{Exemple}{yellowtitle}{yellowtitleback} \definecolor{turquoisetitle}{RGB}{12,84,96} \definecolor{turquoisetitleback}{RGB}{209,236,241} \definecolor{turquoisetitleborder}{RGB}{190,229,235} -\myenvironment{exercice}{Exercice}{turquoisetitle}{turquoisetitleback} \definecolor{redtitle}{RGB}{114,28,36} \definecolor{redtitleback}{RGB}{248,215,218} \definecolor{redtitleborder}{RGB}{245,198,203} -\myenvironment{definition}{Définition}{redtitle}{redtitleback} + \definecolor{greentitle}{RGB}{21,87,36} \definecolor{greentitleback}{RGB}{212,237,218} \definecolor{greentitleborder}{RGB}{195,230,203} -\myenvironment{info}{Info}{greentitle}{greentitleback} - -% --- Include tiks figures from external files -% --- Those figures supports beamer options that are ignored in article mode +% --- Some environments % --- -% `mode=tex` means we will use the source file of the figures directly. -\usepackage[mode=tex]{standalone} -\usepackage{tikz} -\usetikzlibrary{calc,positioning} +%\myenvironment{exercice}{Exercice}{greentitle}{greentitleback} +\myenvironment{rappel}{Rappel}{greentitle}{greentitleback} +\myenvironment{notion}{Notions abordées}{greentitle}{greentitleback} +\myenvironment{example}{Exemple}{yellowtitle}{yellowtitleback} +\myenvironment{important}{Important}{yellowtitle}{yellowtitleback} +\myenvironment{further}{Pour aller plus loin}{greentitle}{greentitleback} +%\myenvironment{question}{Réponse - Question}{turquoisetitle}{turquoisetitleback} +\myenvironment{question}{Question}{turquoisetitle}{turquoisetitleback} +%\myenvironment{definition}{Définition}{redtitle}{redtitleback} +\myenvironment{regle}{Règle}{redtitle}{redtitleback} +%\myenvironment{consigne}{Réponse - À faire}{redtitle}{redtitleback} +\myenvironment{consigne}{À faire}{redtitle}{redtitleback} +\myenvironment{savoir}{À savoir}{redtitle}{redtitleback} +\myenvironment{important2}{Important}{redtitle}{redtitleback} +\myenvironment{exercice}{Exercice}{turquoisetitle}{turquoisetitleback} +\myenvironment{methode}{Méthode}{turquoisetitle}{turquoisetitleback} -% Create fake \onslide and other commands for standalone picture + + +% --- Create fake \onslide and other commands for standalone picture +% --- +% TODO is this working? \usepackage{xparse} \NewDocumentCommand{\onslide}{s t+ d<>}{} \NewDocumentCommand{\only}{d<>}{} @@ -261,9 +387,8 @@ breaklinks=true, \NewDocumentCommand{\invisible}{d<>}{} -% --- Some nice left bar +% --- Some nice left bar for answer environment % --- - \usepackage{framed} \usepackage{xcolor} @@ -279,13 +404,11 @@ breaklinks=true, } {\endMakeFramed} - -% --- Hide some block if the variable is 0 -% --- -% --- +% --- Answer environment +% --- Create an 'answer' environment, that will be hidden if the command \answersfalse is used \usepackage{ifthen} \newif\ifanswers -\answerstrue % comment out to hide answers +\answerstrue % Answers are displayed by default. % Actual answer command \newcommand{\answer}[1]{ @@ -299,19 +422,18 @@ breaklinks=true, } % --- Question env -% --- - -\newcounter{questions} -\setcounter{questions}{1} -\newenvironment{question} +% --- Create a 'question' environment that display text 'Question' and a counter +\newcounter{simplequestions} +\setcounter{simplequestions}{1} +\newenvironment{simplequestion} { - \textbf{Question \arabic{questions}} - \stepcounter{questions} + \textbf{Question \arabic{simplequestions}} + \stepcounter{simplequestions} }{ } \newcommand{\questions}[1]{ - \textbf{Question \arabic{questions}} - \stepcounter{questions} + \textbf{Question \arabic{simplequestions}} + \stepcounter{simplequestions} #1 } @@ -321,4 +443,3 @@ breaklinks=true, \title{} \author{} - diff --git a/test-python-ssh/Readme.md b/test-python-ssh/Readme.md index c3ddc7f..ac8cc42 100644 --- a/test-python-ssh/Readme.md +++ b/test-python-ssh/Readme.md @@ -71,3 +71,6 @@ Allow student to connect via SSH or SFTP to add python files and play with bash. ## NGINX HTTP server For more flexibility with HTTP + +# TODOs +- public directory in homes where content is served