surplus/README.md

149 lines
5.3 KiB
Markdown
Raw Normal View History

2023-06-02 19:39:25 +00:00
# surplus
2024-06-18 10:53:38 +00:00
surplus (s+) is a Python script to convert [Google Maps Plus Codes](https://maps.google.com/pluscodes/)
to iOS Shortcuts-like shareable text
2023-06-02 19:39:25 +00:00
2024-06-18 10:53:38 +00:00
- [quickstart](#quickstart)
2024-06-18 10:55:15 +00:00
- [documentation](https://surplus.joshwel.co)
- [the user's guide (command-line)](https://surplus.joshwel.co/using#as-a-command-line-tool)
- [the user's guide (library)](https://surplus.joshwel.co/using#as-a-library)
- [the developer's guide](https://surplus.joshwel.co/developing)
- [api reference](https://surplus.joshwel.co/developing)
- [the contributor's guide](https://surplus.joshwel.co/contributing)
2024-06-18 10:53:38 +00:00
this repository is also monorepo for the following sibling projects:
2024-06-18 10:55:15 +00:00
- **surplus on wheels** (s+ow)
2024-06-18 10:53:38 +00:00
a pure shell script to get your location using `termux-location`, process it through surplus, and
send it to messaging service or wherever, using "bridges"
2024-06-18 10:55:15 +00:00
- **surplus on wheels: Whatsapp Bridge**
- **surplus on wheels: Telegram Bridge**
2024-06-18 10:53:38 +00:00
## quickstart
2024-06-18 10:53:38 +00:00
> [!TIP]
2024-06-18 10:55:15 +00:00
> termux users can consider [surplus on wheels](https://surplus.joshwel.co/onwheels), a sibling
2024-06-18 10:53:38 +00:00
> project that allows you to run surplus regularly throughout the day and send it to someone on a
> messaging platform
> [!IMPORTANT]
2024-06-18 10:53:38 +00:00
> python 3.11 or later is required due to a bug in earlier versions
> [(python/cpython#88089)](https://github.com/python/cpython/issues/88089)
2024-06-18 10:53:38 +00:00
install surplus with pip, or [pipx](https://pipx.pypa.io/) (recommended):
2024-06-18 10:53:38 +00:00
```text
pipx install surplus
```
2024-06-18 10:53:38 +00:00
then, use the `surplus` command, or its `s+` shorthand:
2024-06-18 10:53:38 +00:00
```text
$ s+ 7RGX+GJ Singapore
2024-06-18 10:55:15 +00:00
surplus version 2024.0.0-beta
2024-06-18 10:53:38 +00:00
Singapore Conference Hall
7 Shenton Way
068809
Central, Singapore
```
2024-06-18 10:53:38 +00:00
the types of queries you can pass in are:
2024-06-18 10:55:15 +00:00
- full-length Plus Codes
2024-06-18 10:53:38 +00:00
`6PH58QMF+FX`
2024-06-18 10:55:15 +00:00
- shortened Plus Codes / 'local codes'
2024-06-18 10:53:38 +00:00
`8QMF+FX Singapore`
2024-06-18 10:55:15 +00:00
- latitude and longitude coordinate pairs
2024-06-18 10:53:38 +00:00
`1.3336875, 103.7749375`
2024-06-18 10:55:15 +00:00
- string queries
2024-06-18 10:53:38 +00:00
`Wisma Atria`
2024-06-18 10:53:38 +00:00
or, alternatively pass in `-` to read from stdin
2024-06-18 10:55:15 +00:00
more documentation is available at <https://surplus.joshwel.co>,
2024-06-18 10:53:38 +00:00
or alternatively available locally in the [docs/](docs) folder
2024-06-18 10:53:38 +00:00
## licences
2024-06-18 10:55:15 +00:00
- [**surplus**](src/surplus)
2024-06-18 10:53:38 +00:00
The Unlicence
2024-06-18 10:53:38 +00:00
surplus is free and unencumbered software released into the public domain. for more information,
please refer to the [UNLICENCE](src/surplus/UNLICENCE), <https://unlicense.org>, or the python
module docstring
2024-06-18 10:55:15 +00:00
however, the dependencies surplus relies on are licenced under different, but still permissive
and open-source licences:
2024-06-18 10:55:15 +00:00
- [**geopy**](https://pypi.org/project/geopy/) —
Python Geocoding Toolbox
2024-06-18 10:53:38 +00:00
MIT Licence
2024-06-18 10:55:15 +00:00
- [**geographiclib**](https://pypi.org/project/geographiclib/) —
The geodesic routines from GeographicLib
2024-06-18 10:53:38 +00:00
MIT Licence
2024-06-18 10:55:15 +00:00
- [**pluscodes**](https://pypi.org/project/pluscodes/) —
Compute Plus Codes (Open Location Codes)
2024-06-18 10:53:38 +00:00
Apache 2.0
2024-06-18 10:55:15 +00:00
- [**surplus on wheels**](src/surplus-on-wheels)
2024-06-18 10:53:38 +00:00
The Unlicence
2024-06-18 10:53:38 +00:00
surplus on wheels is free and unencumbered software released into the public domain. for more
information, please refer to [UNLICENCE](src/surplus-on-wheels/UNLICENCE) or
2024-06-18 10:55:15 +00:00
<http://unlicense.org/>
2023-06-02 19:39:25 +00:00
2024-06-18 10:55:15 +00:00
- [**surplus on wheels: WhatsApp Bridge**](src/spow-whatsapp-bridge)
2024-06-18 10:53:38 +00:00
Mozilla Public Licence 2.0
2024-06-18 10:53:38 +00:00
the s+ow WhatsApp Bridge is based off mdtest code from the
[whatsmeow](https://github.com/tulir/whatsmeow) project, which is licenced under the Mozilla
Public Licence 2.0. for more information, see [LICENCE](src/spow-whatsapp-bridge/LICENCE), or
<https://www.mozilla.org/en-US/MPL/2.0/>
2024-06-18 10:53:38 +00:00
the direct dependencies s+ow-whatsapp-bridge relies on are licenced under different, but still
permissive and open-source licences:
2024-06-18 10:53:38 +00:00
- [**whatsmeow**](https://github.com/tulir/whatsmeow) —
2024-06-18 10:55:15 +00:00
Go library for the WhatsApp web multidevice API
2024-06-18 10:53:38 +00:00
Mozilla Public Licence 2.0
2024-06-18 10:55:15 +00:00
- [**surplus on wheels: Telegram Bridge**](src/spow-telegram-bridge)
2024-06-18 10:53:38 +00:00
The Unlicence
2024-06-18 10:53:38 +00:00
the s+ow Telegram Bridge is free and unencumbered software released into the public domain. for
more information, please refer to the [UNLICENCE](src/spow-telegram-bridge/UNLICENCE),
<https://unlicense.org>, or the python module docstring
2024-06-18 10:53:38 +00:00
however, the direct dependencies surplus relies on are licenced under different, but still
permissive and open-source licences:
2024-06-18 10:55:15 +00:00
- [**Telethon**](https://pypi.org/project/Telethon/) —
Pure Python 3 MTProto API Telegram client library, for bots too!
2024-06-18 10:53:38 +00:00
MIT Licence
2024-06-18 10:55:15 +00:00
- [**surplus documentation**](docs)
CC0 1.0 Universal
the textual contents of surplus documentation by [Mark Joshwel](https://joshwel.co) is marked
with [CC0 1.0 Universal](https://creativecommons.org/publicdomain/zero/1.0/).
to view a copy of this license, visit <https://creativecommons.org/publicdomain/zero/1.0/>
the fonts the documentation website relies on are licenced under different, but still
permissive and open-source licences:
- [**Geist and Geist Mono**](https://github.com/vercel/geist-font)
SIL Open Font Licence 1.1 ([file](docs/fonts/LICENSE.txt))
the direct software dependencies the documentation are also licenced under different, but still
permissive and open-source licences:
- [**mkdocs-material**](https://squidfunk.github.io/mkdocs-material/) —
Documentation that simply works
MIT Licence
- [**mkdocs**](https://www.mkdocs.org/) —
Project documentation with Markdown
BSD-2-Clause Licence