1 / 56

DIY

DIY. Personal Fabrication Dokumentation. Juergen Eckert – Informatik 7. How to Get Started ? ( again ). Projekt überlegen kann man es bereits kaufen? → kein Projekt Related work Verwandte Arbeiten als Grundlage nutzen Durch Probleme/Herausforderungen lernen

Télécharger la présentation

DIY

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. DIY Personal Fabrication Dokumentation Juergen Eckert – Informatik 7

  2. HowtoGetStarted? (again) • Projekt überlegen • kann man es bereits kaufen? → kein Projekt • Relatedwork • Verwandte Arbeiten als Grundlage nutzen • Durch Probleme/Herausforderungen lernen • Das Ziel nie aus den Augen verlieren • Dokumentieren!!!

  3. Dokumentation

  4. Online Dokumentation • Instructables (Anleitungen) • Thingiverse (3D Objekte) • Github (Source Code) • Privater Webspace • Blog • *wiki • Etc...

  5. Lizenzen, Patente und Rechte • Zugänglichkeit zu Schnittstellen, Software und Hardware • Creative Commons • GNU (L)GPL • MIT-Lizenz

  6. Klassische Dokumentation • Textverarbeitungsprogramm: WYSIWYG(Word, LibreOffice, etc) • Textsatzsystem (LaTeX) Ziel: Setzen von Texten und mathematischen Formeln

  7. Geschichte • TeX von Donald E. Knuth (Standford, 1978) • altgriechisch τέχνη (téchne): Fähigkeit, Kunstfertigkeit, Handwerk • 300 fest Befehle (primitives) • Definition eigener Makros (komplex) • LaTeX von Leslie Lamport (1986) • TeX-Macros • LamportTeX • LaTeX 2ε seit 1989

  8. Publikations-Workflow • Autor verfasst Manuskript • Buch-Designer ent-scheidet über Layout • Setzer erhält Anweisungen • Autor verfasst Manuskript • LaTeX: Fachwissen -> log. Struktur (Befehle) • TeX Traditionell Automatisiert

  9. Vor- und Nachteile • Wenige, leicht verständliche Befehle • Mathematische Formeln besonders einfach • Strukturen (z.B. Literaturverzeichnisse) wenig Aufwand • Aktualisieren von Querverweisen automatisch • Lange, komplizierte Dokumente zuverlässig • Workflow stark unterschiedlich zu WYSIWYG

  10. Quelle • Tutoriell teilweise nach • Marco Daniel et al.: LATEX 2ε-Kurzbeschreibung (V3.0 1.7.12) • Tobias Oetiker et al.: The Not So Short IntroductiontoLATEX2ε (V5.03 25.4.14)

  11. Los geht‘s • doku.tex erstellen • > pdflatexdoku.texoder> latexmk –pvc –pdfdoku.tex(Autogenerierung) • Automatische Preview im Texteditor möglich z.B. Texmaker

  12. doku.tex 1/3 • Textdatei • Unsichtbare Zeichen (Space (␠), \t, \n) werden einheitlich als Space behandelt • Mehrere ␠ -> ein ␠ • Leerzeile zwischen Textzeilen -> Ende Absatz • Mehrere Leerzeilen -> eine Leerzeile

  13. doku.tex 2/3 • Kommentare von „%“ bis „\n“ • Befehle starten mit „\“ (oder Sonderzeichen) • Space nach befehlen „{}␠“ oder „\␠“ • Case sensitiv • Parameter • „{parameter1, parameter2}“ • „[optional1, optional2]“ • Index: z.B. http://www.weinelt.de/latex/

  14. doku.tex 3/3 \documentclass[11pt,a4paper,ngerman]{article}\usepackage[utf8]{inputenc} %UTF8 inputfile \usepackage[T1]{fontenc} \usepackage[ngerman]{babel} %Umlaute,Silbentrennung \date{\today} \author{J.~Eckert} \title{DIY: Sample TeX File} \begin{document} \maketitle \tableofcontents \section{Start} Hier beginnt mein schönes Werk ... \section{Ende} ... und hier endet es. \end{document} Preamble Body

  15. Dokumentklassen \documentclass[<optionen>]{<klasse>} • Vereinbarungen über das Layout • <klasse> exakt ein Parameter • Vordefinierte aus der Distribution oder .cls File im Dokumenten Root → DIY Project Doku mit IEEEtran

  16. Eingabezeichen • Erlaubt:a...z A...Z 0...9 . : ; , ? ! ‘ ’( ) [ ] - / * @ + = • Spezialbedeutung: (teilw. in Mathe Umgebung erlaubt)$ & % # _ { } ~ ^ \ “ | < > • Escapebar:\$ \& \% \# \_ \{ \} \~{} \^{} \textbackslash …

  17. Schriften 1/2 • Manuelle Silbentrennung: \hyphenation{} • Fett \textbf{...} • Kursiv \textit{...} \par = neuer Absatz ≙Leerzeile

  18. Schriften 2/2

  19. ListenUmgebung \begin{itemize} \item ... \item ... \begin{itemize} \item ... \item ... \end{itemize} \item ... \end{itemize} • Numeriering: enumerate • Eigene Beschreibung: • description • \item[marker]

  20. TabellenUmgebung % \usepackage{booktabs} \begin{tabular}[t]{rl} \toprule Wert & Zahlensystem \\ \midrule 7C0 & hexadezimal \\ 3700 & oktal \\ 11111000000 & binär \\ 1984 & dezimal \\ \bottomrule \end{tabular}

  21. Mathematische Formlen • equationUmgebungoder $ ... $ \[ ... \]

  22. Bilder / Label / Verweise %\usepackage{cleveref} %\usepackage{graphicx} \begin{figure} \centering \includegraphics[width=.3\textwidth]{logo} \caption{FabLab Logo} \label{fig:fl} \end{figure} \Cref{fig:fl} zeigt...

  23. Literaturangaben Besser: • Nutzung einer Datenbank (.bib File) • Verabeitung mittels BibTEX oder biber

  24. Presentation mit LaTeX \documentclass{beamer} \begin{document} \begin{frame} This ismyfirstslide. \end{frame} \begin{frame} This ismysecond (and last) slide. \end{frame} \end{document}

  25. PGF/TikZ %\usepackage{tikz} \begin{tikzpicture} \node[draw,circle](a) {A}; \node[draw,circle,rightof=a, nodedistance=2cm](b) {B}; \draw[->] (a) to[out=45,in=135] node[above]{nach} (b); \end{tikzpicture} ...AND MUCH MORE...

  26. GIT • Tutoriell nach: Christoph Sommer, Uni Paderborn Model Management with Git

  27. Motivation • So nicht… • cpsrc/models/network/ipv4.c src/models/network/ipv4.bak • cpsrc/models/transport/tcp.csrc/models/network/tcpip.westwood • Besser, aber immer noch schlecht… • cp -axsrcsrc.bak • cp –axsrcsrc.bak.old • Fast richtig… • cp -axproject project.2009-12-15 • cp -axproject project.2009-12-16 • cp -axproject project.2009-12-17 • diff -Naur ../project.2009-12-{16,15} | patch • Ideal • Dateisystem das (zuverlässig) die Historie speichert • Optimiert zum sichern/wiederherstellen von versioniertenText Dateien • Git, svn, hg (Mercurial), ...

  28. Einleitung • Historie • Entwickler: Linus Torvalds • Maintainer: JunioHamano(Stand 10/2014) • Free and Open Source Software • Projekte: Linux Kernel, Git, Android, Eclipse, Debian, Perl, Ruby on Rails, PostgreSQL, Gnome, KDE, Qt, X.org, . . . • Whatisgit? • 3-Buchstaben Wort das noch nicht unter Linux verwendet wird • Git = „Blödmann“ (britische Umgangssprache) • Dateisystem das (zuverlässig) die Historie speichert+ loses, geschichtete Sammlung an kleinen Skripten= Verteiltes Versionskontrollsystem

  29. Workflow Repository Local push fetch Working Copy Stage / Index Repository add commit Repository checkout / reset

  30. Reise in das git Repository (…und zurück) blob Hello Earth README doc/README tree blob Hello World README index “fix docs” doc commit “remove doc” commit “fix docs” tree refs/heads/master HEAD blob .PNG..IHDR.. doc refs/heads/greatdocs tree logo.png commit “combine” refs/remotes/origin/master tree blob #!/bin/sh configure.sh refs/tags/v1.0 src tweak logo tree tag “first rls” commit “add docs” commit “tweak logo” blob .PHONY: all Makefile

  31. Reise in das git Repository (…und zurück) d greatdocs fix docs doc commit “fix docs” logo.png e master remove doc HEAD refs/heads/greatdocs c origin/master combine commit “combine” refs/remotes/origin/master b v1.0 tweaklogo refs/tags/v1.0 a adddocs tag “first rls” commit “add docs” commit “tweak logo”

  32. Try it • http://try.github.io/ • http://pcottle.github.io/learnGitBranching/ • http://git-scm.com/book • http://git-scm.com/documentation

  33. Common git commands • % git add README Working Copy e e’ master origin/master d d’ c v1.0 b a PDF? See backupslides

  34. Common git commands • % git commit Working Copy f e e’ master origin/master d d’ c v1.0 b a PDF? See backupslides

  35. Common git commands • % git commit --amend Working Copy e e’ e’ master origin/master d d’ c v1.0 b a PDF? See backupslides

  36. Common git commands • % git reset --hard e Working Copy f master e e’ origin/master d d’ c v1.0 b a PDF? See backupslides

  37. Common git commands • % git branch greatdocs e Working Copy f master e e’ greatdocs origin/master d d’ c v1.0 b a PDF? See backupslides

  38. Common git commands • % git checkout greatdocs Working Copy f master master e e’ greatdocs greatdocs origin/master d d’ c v1.0 b a PDF? See backupslides

  39. Common git commands • % git remote add origin /some/path/proj.git Working Copy “origin” local e e master d d master c c v1.0 v1.0 b b a a PDF? See backupslides

  40. Common git commands • % git fetch origin master Working Copy “origin” local e e origin/master master d d master c c v1.0 v1.0 b b a a PDF? See backupslides

  41. Common git commands • % git push origin master:master Working Copy local “origin” e e master d d master origin/master c c v1.0 v1.0 b b a a PDF? See backupslides

  42. Common git commands • % git merge origin/master Working Copy m e e’ master origin/master d d’ c v1.0 b a PDF? See backupslides

  43. Common git commands • % git rebase origin/master Working Copy e’’ e’ master origin/master e d’’ d’ d c v1.0 b a NEVER REBASE A PUBLIC BRANCH PDF? See backupslides

  44. Bestimmen einer Revision • Vollständiger SHA1 Hashwertdae86e1950b1277e545cee180551750029cfe735 • Eindeutiger Präfix eines SHA1 Hashwertsdae86e • Symbolischer Referenznamemaster(Suche in .git/master, refs/master, refs/(tags|heads|remotes)/master, refs/remotes/master/HEAD) • git log --grep KEYWORD • Viele mehr... RTFM

  45. Interfaces

  46. gitgui

  47. Bewährtes Vorgehen • Zu aller erst: git konfigurieren • gitconfig --global user.name ”Mein Name” • gitconfig --global user.emailmy.name@example.com • advice.detachedHead, rerere.enabled, … • Richtlinien wie und was zu committenist: • Möglichst oft • Fehler schnell zu revidieren • Nicht warten bis der Code „fertig“ ist! • Jeder Commit änder exakt eine Sache(keine “thischangeseverything”) • Der Code im Repository kompiliert • Jeder Branch/Tag hat einen Zweck und einen Besitzer • Feature/Release/Version • Jede Datei im Repository wird benötigt um das Projekt zu bauen • keine Objekt- oder Temp.-Dateien, etc... • Jeder Commit hat eine klare, präzise Betreffzeile

  48. Houston, wehave a problem... • Ungewollte Commits rückgängig machen: • HEAD auf früheren Commit setzen • gitreset --soft master^ • Alles aus dem Index entfernen; HEAD auf früheren Commit setzen • gitresetmaster^ • Alles aus dem Index entfernen; HEAD auf früheren Commit setzen; Working-tree identisch zu neuen HEAD machen • git clean -fdx • gitreset --hardmaster^ • Zu weit! Zurück in die Zukunft... • git clean -fdx • gitreset --hardmaster@{19:45} • Verdammt, der ganze Branch ist weg! Wühle durch den Müll... • gitreflog | awk ’{print $1}’ | xargsgitk

  49. Übung • Git Repository anlegen • LaTeX Präsentation für Projektvorlschlag darin erstellen Präsentation: • max 5 min • max 5 Folien

  50. Nächstes mal... • Mechanik • Schneideverfahren (Lasercutter) • 2.5 D Workflow, STL, GCODE, STEP, etc später...

More Related