Skip to content

Commit

Permalink
first commit
Browse files Browse the repository at this point in the history
  • Loading branch information
cmitsakis committed Aug 27, 2021
0 parents commit 17ef962
Show file tree
Hide file tree
Showing 57 changed files with 6,544 additions and 0 deletions.
6 changes: 6 additions & 0 deletions .gitmessage.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@

# Enter the commit message above this line.
# Do not edit anything below this line
# unless you know what you are doing.

License: BlueOak-1.0.0
55 changes: 55 additions & 0 deletions LICENSE-BlueOak.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Blue Oak Model License

Version 1.0.0

## Purpose

This license gives everyone as much permission to work with
this software as possible, while protecting contributors
from liability.

## Acceptance

In order to receive this license, you must agree to its
rules. The rules of this license are both obligations
under that agreement and conditions to your license.
You must not do anything with this software that triggers
a rule that you cannot or will not follow.

## Copyright

Each contributor licenses you to do everything with this
software that would otherwise infringe that contributor's
copyright in it.

## Notices

You must ensure that everyone who gets a copy of
any part of this software from you, with or without
changes, also gets the text of this license or a link to
<https://blueoakcouncil.org/license/1.0.0>.

## Excuse

If anyone notifies you in writing that you have not
complied with [Notices](#notices), you can keep your
license by taking all practical steps to comply within 30
days after the notice. If you do not do so, your license
ends immediately.

## Patent

Each contributor licenses you to do everything with this
software that would otherwise infringe any patent claims
they can license or become able to license.

## Reliability

No contributor can revoke this license.

## No Liability

***As far as the law allows, this software comes as is,
without any warranty or condition, and no contributor
will be liable to anyone for any damages related to this
software or this license, under any kind of legal claim.***
96 changes: 96 additions & 0 deletions LICENSE-PolyForm-Internal-Use.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,96 @@
# PolyForm Internal Use License 1.0.0

<https://polyformproject.org/licenses/internal-use/1.0.0>

## Acceptance

In order to get any license under these terms, you must agree
to them as both strict obligations and conditions to all
your licenses.

## Copyright License

The licensor grants you a copyright license for the software
to do everything you might do with the software that would
otherwise infringe the licensor's copyright in it for any
permitted purpose. However, you may only make changes or
new works based on the software according to [Changes and New
Works License](#changes-and-new-works-license), and you may
not distribute the software.

## Changes and New Works License

The licensor grants you an additional copyright license to
make changes and new works based on the software for any
permitted purpose.

## Patent License

The licensor grants you a patent license for the software that
covers patent claims the licensor can license, or becomes able
to license, that you would infringe by using the software.

## Fair Use

You may have "fair use" rights for the software under the
law. These terms do not limit them.

## Internal Business Use

Use of the software for the internal business operations of
you and your company is use for a permitted purpose.

## No Other Rights

These terms do not allow you to sublicense or transfer any of
your licenses to anyone else, or prevent the licensor from
granting licenses to anyone else. These terms do not imply
any other licenses.

## Patent Defense

If you make any written claim that the software infringes or
contributes to infringement of any patent, your patent license
for the software granted under these terms ends immediately. If
your company makes such a claim, your patent license ends
immediately for work on behalf of your company.

## Violations

The first time you are notified in writing that you have
violated any of these terms, or done anything with the software
not covered by your licenses, your licenses can nonetheless
continue if you come into full compliance with these terms,
and take practical steps to correct past violations, within
32 days of receiving notice. Otherwise, all your licenses
end immediately.

## No Liability

***As far as the law allows, the software comes as is, without
any warranty or condition, and the licensor will not be liable
to you for any damages arising out of these terms or the use
or nature of the software, under any kind of legal claim.***

## Definitions

The **licensor** is the individual or entity offering these
terms, and the **software** is the software the licensor makes
available under these terms.

**You** refers to the individual or entity agreeing to these
terms.

**Your company** is any legal entity, sole proprietorship,
or other kind of organization that you work for, plus all
organizations that have control over, are under the control of,
or are under common control with that organization. **Control**
means ownership of substantially all the assets of an entity,
or the power to direct its management and policies by vote,
contract, or otherwise. Control can be direct or indirect.

**Your licenses** are all the licenses granted to you for the
software under these terms.

**Use** means anything you do with the software requiring one
of your licenses.
14 changes: 14 additions & 0 deletions LICENSE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
## License

Copyright (C) 2021 Charalampos Mitsakis

*Polysender* is licensed under the terms of the [PolyForm Internal Use License 1.0.0](LICENSE-PolyForm-Internal-Use.md).
This is a source-available license that permits use and modifications for internal business purposes only, while prohibiting distribution, SaaS, and service bureau use.

Third-party contributions are licensed under the terms of the [Blue Oak Model License 1.0.0](LICENSE-BlueOak.md).

As additional permission, you are allowed to contribute your modifications back as pull requests to [this repository](https://github.com/cmitsakis/polysender),
provided that your contributions are licensed under the terms of the *Blue Oak Model License 1.0.0*.
By submitting a pull request you certify that you can and do license your contribution under the terms of the *Blue Oak Model License 1.0.0*.
Publicly maintaining an independent fork is not permitted.
This additional permission does not allow you to modify the license, the additional permission, or the copyright notice.
124 changes: 124 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,124 @@
# Polysender

Send email and SMS broadcasts to your contacts.

*Polysender* is a desktop application, so it does not require a complicated server setup.

Emails are sent via an SMTP service of your choice.

SMS are sent via your *Android* phone connected to your computer with the help of [third party software](#third-party-software).

![Demo video](../media/demo.webp?raw=true)

## Supported platforms

It should work on *Linux*, *Windows 8.1+*, *macOS 10.13+*, although it has only been tested on *Linux* and *macOS 11*.

Sending SMS via *ADB* is supported on *Android* versions from 5 to 10 but it might not work on some versions since it hasn't been tested.
*Android 11* is not supported yet.

## Warning

This is alpha quality software released for testing purposes. Not recommended for production use. Bug reports are appreciated.

You are responsible for compliance with laws and regulations regarding electronic communications, and your carrier's terms of service.

## Installation

### Option 1: Download release binary (recommended)

Download the latest [release](https://github.com/cmitsakis/polysender/releases) and run it. No installation is required.

#### macOS

On *macOS* you have to remove the application from *quarantine* by running the following command:

```sh
xattr -d com.apple.quarantine /path/to/polysender
```

### Option 2: Build from source

If you have installed the compile-time requirements
([Go](https://golang.org/) and [Fyne prerequisites](https://developer.fyne.io/started/#prerequisites)),
you can install *Polysender* using the following command:

```sh
go install go.polysender.org/cmd/polysender@latest
```

### Third-party software

In order to send SMS, you have to install *ADB*.

*ADB* might not work on all *Android* versions.
It requires your phone is connected over USB and has USB debugging enabled.

Alternatively you can install *KDE Connect* but it currently doesn't work. It's included for testing purposes only.

#### ADB (recommended)

1. [download](https://developer.android.com/studio/releases/platform-tools#downloads) and install *ADB*
2. start *ADB*
3. connect your *Android* phone to your computer via USB
4. enable developer options and USB debugging on your phone
- [instructions](https://developer.android.com/studio/debug/dev-options) for most *Android* phones
- [instructions](https://help.airdroid.com/hc/en-us/articles/360045329413-How-to-Enable-USB-debugging-on-Xiaomi-) for *Xiaomi* phones

#### KDE Connect (for testing only)

1. [download](https://kdeconnect.kde.org/download.html) and install *KDE Connect*.
Windows users can also install it from the [Microsoft store](https://www.microsoft.com/store/apps/9N93MRMSXBF0).
2. install the *KDE Connect* [app](https://play.google.com/store/apps/details?id=org.kde.kdeconnect_tp) on your *Android* phone
3. [pair](https://userbase.kde.org/KDEConnect#Pairing_two_devices_together) your phone with your computer

*KDE Connect* does not support *macOS*.

## Contributing

### Reporting bugs

Good bug reports are the most valuable contribution, if they include enough information to reproduce the bug.

Please search existing issues before opening a new one. If an issue already exists, you can add more information.

Your bug reports should include:

1. steps to reproduce the bug (this is very important!)
2. what you expected to happen
3. what actually happens
4. screenshots or logs if possible (make sure to remove any personally identifiable information like emails, phones)
5. the version you are using (including *ADB* or *KDE Connect* version if applicable)
6. your operating system

### Contributing code

- Create small PRs addressing a single issue
- Maintain clean commit history with atomic commits
- Mention the issue number in your commit messages
- Major changes and new features should be discussed first

#### Contributions license

Your contributions must be licensed under the terms of the *Blue Oak Model License 1.0.0* (see [License](#license)).
Add `License: BlueOak-1.0.0` as a trailer at the end of your commit messages to acknowledge this.
You can configure *Git* to add this trailer automatically on all your commits for this repository (whenever you use `git commit` without `-m`) by running the following command at the root of this repository:

```sh
git config commit.template .gitmessage.txt
```

## License

Copyright (C) 2021 Charalampos Mitsakis

*Polysender* is licensed under the terms of the [PolyForm Internal Use License 1.0.0](LICENSE-PolyForm-Internal-Use.md).
This is a source-available license that permits use and modifications for internal business purposes only, while prohibiting distribution, SaaS, and service bureau use.

Third-party contributions are licensed under the terms of the [Blue Oak Model License 1.0.0](LICENSE-BlueOak.md).

As additional permission, you are allowed to contribute your modifications back as pull requests to [this repository](https://github.com/cmitsakis/polysender),
provided that your contributions are licensed under the terms of the *Blue Oak Model License 1.0.0*.
By submitting a pull request you certify that you can and do license your contribution under the terms of the *Blue Oak Model License 1.0.0*.
Publicly maintaining an independent fork is not permitted.
This additional permission does not allow you to modify the license, the additional permission, or the copyright notice.
28 changes: 28 additions & 0 deletions cmd/polysender/logutil.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
package main

import (
"runtime"

"fyne.io/fyne/v2"
"fyne.io/fyne/v2/dialog"
)

func logAndReturnError(err error) error {
_, file, line, ok := runtime.Caller(1)
if ok {
logger.Printf("%s:%d: %s", file, line, err)
} else {
loggerInfo.Println(err)
}
return err
}

func logAndShowError(err error, w fyne.Window) {
_, file, line, ok := runtime.Caller(1)
if ok {
logger.Printf("%s:%d: %s", file, line, err)
} else {
loggerInfo.Println(err)
}
dialog.ShowError(err, w)
}
Loading

0 comments on commit 17ef962

Please sign in to comment.