<commit_before>Printipi
========

Printipi is a software package designed to bring 3d printing to the Raspberry Pi. It takes on all of the roles generally given to dedicated microcontrollers (interfacing with stepper drivers, temperature control of the hotend, and cooling fans) while also running under an operating system. This means that the same device that is running the firmware can also perform other tasks while printing, such as hosting a web interface like Octoprint.

Although called Printi<i>pi</i>, it is not necessarily limited to running on the Pi. New platforms can be supported by implementing a handful of interfaces (see the [wiki](https://github.com/Wallacoloo/printipi/wiki/Adding-support-for-a-new-CPU-architecture) page for more info)

Printipi also aims to support a multitude of printers including typical cartesian printers (supported), deltabot-style printers (supported), or polar-based printers (not yet supported) - **without** the messy use of hundreds of #defines, some of which may not even be applicable to your printer. Instead, each machine type gets its own file and C++ class under src/machines that exposes its coordinate system and peripherals through a handful of public member functions. In this way it is possible to add support for a new type of printer without digging into the guts of Printipi.

**Note:** The documentation for Printipi is still a bit lacking. As of this time, it is *not* recommended to users who aren't comfortable with digging into the source code to figure out how things work.

Demos
========

Printipi powering a Mini Kossel @ 120mm/sec (2014/10/19): http://youtu.be/gAruwqOEuPs  
Printipi powering a Mini Kossel (2014/08/18): http://youtu.be/g4UD5MRas3E  

Compiling
========

**Prereqs**: gcc >= 4.6, clang++ >= 3.4 or another compiler with support for C++11  
gcc >= 4.7 is highly recommended because of the benefits gained from link-time optimization, which isn't supported in gcc 4.6 when using C++11  
gcc 4.7 can be installed in the stock version of Raspbian via `sudo apt-get install g++-4.7` and to use it over the system's gcc, compile with `make CXX=g++-4.7`

First, get the sources: `git clone https://github.com/Wallacoloo/printipi.git`  

To compile Printipi, navigate to the src directory and type `make MACHINE=<path/to/machine.h> <target>`, where `<machine>` is the **relative** path to some machine contained under src/machines, e.g. `rpi/kosselrampsfd.h` or the `generic/cartesian.h` machine, and `<target>` is either debug, release, debugrel, profile, or minsize. Both are case-sensitive. Example: `make MACHINE=rpi/kosselrampsfd.h release`.

A binary will be produced under the `build` directory with the name `printipi`. Navigate to that folder and run the binary (you will want root permissions in order to elevate the priority of the task, so run e.g. `sudo ./printipi`).
<commit_msg>Clarify that building is best done on the pi itself<commit_after>Printipi
========

Printipi is a software package designed to bring 3d printing to the Raspberry Pi. It takes on all of the roles generally given to dedicated microcontrollers (interfacing with stepper drivers, temperature control of the hotend, and cooling fans) while also running under an operating system. This means that the same device that is running the firmware can also perform other tasks while printing, such as hosting a web interface like Octoprint.

Although called Printi<i>pi</i>, it is not necessarily limited to running on the Pi. New platforms can be supported by implementing a handful of interfaces (see the [wiki](https://github.com/Wallacoloo/printipi/wiki/Adding-support-for-a-new-CPU-architecture) page for more info)

Printipi also aims to support a multitude of printers including typical cartesian printers (supported), deltabot-style printers (supported), or polar-based printers (not yet supported) - **without** the messy use of hundreds of #defines, some of which may not even be applicable to your printer. Instead, each machine type gets its own file and C++ class under src/machines that exposes its coordinate system and peripherals through a handful of public member functions. In this way it is possible to add support for a new type of printer without digging into the guts of Printipi.

**Note:** The documentation for Printipi is still a bit lacking. As of this time, it is *not* recommended to users who aren't comfortable with digging into the source code to figure out how things work.

Demos
========

Printipi powering a Mini Kossel @ 120mm/sec (2014/10/19): http://youtu.be/gAruwqOEuPs  
Printipi powering a Mini Kossel (2014/08/18): http://youtu.be/g4UD5MRas3E  

Compiling
========

**Prereqs**: gcc >= 4.6, clang++ >= 3.4 or another compiler with support for C++11  
gcc >= 4.7 is highly recommended because of the benefits gained from link-time optimization, which isn't supported in gcc 4.6 when using C++11  
gcc 4.7 can be installed in the stock version of Raspbian via `sudo apt-get install g++-4.7` and to use it over the system's gcc, compile with `make CXX=g++-4.7`

The easiest way to build Printipi is to actually do the compilation directly on the Raspberry Pi.

First, log into your Raspberry Pi and get the sources: `git clone https://github.com/Wallacoloo/printipi.git`  

Then navigate to the src directory and type `make MACHINE=<path/to/machine.h> <target>`, where `<machine>` is the **relative** path to some machine contained under src/machines, e.g. `rpi/kosselrampsfd.h` or the `generic/cartesian.h` machine, and `<target>` is either debug, release, debugrel, profile, or minsize. Both are case-sensitive. Example: `make MACHINE=rpi/kosselrampsfd.h release`.

A binary will be produced under the `build` directory with the name `printipi`. Navigate to that folder and run the binary (you will want root permissions in order to elevate the scheduling priority of the task, so run e.g. `sudo ./printipi`).

{'fraction_non_alphanumeric': 0.0804189896942051, 'fraction_numerical': 0.013853691501942897, 'mean_word_length': 4.606060606060606, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 21, 'https://': 4, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6827212', 'n_tokens_mistral': 1711, 'n_tokens_neox': 1605, 'n_words': 837}