Package: ideaseed
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 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 forcodingproject ideas as asingle project called "incubator" on my GitHub profile directly, and as issues or notes when the idea is related to an already-existing project and repo.But when I don't get to decidewhenthis idea comes, and I often need to interrupt what am I doing to open github, get to the right page, input my idea and get back. And I find it frustrating.Enough rambling. Here's what you came for.Note down your ideas and get them to the right place, without switching away from your terminalTable of contentsInstallationAuthenticationUsageCreate a Google Keep cardCreate an issue and/or a Projects card on a repositoryCreate a card on a project tied to your user profileProviding other informationLabelsAssignees/CollaboratorsMilestonesPin statusColorsOther features--open--dry-runLocal copyConfigurationDefaultsMiscelleanous options--self-assignAuto-assigning yourself--create-missing: Prompt for creation of missing stuff--check-for-updates: Get notified when a new version of ideaseed is released.--auth-cache=FILEPATH: Change the auth cache locationUpdatingComplete usage from--helpInstallationIdeaseed is availableon PyPI.org:pipinstallideaseed# latest versionpipinstallgit+https://github.com/ewen-lbh/ideaseed# latest commitAuthenticationAuthentication credentials are asked for when necessary, and are cached in a JSON file referred to as the 'auth cache'.
The location of that auth cache is configurable through the--auth-cacheflag.You can manually login to both Google Keep and GitHub withideaseed login, and clear the cache withideaseed logout.A support for keyrings as an alternative authentication methodis plannedUsageIdeas are made up of different pieces of data, of which only thebodyis necessary.body: the body of your idea, the main contenttitleproject: the GitHub project to put the card incolumn: the project's column to put the card inrepo: the repository to create the card (and issue) in (only relevant when adding to a repository)Thus, ideaseed's usage patterns are varied:Create a Google Keep cardProvide only the body, a Google Keep card will be created, with no title:ideaseed [options] BODYSame as above, but provide a title:ideaseed [options] TITLE BODYCreate an issue and/or a Projects card on a repositoryAlso provide a repository name (and owner if it isn't you):ideaseed [options] REPO TITLE BODYIf you have set defaults for the project and column names, they will get used.
Otherwise, no Github Projects card will be created.Finally, providing the column and/or the project:ideaseed [options] REPO COLUMN TITLE BODY
ideaseed [options] REPO PROJECT COLUMN TITLE BODYNote that you are not forced to use those combinations, as these arguments also exist in--flagforms:-C/--columnforCOLUMN, etc.You can use-I/--no-issueto only create a Project card.Create a card on a project tied to your user profileIf you want to create a github card on a project that's tied to your user profile instead of to a repository, putuserin front, and dropREPO:ideaseed [options] user BODY
ideaseed [options] user TITLE BODY
ideaseed [options] user PROJECT TITLE BODY
ideaseed [options] user PROJECT COLUMN TITLE BODYProviding other informationLabelsAdd labels by using-#/--labelone or more times.
This works on Google Keep or when creating issues.Assignees/CollaboratorsAdd assignees (github issues) or collaborators (Google Keep) by using-@/--assignone or more times.
Use usernames for github issues and emails for Google Keep cards.MilestonesAssign an issue to a milestone by specifying its name with-M/--milestone.Pin statusPin your Google Keep card with--pin.
Support for github issuesis plannedColorsGive your Google Keep card a color with--color NAME.NAMEcan be:bluebrowndarkblue (or indigo)gray (or grey)greenorangepinkpurple (or magenta)redteal (or cyan)whiteyellowOther features--openOpen the created issue/card in your favorite browser (useswebbrowser.open)--dry-runDo a 'test run'. Does not create issues and cards. Note that missing resources tthat were created with--create-missingstill do get created.The following will appear to let you know that you are dry-running:You are indry-run mode.Issues and cards will not be created.Creation of objects from --create-missing will still occur(e.g. missing labels will be created if you answer 'yes')Local copySave copies of your ideas locally, somewhere safe on your disk.If you use--local-copy=DIR, copies of all created ideas will get saved as files inside ofDIR.IfUSER/REPOorREPOis used, the file will be written intoDIR/[USER/]REPOinstead.
If the ‘user’ command is used, the file will be written intoDIR/PROJECTinstead.The file's name will be aslugified1version of either the title or, if not set, the body's first line.The file is a markdown with a YAML header that holds metadata such as labels and assigned people.Values that count as false (empty strings, empty lists, empty objects, the False boolean and 0) will not be included in the header.The following information is written to the header:YAML keyDescriptionRelated to flagassigneesPeople assigned-@/--assigncolorThe card's color--colorcolumnThe project's column-C/--columnlabelsIncluded labels-#/--labelmilestoneAssigned milestone-M/--milestonepinnedThe card's pinned state--pinprojectThe github project-P/--projecturlA link to the ideaThe values correspond to what was actually used to publish the idea, so defaults get applied,
and things created with--create-missingalso appear here.If 'url' is not in the header, then either the idea failed to get uploaded to the service (github, google keep), or--dry-runwas used.1As defined byunicode-slugify'sslugifyfunctionConfigurationConfiguration is done through aliasing ideaseed and adding flags to the alias.
This configuration can be done interactively withideaseed config.It will ask you some questions to configure your alias, then append the alias to your current shell's rc file (supported shells are fish, bash, zsh, csh, ksh and tcsh. Feel free to add more shells through PRs or issues!)DefaultsYou can specify default values forCOLUMNandPROJECT. You can use {placeholders} in these default values to make them dynamic. The format is the same as python'sstr.format, so you can also do things like trimming!FlagSets default value forAvailable placeholders--default-projectPROJECT{repository}, {username}, {owner}--default-columnCOLUMN{project}, {repository}, {username}, {owner}--default-user-projectPROJECTwhen usingusernone--default-user-columnCOLUMNwhen usinguser{project}Note: if a--default-user-*is not set, it will fall back to the corresponding--default-*.
These are essentially overrides for theusercommand, since you might want different defaults with that one.Miscelleanous options--self-assignAuto-assigning yourselfWith this flag, if-@/--assignis not used, you are assigned to the created issue automatically. Does not assign yourself as a collaborator in Google Keep.--create-missing: Prompt for creation of missing stuffIf a label, milestone, project or column does not exist but is used, you will be asked whether or not you want to create that missing resource.If you say no, the command will be cancelled and nothing will happen.If you say yes, the missing object will get created (you might enter additional informtion such as a column's description) and the issue and/or card will also get created.--check-for-updates: Get notified when a new version of ideaseed is released.With this flag, if you run ideaseed and that it detects that a newer version is available, a notification will appear.You can thenupdate ideaseed.--auth-cache=FILEPATH: Change the auth cache locationIf you want to change where ideaseed caches your authentication credentials, use this flag.UpdatingYou can update ideaseed with theupdatecommand (or directly from your package manager).Complete usage from--helpNote down your ideas and get them to the right place, without switching away from your terminal
Usage:
    ideaseed [options] config
    ideaseed [options] logout
    ideaseed [options] login
    ideaseed [options] about | --about
    ideaseed [options] version | --version
    ideaseed [options] help | --help
    ideaseed [options] update
    ideaseed [options] [-# LABEL...] [-@ USER...] user BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] user TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] user PROJECT TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] user PROJECT COLUMN TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] REPO TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] REPO COLUMN TITLE BODY
    ideaseed [options] [-# LABEL...] [-@ USER...] REPO PROJECT COLUMN TITLE BODY


Commands:
    user                    Creates cards in your user's project. 
                            (see https://github.com/users/YOURUSERNAME/projects)
                            Flags --no-issue and --repo has no effects.
                            Flag --default-column still applies.
                            REPO is _not_ set to 'user'.
    config                  Configures an alias with Configuration flags through a series of questions.
    log(in/out)             Fills/Clears the auth cache (see --auth-cache).
    about                   Show information about ideaseed.
    version                 Outputs the version number
    update                  Check for updates. If any is available, shows the changelog. 
                            You can then decide to install the new version.


Arguments:
    BODY      Sets the note's body. Required.
    TITLE     Sets the title.
    REPO      The repository to put the issue/card into. Uses the format [USER/]REPO. 
              If USER/ is omitted, the currently-logged-in user's username is assumed.
              Omitting this argument entirely has the effect of creating a Google Keep card instead.
              When used without PROJECT, the card is added to the Default Project (see --default-project)
              If the Default Project is '<None>', it creates an issue without a project card.
    PROJECT   Specify which GitHub project to add the card to.
              When used without COLUMN, the card is added to the Default Column (see --default-column)
              Can use Placeholders
    COLUMN    Specify which column to use.
              Can use Placeholders.


Options:
    -I --no-issue           Only creates a project card, no issue is created.
                            Has no effect when used without a REPO
    -T --title=TITLE        Specifies TITLE
    -R --repo=REPO          Specifies REPOSITORY
    -P --project=PROJECT    Specifies PROJECT
    -C --column=COLUMN      Specifies COLUMN
    -# --label=LABEL...     Add labels
                            Can be specified multiple times.
                            Cannot be used in the 'user' command.
                            Cannot be used with --no-issue
    -o --open               Open the created card (or issue) in your $BROWSER.
       --dry-run            Tell what will happen but does not do it. Still logs you in.
                            Beware, objects created with --create-missing will
                            still be created.
    -m --create-missing     Creates missing objects (projects, columns, and labels/labels)
    -@ --assign=USER...     Assign USER to the created issue. 
                            Can be specified multiple times.
                            Cannot be used in the 'user' command.
                            Cannot be used with --no-issue
       --debug              Shows extra information. Used for debugging purposes.

    REPO only: 
       --self-assign        Assign the created issue to yourself. 
                            Has no effect when --assign is used.
    -M --milestone=NAME     Adds the issue to the milestone NAME.

    Google Keep only:
       --pin                Pins the card. 
       --color=COLOR        Sets the card's color. [default: white]
                            Available values: blue, brown, darkblue (or indigo), 
                            gray (or grey), green, orange, pink, purple (or magenta), 
                            red, teal (or cyan), white, yellow. 


Configuration:
   --default-column=COLUMN          Specifies the Default Column. 
                                    Used when PROJECT is set but not COLUMN
                                    Can use Placeholders.
   --default-project=PROJECT        Specifies the Default Project. 
                                    Used when REPO is set but not PROJECT
                                    Can use Placeholders.
                                    If not set, or set to '<None>',
                                    using REPO without PROJECT creates an issue
                                    without its project card.
   --default-user-project=PROJECT   Specifies an override to Default Project,
                                    that will only be used when the ‘user’ command is used
                                    Can use Placeholders.
                                    When not set, --default-project is used.
   --default-user-column=COLUMN     Same as --default-user-project, but for the Default Column.                                   
   --auth-cache=FILEPATH            Set the filepath for the auth. cache [default: /home/ewen/cache/ideaseed/auth.json]
                                    If set to '<None>', disables caching of credentials.
                                    Has no effect when used with --keyring.
   --check-for-updates              Check for new versions and show a notification if a new one is found.
   --local-copy=DIR                 Directory to save a copy of ideas to.
                                    If not set, or set to '<None>',
                                    ideas will not get saved locally.
                                    DIR must exist beforehand. ~ and ~user constructs get expanded.
                                    See Local Copy for more information.


Placeholders:
    {repository}      Replaced with the repository's name
                      Not available to --default-user-* flags
    {owner}           Replaced with the repository's owner
                      Not available to --default-user-* flags
    {username}        Replaced with the currently-logged-in GitHub user's username
    {project}         Replaced with the project the card will be added to.
                      Not available to --default-project, --default-user-project or PROJECT.

Local Copy:
    If you use --local-copy=DIR, copies of all created ideas will get saved as files inside of DIR.
    If USER/REPO or REPO is used, the file will be written into DIR/[USER/]REPO instead.
    If the ‘user’ command is used, the file will be written into DIR/PROJECT instead.

    The file's name will be a slugified (meaning lowercased, with spaces replaced by dashes, mostly)
    version of either the title or, if not set, the body's first line.

    The file is a markdown with a YAML header that holds metadata such as labels and assigned people.
    Values that count as false (empty strings, empty lists, empty objects, the False boolean and 0)
    will not be included in the header.
    The following information is written to the header:

    assignees:      People assigned           (related to -@ / --assign)
    color:          The card's color          (related to --color)
    column:         The project's column      (related to -C / --column)
    labels:         Included labels           (related to -# / --label)
    milestone:      Assigned milestone        (related to -M / --milestone)
    pinned:         The card's pinned state   (related to --pin)
    project:        The github project        (related to -P / --project)
    url:            A link to the idea        

    The values correspond to what was actually used to publish the idea, so defaults get applied,
    and things created with --create-missing also appear here.

    If 'url' is not in the header, than either the idea failed to get uploaded to the service (github, google keep)
    Or that --dry-run was used.ideaseed byEwen Le Bihan