2 years agoBugfix - fix value assignment for BTCLI-12 master
B Tasker []
Bugfix - fix value assignment for BTCLI-12

2 years agoSet current project when listing versions/components too
B Tasker []
Set current project when listing versions/components too

Originally skipped these as didn't think it was a particularly likely workflow (as no issues actually get listed), but just tried to use it, so must be more valid than I thought :D

2 years agoAdded Set commands to set cachettl and lrutarget
B Tasker []
Added Set commands to set cachettl and lrutarget

set defaultttl [seconds] - Set the default cache ttl to number of seconds
set lrutarget [decimal] - The target percentage reduction if/when running a LRU

2 years agoAdded LRU capabilities to the cache. Can currently be triggered manually
B Tasker []
Added LRU capabilities to the cache. Can currently be triggered manually

2 years agoAdd caching of search results.
B Tasker []
Add caching of search results.

Primary reason being that if hunting for a specific issue, may well list one issue, then re-run the search to see what the next was

2 years agoRevert "Add link to examples". Duh, links don't work in code blocks
B Tasker []
Revert "Add link to examples". Duh, links don't work in code blocks

This reverts commit 4a53ccc91fe6e1a3a4067b9b909284a888465306.

2 years agoAdd link to examples
B Tasker []
Add link to examples

2 years agoUpdate feature list
B Tasker []
Update feature list

2 years agoAdded new shortcut functionality, allowing use of issue numbers
B Tasker []
Added new shortcut functionality, allowing use of issue numbers

When you view an issue or a project listing (including version and component issue listing) the project key will be stored in the cache. You can then simply enter the issue number to print it.

E.g.

project GPXIN
10 # Will load GPXIN-10

Also added a set command so that you can manually set the key if needed

set currproject GPXIN
10 # Will load GPXIN-10

2 years agoAdded ability to run a global search for a specific phrase
B Tasker []
Added ability to run a global search for a specific phrase

search [search phrase]

In principle it's no different to `project title foo` other than that the search is across the system rather than confined to a single project.

The search isn't case sensitive, but the ordering of the search terms does matter (as we're just checking for that subphrase within the title).

Can't easily do an issue description search without updating the JILS JSON to include that information (and if I do that, will probably add the issue keywords too)

2 years agoAdded ability to list components, and shuffled execution order around a bit to avoid a couple of conditionals
B Tasker []
Added ability to list components, and shuffled execution order around a bit to avoid a couple of conditionals

2 years agoAdded "listvers" command to project and projectvers so that a list can be generated of all versions for a project
B Tasker []
Added "listvers" command to project and projectvers so that a list can be generated of all versions for a project

2 years agoTweak whitespace on projectver view
B Tasker []
Tweak whitespace on projectver view

2 years agoAdding components to issue page output, and shuffling field ordering a little
B Tasker []
Adding components to issue page output, and shuffling field ordering a little

2 years agoAdd creation date and fix/affects versions to issue listing
B Tasker []
Add creation date and fix/affects versions to issue listing

(Need to add component too)

2 years agoRemove a TODO
B Tasker []
Remove a TODO

2 years agoFixing examples
B Tasker []
Fixing examples

2 years agoAdded filtering by issue title
B Tasker []
Added filtering by issue title

2 years agoOut of time for today, so adding some TODOs to the README
B Tasker []
Out of time for today, so adding some TODOs to the README

2 years agoAllow overriding of disk cache path in config
B Tasker []
Allow overriding of disk cache path in config

2 years agoCache fetch now supports simply providing an issuekey
B Tasker []
Cache fetch now supports simply providing an issuekey

cache fetch GPXIN-10

2 years agoSet very high TTLs for navigation links to make sure they don't expire out between sessions
B Tasker []
Set very high TTLs for navigation links to make sure they don't expire out between sessions

2 years agoAdded cache fetch functionality
B Tasker []
Added cache fetch functionality

