Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Library manual #42

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions Library_Manual/.editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# http://EditorConfig.org

root = true

[*]
charset = utf-8
indent_style = space
indent_size = 2
end_of_line = lf
trim_trailing_whitespace = true
insert_final_newline = true
2 changes: 2 additions & 0 deletions Library_Manual/.gitattributes
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# Disable automatic end-of-line conversion for all files.
* -text
8 changes: 8 additions & 0 deletions Library_Manual/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
artifacts/
index.html
index.pdf
Thumbs.db
.DS_Store
*.autosave
*.swp
*~
14 changes: 14 additions & 0 deletions Library_Manual/.travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
language: ruby
notifications:
email:
on_success: change
on_failure: change

install:
- gem install asciidoctor pygments.rb rouge concurrent-ruby
- gem install asciidoctor-pdf --pre

script:
- ./ci/stylecheck.sh || travis_terminate 1
- ./ci/build.sh || travis_terminate 1
- ./ci/upload_artifacts.sh || travis_terminate 1
81 changes: 81 additions & 0 deletions Library_Manual/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,81 @@
# Contributing Guidelines

## Notes

- **Before spending lots of time on something, ask for feedback on your idea first!**
- Please search issues and pull requests before adding something new to avoid
duplicating efforts and conversations.
- To contact us use one of the following options:
- GitHub issues
- Our [discussion platform](https://librepcb.discourse.group/)
- [IRC](https://webchat.freenode.net/?channels=#librepcb) or
[Telegram](https://telegram.me/LibrePCB_dev) chat (they are automatically
synchronized)


## Getting Started

- Make sure you have a [GitHub account](https://github.com/signup/free).
- Fork the repository on GitHub.


## Making Changes

- Create a topic branch from where you want to base your work.
- This is usually the `master` branch.
- To quickly create a topic branch based on `master`:
`git checkout -b my_contribution master`
- Please avoid working directly on the `master` branch.
- Write documentation which follows our styleguide (explained below).
- Make commits of logical units.
- Make sure your commit messages are in the
[proper format](http://chris.beams.io/posts/git-commit/).
- Build and review the documentation to ensure it looks as expected (see
[README.md](README.md) for instructions).


## Submitting Changes

- Push your changes to a topic branch in your fork of the repository.
- Submit a pull request to the repository in the LibrePCB organization.
- We will then check the pull request and give you feedback quickly.


## Style Guide

To ensure a consistent look&feel across the whole documentation (both source
and rendered output), please follow these rules:

### Source Files (`*.adoc`)

- UTF-8 encoding
- Unix line endings (LF)
- Line length max. 80 characters (except long URLs etc.)
- No trailing whitespaces
- 2 empty lines to separate chapters
- 1 empty line within chapters, e.g. to separate text blocks

### Screenshots

- Use PNG as image format.
- Screenshots must be captured on a standard Ubuntu distribution (you can
use a virtual machine if you don't have an Ubuntu system).
- Make sure the image background (everything outside the captured window, e.g.
around the rounded corners) is transparent.
- Always use the workspace [`./resources/workspace`](resources/workspace/) when
taking screenshots.
- If the library elements or projects to be captured are not yet available
in the mentioned workspace, please add them to the workspace by yourself.
- When creating new library elements or projects, always use "me" as author
(instead of your real name).
- Use small window sizes to get screenshots filled with information instead of
blank areas. The smaller, the better. A resolution of 1000x700 Pixels must
not be exceeded.
- If reasonable, highlight the relevant information in screenshots with red
boxes/circles/arrows.


## Additional Resources

- [General GitHub documentation](https://help.github.com/)
- [GitHub pull request documentation](https://help.github.com/send-pull-requests/)
116 changes: 116 additions & 0 deletions Library_Manual/LICENSE.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,116 @@
CC0 1.0 Universal

Statement of Purpose

The laws of most jurisdictions throughout the world automatically confer
exclusive Copyright and Related Rights (defined below) upon the creator and
subsequent owner(s) (each and all, an "owner") of an original work of
authorship and/or a database (each, a "Work").

Certain owners wish to permanently relinquish those rights to a Work for the
purpose of contributing to a commons of creative, cultural and scientific
works ("Commons") that the public can reliably and without fear of later
claims of infringement build upon, modify, incorporate in other works, reuse
and redistribute as freely as possible in any form whatsoever and for any
purposes, including without limitation commercial purposes. These owners may
contribute to the Commons to promote the ideal of a free culture and the
further production of creative, cultural and scientific works, or to gain
reputation or greater distribution for their Work in part through the use and
efforts of others.

For these and/or other purposes and motivations, and without any expectation
of additional consideration or compensation, the person associating CC0 with a
Work (the "Affirmer"), to the extent that he or she is an owner of Copyright
and Related Rights in the Work, voluntarily elects to apply CC0 to the Work
and publicly distribute the Work under its terms, with knowledge of his or her
Copyright and Related Rights in the Work and the meaning and intended legal
effect of CC0 on those rights.

1. Copyright and Related Rights. A Work made available under CC0 may be
protected by copyright and related or neighboring rights ("Copyright and
Related Rights"). Copyright and Related Rights include, but are not limited
to, the following:

i. the right to reproduce, adapt, distribute, perform, display, communicate,
and translate a Work;

ii. moral rights retained by the original author(s) and/or performer(s);

iii. publicity and privacy rights pertaining to a person's image or likeness
depicted in a Work;

iv. rights protecting against unfair competition in regards to a Work,
subject to the limitations in paragraph 4(a), below;

v. rights protecting the extraction, dissemination, use and reuse of data in
a Work;

vi. database rights (such as those arising under Directive 96/9/EC of the
European Parliament and of the Council of 11 March 1996 on the legal
protection of databases, and under any national implementation thereof,
including any amended or successor version of such directive); and

vii. other similar, equivalent or corresponding rights throughout the world
based on applicable law or treaty, and any national implementations thereof.

2. Waiver. To the greatest extent permitted by, but not in contravention of,
applicable law, Affirmer hereby overtly, fully, permanently, irrevocably and
unconditionally waives, abandons, and surrenders all of Affirmer's Copyright
and Related Rights and associated claims and causes of action, whether now
known or unknown (including existing as well as future claims and causes of
action), in the Work (i) in all territories worldwide, (ii) for the maximum
duration provided by applicable law or treaty (including future time
extensions), (iii) in any current or future medium and for any number of
copies, and (iv) for any purpose whatsoever, including without limitation
commercial, advertising or promotional purposes (the "Waiver"). Affirmer makes
the Waiver for the benefit of each member of the public at large and to the
detriment of Affirmer's heirs and successors, fully intending that such Waiver
shall not be subject to revocation, rescission, cancellation, termination, or
any other legal or equitable action to disrupt the quiet enjoyment of the Work
by the public as contemplated by Affirmer's express Statement of Purpose.

3. Public License Fallback. Should any part of the Waiver for any reason be
judged legally invalid or ineffective under applicable law, then the Waiver
shall be preserved to the maximum extent permitted taking into account
Affirmer's express Statement of Purpose. In addition, to the extent the Waiver
is so judged Affirmer hereby grants to each affected person a royalty-free,
non transferable, non sublicensable, non exclusive, irrevocable and
unconditional license to exercise Affirmer's Copyright and Related Rights in
the Work (i) in all territories worldwide, (ii) for the maximum duration
provided by applicable law or treaty (including future time extensions), (iii)
in any current or future medium and for any number of copies, and (iv) for any
purpose whatsoever, including without limitation commercial, advertising or
promotional purposes (the "License"). The License shall be deemed effective as
of the date CC0 was applied by Affirmer to the Work. Should any part of the
License for any reason be judged legally invalid or ineffective under
applicable law, such partial invalidity or ineffectiveness shall not
invalidate the remainder of the License, and in such case Affirmer hereby
affirms that he or she will not (i) exercise any of his or her remaining
Copyright and Related Rights in the Work or (ii) assert any associated claims
and causes of action with respect to the Work, in either case contrary to
Affirmer's express Statement of Purpose.

4. Limitations and Disclaimers.

a. No trademark or patent rights held by Affirmer are waived, abandoned,
surrendered, licensed or otherwise affected by this document.

b. Affirmer offers the Work as-is and makes no representations or warranties
of any kind concerning the Work, express, implied, statutory or otherwise,
including without limitation warranties of title, merchantability, fitness
for a particular purpose, non infringement, or the absence of latent or
other defects, accuracy, or the present or absence of errors, whether or not
discoverable, all to the greatest extent permissible under applicable law.

c. Affirmer disclaims responsibility for clearing rights of other persons
that may apply to the Work or any use thereof, including without limitation
any person's Copyright and Related Rights in the Work. Further, Affirmer
disclaims responsibility for obtaining any necessary consents, permissions
or other rights required for any use of the Work.

d. Affirmer understands and acknowledges that Creative Commons is not a
party to this document and has no duty or obligation with respect to this
CC0 or use of the Work.

For more information, please see
<http://creativecommons.org/publicdomain/zero/1.0/>
44 changes: 44 additions & 0 deletions Library_Manual/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# LibrePCB Documentation

[![Travis Build Status](https://travis-ci.org/LibrePCB/librepcb-doc.svg?branch=master)](https://travis-ci.org/LibrePCB/librepcb-doc)

This repository contains the source for the [LibrePCB](http://librepcb.org)
documentation hosted at [docs.librepcb.org](https://docs.librepcb.org).

- HTML output of `master`: https://docs.librepcb.org
- PDF output of `master`: [librepcb-user-manual-nightly.pdf](https://download.librepcb.org/nightly_builds/master/librepcb-user-manual-nightly.pdf)
- HTML output of other branches: https://docs.librepcb.org/_branches/
- PDF output of other branches: https://download.librepcb.org/nightly_builds/

## Requirements

The documentation is written in [Asciidoc](https://asciidoctor.org/docs/what-is-asciidoc/)
and built with [Asciidoctor](https://asciidoctor.org/).

On Linux the required tools can be installed with following commands:

gem install asciidoctor pygments.rb rouge
gem install asciidoctor-pdf --pre

## Building

asciidoctor index.adoc # build index.html
asciidoctor-pdf index.adoc # build index.pdf

## Contributing

Contributions are very welcome! See our [Contributing Guide](CONTRIBUTING.md)
for details. We're looking forward for pull requests :)

## Links

- [AsciiDoc Syntax Quick Reference](https://asciidoctor.org/docs/asciidoc-syntax-quick-reference/)
- [Asciidoc Writer's Guide](https://asciidoctor.org/docs/asciidoc-writers-guide/)
- [Asciidoctor User Manual](https://asciidoctor.org/docs/user-manual/)
- [AsciidocFX](https://www.asciidocfx.com/) (Asciidoc editor with live preview)

## License

This documentation is published under the
[CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/legalcode)
license.
53 changes: 53 additions & 0 deletions Library_Manual/github.com/github.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
[#using_github]
=== Forking a LibrePCB library

Visit the LibrePCB-Libraries account on github.com and locate the library that you wish to edit.Fork it and set a Watch. This will
create a cloned repo of the same name under your github.com account.

Create a library workspace and go to the local library directory:

~/LibrePCB-LibWorkspace/v0.1/libraries/local/
git clone https://github.com/yourname/LibrePCB_XXX.lplib

Next you change into that repo and configure it to point back to its original LibrePCB-Libraries source:

~/LibrePCB-LibWorkspace/v0.1/libraries/local/LibrePCB_XXX.lplib/
git remote add upstream https://github.com/LibrePCB-Libraries/LibrePCB_XXX.lplib.git

Now merge any new changes into your local copy and push them back to your github.com account. Do this before
makeing any pull requests to ensure that you have the latest bits:

git fetch upstream
git checkout master
git merge upstream/master
git push origin master


=== Creating a new local library

Create a new repository in your github.com account. Use the form LibrePCB_XXX.lplib for the name.

Create a new local library in the LibrePCB library workspace and then link it to your github.com repo:

~/LibrePCB-LibWorkspace/v0.3/libraries/local/LibrePCB_XXX.lplib
cd existing-dir
git clone --bare https://github.com/username/LibrePCB_XXX.lplib.git
git config --unset core.bare
git reset

=== Editing the library

Never work in the master branch. Create your own branch and use that for all of your changes. When finished add and commit all of your changes:

~/LibrePCB-LibWorkspace/v0.3/libraries/local/LibrePCB_XXX.lplib
git checkout -b my_branch_name
git add .
git commit
git push origin my_branch_name

You can now go to github.com and issue a pull request to alert the rest of the team that your release candidate is ready for review. Remember that
the success of LibrePCB will depend on the quality of the libraries so don't be surprised if the expectations seem a little high. That is deliberate. You are always welcome to host your code on github.com but if you want to deliver it via the LibrePCB server then it must meet team standards.




14 changes: 14 additions & 0 deletions Library_Manual/github.com/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
[#usinggit]
== Setting up and using GIT With LibrePCB
:imagesdir: using_git

All of the official LibrePCB libraries are hosted in repositories on github.com under the username LibrePCB-Libraries
and are available for download. They are also mirrored on the LibrePCB.org library server. Anyone wanting to donate to
these libraries must have a github.com account and follow the procedures outlined in this document.

Librarians should always create a separate LibrePCB workspace and only use it for editing libraries. Edits can only be done
on local libraries and you cannot have a remote copy of any library that you are working on in the workspace.

include::github.adoc[]


20 changes: 20 additions & 0 deletions Library_Manual/index.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
= LibrePCB Librarians Manual
:toc: left
:toclevels: 5
:sectnums:
:sectnumlevels: 3
:sectlinks:
:icons: font
:source-highlighter: pygments
:pygments-style: monokai
:docinfo: shared

// LibrePCB Variables
:version: 0.1.2
:releases_url: https://download.librepcb.org/releases/{version}

include::github.com/index.adoc[]




Loading