In the Fablab almost all the machines are dealing with an open source softwares. the open source softwares can be installed in Linux operating system. So it is very important to learn how to use Linux.
At the beginning of the Prefab course we have installed Ubuntu (it is a Linux operating system) in our laptops bu using the virtual machine. then we have learned some useful command that make the work easer for us. some of these command are listed bellow :
Some Important Notes
- Linux environment is very sensitive to the letter case.
- To copy use ctrl+shift+c, paste use ctrl+shift+v.
- To open any directory in the terminal, open the directory then write click then choose open in terminal.
Git Repository is a community allowed the knowledge sharing. Each lap in the Fablab academy has a git repository where students push their work and pull other people's work. in such community we gain a benefits mare than give.
To work with git repository I followed the following steps:
Download the repository related to my group from this link.
Installed git by type sudo apt-get install git in the terminal window.
To clone I used this command git clone https://gitlab.fabcloud.org/preacademy/preacademy2018.git in the terminal window. Here I type the https link of the repository. in this case when I want to push changes it will require my login/password for each time I connect which is annoying me. So I changed the connection to SSH, but first i deleted the repository folder I downloaded.
Generating SSH Key-pair
The Key-pair are two key, one Public and one privet which together allow us to establish an encrypted connection.I generated a ssh key-pair by following this tutorial.
Now the SSH key-pair are created and added to the ssh-agent, so we have to upload the public key to github/gitlab. In order to do that we used a command line tool called xclip. So we installed it by typing: sudo apt-get install xclip.Then typing : gedit id_rsa.pub.
To clone a repository using a SSH connection we typed this:
cd ~ #go to the home directory.
git clone git@gitlab.fabcloud.org:preacademy/preacademy2018.git
How to get the download the other student work and upload my work ??
- To download the other student work simply open the terminal widow inside the repository folder and type : git pull.
- To upload the changed i did in the repository simply follow the steps:
- git pull # pull other students changes
- git add --all # add my changes
- git commit -m "message" # write a meaningful message
- git push # push to the archive
Very important notes regarding the documentation
- Documentation must be done day by day in order to by more organized. - To write the documentation I'm using an open source text editor called atom. use SHIFT+CONTROL+M to preview the work.
- To convert .md files to .html filesi used a command line tool called pandoc but first we must install pandoc by typing this in the terminal:
sudo apt-get install pandoc
- To style our HTML we used CSS by using the option -c style.css. I used this css style. Just open it and choose Raw view then copy all the code and paste it in the style.css file.
- This is the command line used for convention.
pandoc -s -t html -c style.css file.md -o file.html
- If we have multiple md file need to be converted to html it is prefer to automate the operation by write all the conversions command line in an auto.sh file with the git repository command line and run the .sh file whenever we need to convert a file by typing bash auto in the terminal windows.
- In auto.sh we included 2 option regarding push the change we have done. if we want to push we write a message after bash.auto, if we don't want to push we don't write any message so it will just convert without push the change.