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

Implement --interactive #16

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
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
1 change: 1 addition & 0 deletions .github/FUNDING.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
ko_fi: ewen_lbh
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -141,3 +141,4 @@ dmypy.json
.env
.vscode
.auth-cache--*
**.ai
117 changes: 116 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,115 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


## [Unreleased]

## [0.11.0] - 2020-06-29

### Changed

- Made the "this option cannot be used with Google Keep" more helpful by suggesting to specify a repository
- When you decide to update via the notification, if your upgrade includes a _major_ version bump (i.e. potentially breaking changes happen), the script won't re-run your command automatically to prevent potential problems (eg. you did `ideaseed -ttagname`, then decided to upgrade to `v1.0.0`, but with this new version `-t` is now a shorthand for `--title` instead of `--tag`. `ideaseed -ttagname` won't be run again automatically with the new version to prevent potentially "dangerous" actions)
- The blue accent color used at multiple places was a fixed color, `#268CCE`. It now uses the `blue` ANSI color so that the program uses _your_ blue and conforms to _your_ terminal color scheme.
- Markdown _italic text_, **bold text** and emojis (eg. :penguin:) are rendered in the changelog
- All markdown is rendered in cards (issues, projects and also Google Keep cards), including _italics_, **bold** and emojis.

### Fixed

- A debug `print()` managed to slip through and get into the previous releases (it looked like `bug is ff0000`, and was printing the label name and its color hex code)
- Crash when the `--user-project` was not found or the column of a user project was not found

### Added

- `--config`: A configuration wizard that asks you some questions and sets up the alias for you. The alias is automatically added to the shell's rc file, provided that your login shell is either:
- fish
- bash
- zsh
- csh (not tested)
- ksh (not tested)
- tcsh (not tested)

## [0.10.2] - 2020-06-24

### Fixed

- Prevent update notification from appearing again after an update
- Fix wrong version appearing in:
- update notification message
- --about screen
- --version

## [0.10.1] - 2020-06-24

### Fixed

- Fix crash when adding issue with labels whose hex color representation starts with zero

## [0.10.0] - 2020-06-24

### Fixed