Currently only accepts a URL (as I'm short on time), but ultimately should accept an issue key too

2 years agoAdd license file
B Tasker []
Add license file

2 years agoRemoving use of globals to store navigation and writing into cache instead.
B Tasker []
Removing use of globals to store navigation and writing into cache instead.

Have also implemented a history style back - triggered by either 'p' or 'back'

2 years agoQuickly added basic navigation. Will likely move these over to using the cache for persistence
B Tasker []
Quickly added basic navigation. Will likely move these over to using the cache for persistence

2 years agoCheck whether we got valid JSON back as a result of the test request.
B Tasker []
Check whether we got valid JSON back as a result of the test request.

2 years agoImplemented a basic offline mode. When active, cache TTLs are ignored and no attempt is made to fetch pages in the event of a CACHE_MISS
B Tasker []
Implemented a basic offline mode. When active, cache TTLs are ignored and no attempt is made to fetch pages in the event of a CACHE_MISS

Will automatically toggle on if the main project index cannot be retrieved, but can also be toggled via the CLI itself

set Offline - Tell the cache we're offline
set Online - Tell the cache we're online

Doesn't currently account for things like captive portals, and doesn't stop you doing something stupid like `cache flush` whilst in offline mode

2 years agoAdded features section to README
B Tasker []
Added features section to README

2 years agoRough, ready and 'orrible. We now support quoted strings
B Tasker []
Rough, ready and 'orrible. We now support quoted strings

./pbt_cli.py projectcomp GPXIN 'Experimental Features'
pbtcli> projectcomp GPXIN 'Experimental Features'

Doesn't work directly with pipes, because tools like echo strip the quotes for us, so you have to wrap the entire command in quotes too (which is less convenient)

echo "projectcomp GPXIN 'Experimental Features'" | ./pbt_cli.py

Anything where the quotes are preserved should work fine though

2 years agoUpdating README to note the caching usage
B Tasker []
Updating README to note the caching usage

2 years agoOK, got a little sidetracked by this, but it's done now. Added some CLI utilities for interacting with the cache
B Tasker []
OK, got a little sidetracked by this, but it's done now. Added some CLI utilities for interacting with the cache

Usage:

cache dump - Dumps out keys, values and expiry times from the cache (generates a *lot* of output)
cache flush - Flush all values out of the cache (will also update the ondisk cache)
cache get [key] - Fetch the value of a specific item from the cache
cache invalidate [key] - Invalidate a specific item from the cache
cache print - Print keys and expiry times (but not values) from the cache

2 years agoCached entries now have individual TTLs and cache wide purges have been disabled (though can be triggered with flush())
B Tasker []
Cached entries now have individual TTLs and cache wide purges have been disabled (though can be triggered with flush())

2 years agoAdded support for maintaining an on-disk copy of the cache.
B Tasker []
Added support for maintaining an on-disk copy of the cache.

This is a pre-cursor to making the entries themselves have a TTL rather than doing a cachewide purge

2 years agoGood that, managed to break it by tweaking
B Tasker []
Good that, managed to break it by tweaking

2 years agoAdded page caching mechanism.
B Tasker []
Added page caching mechanism.

Basically a slightly tweaked version of the memcache I wrote for RequestRouter.

Will currently only have any effective benefit when running in interactive mode. But that's probably when most likely to be browsing about and revisiting pages

2 years agoAdded ability to override settings with a config file (~/.pbtcli.settings)
B Tasker []
Added ability to override settings with a config file (~/.pbtcli.settings)

Done primarily so that I can point the script at my non-public copy of jiralist.

Config syntax is fairly simple (details changed for obvious reasons):

BASEDIR=https://hiddenaway.bentasker.co.uk
AUTH=YXVzZXI6dGhpc3Nob3VsZGJlYXBhc3N3b3Jk
ADD_HEADER=X-SITEMAP-BASE=https://hiddenaway.bentasker.co.uk/

2 years agoAdd a README so that the syntax is documented at least to a basic level somewhere
B Tasker []
Add a README so that the syntax is documented at least to a basic level somewhere

2 years agoAdd basic CLI functionality.
B Tasker []
Add basic CLI functionality.

Input can either be entered interactively (by running without arguments), piped in, or passed on the command line.

Syntax (and known limitations are)

General
---------

[Issue Key] - Display the named issue
projects - List all projects

Project views
---------------

project [projkey] - List all issues for the specified project
project [projkey] isopen - List only Open issues for the project
project [projkey] type [types] - List only issues of type (multiple types can be space seperated)
project [projkey] status [statuses] - List only issues with status matching list (multiple types can be space seperated) - Current known limitation - statuses with spaces won't work

Project Versions
------------------

projectver [projkey] [ver] - List all issues for the specified project version
projectver [projkey] [ver] isopen - List only Open issues for the project version
projectver [projkey] [ver] type [types] - List only issues of type (multiple types can be space seperated)
projectver [projkey] [ver] status [statuses] - List only issues with status matching list (multiple types can be space seperated). Current known limitation - statuses with spaces won't work
projectver [projkey] [ver] knownissues - List only known issues affecting specified version
projectver [projkey] [ver] implements - List only issues implemented (or fixed) in the specified version

Project Components
--------------------

Known Issue - Component names with spaces in (so, sadly, most of mine) aren't supported

projectcomp [projkey] [ver] - List all issues for the specified project component
projectcomp [projkey] [ver] isopen - List only Open issues for the project component
projectcomp [projkey] [ver] type [types] - List only issues of type (multiple types can be space seperated)
projectcomp [projkey] [ver] status [statuses] - List only issues with status matching list (multiple types can be space seperated). Current known limitation - statuses with spaces won't work

Issue View
-----------

issue [Issue Key] - Display the named issue
[Issue Key] - Shortcut to the above

Other than this commit message, there isn't currently any usage documentation.

2 years agoComment out test calls ready for implementing the CLI functionality
B Tasker []
Comment out test calls ready for implementing the CLI functionality

2 years agoAdd issue listing for specific component
B Tasker []
Add issue listing for specific component

2 years agoAllow filtering of known/fixes issues in version view
B Tasker []
Allow filtering of known/fixes issues in version view

2 years agoAdd output to list issues for specific version of project
B Tasker []
Add output to list issues for specific version of project

2 years agoAdd last modified time and time logging details
B Tasker []
Add last modified time and time logging details

2 years agoRemoving test cachebuster
B Tasker []
Removing test cachebuster

2 years agoAdd Issue output support
B Tasker []
Add Issue output support

I'm not 100% happy with the formatting, but it's functional which is the main aim for now.

2 years agoCache issue URLs when we have them available, avoids having to calculate
B Tasker []
Cache issue URLs when we have them available, avoids having to calculate

2 years agoAdding initial proof of concept.
B Tasker []
Adding initial proof of concept.

The module will currently

- Print a list of projects
- Print a list of issues for a given project
- Allow to filter lists of issues by issue type and/or status

There's currently no error handling whatsoever. Should be added later

2 years agoSetting up repo
B Tasker []
Setting up repo