- Labels are created even if 'no' is answered in the prompt (#26)
- Google Keep cards creation when labels were missing (#71 and #51)
- The card was created and its UI shown _before_ prompting to create missing labels, resulting in an internal exception raised by gkeepapi when trying to add a non-existant label (`None has no attribute 'id'`)
- The message to confirm creation of labels had no message (#51)

### Added

- New flag `--dry-run`: Run your commands without creating new cards or issues, but see what it'd run. Mostly used by me for UI testing, but could be useful to some people. (#37)
- New flag shorthand `-#` for `--label` (See #28)
- New flags to change default values for the project and the column: `--default-project` and `--default-column`. Use them in your alias :) (See #30)

### Changed

- Several UI improvements for cards
- Increased spacing between different sections of the cards
- Get rid of the ugly line separator in cards (#34)
- Show labels with their background colors instead of using `[label name]` (#25 and #53)
- Make note content stand out more for project cards created without `--issue` by dimming the card header (#59)
![github issue demo](./CHANGELOG_RESOURCES/v0.10.0/github-issue-card.png)
![google keep demo](CHANGELOG_RESOURCES/v0.10.0/google-keep-card.png)
![github project demo](./CHANGELOG_RESOURCES/v0.10.0/github-project-card.png)
- When attempting to reference missing things without using `--create-missing`, the error message inclues a "tip" (#63):
```sh-session
$ ideaseed -tCodingggg "test"
...
Error: missing tag 'Codingggg'
💡 Use --create-missing and ideaseed will ask you if you want to create missing
labels, issues, projects, columns, milestones...
```
- The 'What has changed?' option now handles correctly upgrading from more than one version away: it prints all the changes that the user needs to know, and not only the latest ones. eg: I'm upgrading from 0.6.0 to 0.10.0, but there has been 0.8.0 and 0.9.0 in between, I want all the changes, not just the ones from 0.9.0 to 0.10.0

## [0.9.1] - 2020-06-23

### Fixed

- Fix `--color` only accepting aliases (#65)

## [0.9.0] - 2020-06-22

### Fixed

- The third example in the `--help` screen was missing a COLUMN argument

### Added

- ideaseed now has a logo! ![ideaseed's logo](https://raw.githubusercontent.com/ewen-lbh/ideaseed/master/visual-identity/ideaseed-logomark-color-transparent.png)

- New flag `-@`/`--assign-to` to assign issues to one or more person. Not specifying this flag still self-assigns you just as before
- New flag `-M`/`--milestone` to add issues to a milestone
- New flag `--no-self-assign` to prevent self-assigning issues.
- Update notification: New option "What has changed?" to read release notes before upgrading

### Changed

- Improved contrast inside cards with bold and colored text
- Colored Google Keep cards see their _text_ colored, not their background, which I thought looked a bit ugly.
- Improved Google Keep "logging in..." messages:
before 0.9.0, the previous line was erased and "Logging in..." was replaced with "Logged in.".
This is pretty cool, but does not work well when there's something else that gets printed, for example when you need to enter credentials to log in. The line no longer gets replaced, but "✅ Logged in." gets printed instead.
- Improved error messages when validating options presence

## [0.8.1] - 2020-06-20

### Fixed
Expand Down Expand Up @@ -94,7 +201,15 @@ Initial release. See <https://pypi.org/project/ideaseed/0.1.0/> for documentatio



[Unreleased]: https://github.com/ewen-lbh/ideaseed/compare/v0.8.1...HEAD


[Unreleased]: https://github.com/ewen-lbh/ideaseed/compare/v0.11.0...HEAD
[0.11.0]: https://github.com/ewen-lbh/ideaseed/compare/v0.10.2...v0.11.0
[0.10.2]: https://github.com/ewen-lbh/ideaseed/compare/v0.10.1...v0.10.2
[0.10.1]: https://github.com/ewen-lbh/ideaseed/compare/v0.10.0...v0.10.1
[0.10.0]: https://github.com/ewen-lbh/ideaseed/compare/v0.9.1...v0.10.0
[0.9.1]: https://github.com/ewen-lbh/ideaseed/compare/v0.9.0...v0.9.1
[0.9.0]: https://github.com/ewen-lbh/ideaseed/compare/v0.8.1...v0.9.0
[0.8.1]: https://github.com/ewen-lbh/ideaseed/compare/v0.8.0...v0.8.1
[0.8.0]: https://github.com/ewen-lbh/ideaseed/compare/v0.7.0...v0.8.0
[0.7.0]: https://github.com/ewen-lbh/ideaseed/compare/v0.6.0...v0.7.0
Expand Down
Binary file added CHANGELOG_RESOURCES/v0.10.0/github-issue-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added CHANGELOG_RESOURCES/v0.10.0/google-keep-card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2020 Ewen Le Bihan

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 0 additions & 2 deletions Makefile

This file was deleted.

102 changes: 74 additions & 28 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
# ideaseed
<center><p align="center">
<img alt="ideaseed" src="https://raw.githubusercontent.com/ewen-lbh/ideaseed/master/visual-identity/ideaseed-logomark-color-transparent.svg" width="550px">
</p></center>

Do you have ideas suddenly and just wished you could catch them as fast as possible, as to not loose them, without having to interrupt what you were doing?

As I guy without a lot of more or less stupid ideas, I use Google Keep as a centralized place to put all of my thoughts that I deem worthy of consideration.
As I guy with a lot of more or less stupid ideas, I use Google Keep as a centralized place to put all of my thoughts that I deem worthy of consideration.

I recently started to use GitHub Projects for _coding_ project ideas as a [single project called "incubator" on my GitHub profile directly](https://github.com/ewen-lbh?tab=projects), and as issues or notes when the idea is related to an already-existing project and repo.

Expand All @@ -22,6 +24,16 @@ pip install ideaseed

See [Installation troubleshooting](#installation-troubleshooting) if you can't install it like this.

## Updating

Except if you specify `--no-check-updates`, the program will automatically check for new versions and ask to upgrade for you (since [v0.4.0]). If you want to upgrade manually, simply run

```sh-session
pip install -U ideaseed
```

To see the version history, you can read the [changelog](https://github.com/ewen-lbh/ideaseed/tree/master/CHANGELOG.md), though, since [v0.9.0], you can read the release notes straight from your terminal by choosing "What has changed?" when the "Upgrade available" notification asks you if you want to update.

## Usage

```bash
Expand All @@ -42,36 +54,58 @@ $ ideaseed --user-keyword=project --user-project=incubator project "a CLI to not

### Arguments

| Argument | Meaning | Default value |
| -------- | -------------------------------------------------------------------------------------------------------------------- | -------------- |
| REPO | Select a repository by name |
| | If not given, uses Google Keep instead of GitHub (or uses your user profile's projects if --project is used) |
| | If --user-keyword's value is given, creates a card on your user's project (select which project with --user-project) |
| | If given in the form OWNER/REPO, uses the repository OWNER/REPO |
| | If given in the form REPO, uses the repository "your username/REPO" |
| PROJECT | Select a project by name to put your card to [default: REPO's value] | `REPO`'s value |
| | If creating a card on your user's project, this becomes the COLUMN |
| COLUMN | Select a project's column by name [default: To-Do] | To-Do |
| | If creating a card on your user's project, this is ignored |
| Argument | Meaning | Default value |
| --------- | -------------------------------------------------------------------------------------------------------------------- | -------------- |
| `REPO` | Select a repository by name |
| | If not given, uses Google Keep instead of GitHub (or uses your user profile's projects if --project is used) |
| | If --user-keyword's value is given, creates a card on your user's project (select which project with --user-project) |
| | If given in the form OWNER/REPO, uses the repository OWNER/REPO |
| | If given in the form REPO, uses the repository "your username/REPO" |
| `PROJECT` | Select a project by name to put your card to [default: REPO's value] | `REPO`'s value |
| | If creating a card on your user's project, this becomes the COLUMN |
| `COLUMN` | Select a project's column by name [default: To-Do] | To-Do |
| | If creating a card on your user's project, this is ignored |

### Options

| Shorthand | Full-length | Description |
| --------- | ---------------------- | --------------------------------------------------------------------------------------------------------------- |
| -c | --color COLOR | Chooses which color to use for Google Keep cards. See [Color names](#color-names) for a list of valid values |
| -t | --tag TAG | Adds tags to the Google Keep card. Can also be used on GitHub together with --issue to add labels to the issue. |
| -i | --issue TITLE | Creates an issue with title TITLE. |
| -I | --interactive | Prompts you for the above options when they are not provided. |
| -L | --logout | Clears the authentification cache |
| -m | --create-missing | Create non-existant tags, projects or columns specified (needs confirmation if -I is used) |
| -o | --open | Open the relevant URL in your web browser. |
| | --pin | Pin the Google Keep card |
| | --about | Details about ideaseed like currently-installed version |
| | --version | Like --about, without dumb and useless stuff |
| | --user-project NAME | Name of the project to use as your user project |
| | --user-keyword NAME | When REPO is NAME, creates a GitHub card on your user profile instead of putting it on REPO |
| | --no-auth-cache | Don't save credentials in a temporary file |
| | --no-check-for-updates | Don't check for updates, don't prompt to update when current version is outdated |
| `-c` | `--color COLOR` | Chooses which color to use for Google Keep cards. See [Color names](#color-names) for a list of valid values |
| `-t` | `--tag TAG` | Adds tags to the Google Keep card. Can also be used on GitHub together with --issue to add labels to the issue. |
| `-i` | `--issue TITLE` | Creates an issue with title TITLE. |
| `-L` | `--logout` | Clears the authentification cache |
| `-m` | `--create-missing` | Create non-existant tags, projects or columns specified (needs confirmation if -I is used) |
| `-o` | `--open` | Open the relevant URL in your web browser. |
| `-l` | `--label LABEL` | Alias for --tag. See --tag's description. |
| `-@` | `--assign-to USERNAME` | Assigns users to the created issue. Only works when --issue is used. |
| `-M` | `--milestone TITLE` | Assign the issue to a milestone with title TITLE. |
| | `--pin` | Pin the Google Keep card |
| | `--config` | Easily configure your ideaseed and create your alias. See [Configuration options](#configuration-options) |
| | `--about` | Details about ideaseed like currently-installed version |
| | `--version` | Like --about, without dumb and useless stuff |

#### Configuration options

Use `ideaseed --config` to set those up automagically. It will ask you questions and append an 'alias' command to your shell's config/rc file.

| Flag | Description |
| ------------------------ | ------------------------------------------------------------------------------------------- |
| `--user-project NAME` | Name of the project to use as your user project |
| `--user-keyword NAME` | When REPO is NAME, creates a GitHub card on your user profile instead of putting it on REPO |
| `--no-auth-cache` | Don't save credentials in a temporary file |
| `--no-check-for-updates` | Don't check for updates, don't prompt to update when current version is outdated |
| `--no-self-assign` | Don't assign the issue to yourself |
| `--default-column NAME` | Set the default column name. [default: To Do] |
| `--default-project NAME` | Set the default project name. [default: %(repository)s] |

#### Available placeholders for `--default-*`-options

| Placeholder | Description |
| ---------------- | ---------------------------------------------------------------- |
| `%(repository)s` | the repository's name |
| `%(owner)s` | the repository's owner |
| `%(username)s` | the username of which account you are using ideaseed with |
| `%(project)s` | the selected project's name (only available to --default-column) |

#### Color names

Expand Down Expand Up @@ -110,7 +144,7 @@ Some color have aliases:
- grey is the same as gray
- magenta is the same as purple

#### Relax. You don't need to remember those options
#### Relax. You don't need to remember those options (Coming in [v1.0.0])

You can also use `ideaseed -I` to prompt you for some information:

Expand Down Expand Up @@ -149,3 +183,15 @@ $ pip3 --version
pip 20.0.2 from /home/ewen/.local/lib/python3.7/site-packages/pip (python 3.7)
$ pip3 install ideaseed
```

[v1.0.0]: https://github.com/ewen-lbh/ideaseed/milestone/2
[v0.4.0]: https://github.com/ewen-lbh/ideaseed/tree/master/CHANGELOG.md#040---2020-06-18
[v0.9.0]: https://github.com/ewen-lbh/ideaseed/blob/master/CHANGELOG.md#090---2020-06-22

* * *

<center><p align="center">
<img src="https://raw.githubusercontent.com/ewen-lbh/ideaseed/master/visual-identity/ideaseed-logo-black-transparent.png" width="40px">
<br>
ideaseed by <a href="https://ewen.works">Ewen Le Bihan</a>
</p></center>
Loading