19 months agoBugfix - fix value assignment for BTCLI-12 master
B Tasker []
Bugfix - fix value assignment for BTCLI-12

20 months 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

20 months 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

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

20 months 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

20 months 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.

20 months agoAdd link to examples
B Tasker []
Add link to examples

20 months agoUpdate feature list
B Tasker []
Update feature list

20 months 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

20 months 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)

20 months 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

20 months 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

20 months agoTweak whitespace on projectver view
B Tasker []
Tweak whitespace on projectver view

20 months 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

20 months 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)

20 months agoRemove a TODO
B Tasker []
Remove a TODO

20 months agoFixing examples
B Tasker []
Fixing examples

20 months agoAdded filtering by issue title
B Tasker []
Added filtering by issue title

20 months 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

20 months agoAllow overriding of disk cache path in config
B Tasker []
Allow overriding of disk cache path in config

20 months agoCache fetch now supports simply providing an issuekey
B Tasker []
Cache fetch now supports simply providing an issuekey

cache fetch GPXIN-10

20 months 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

20 months 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

20 months agoAdd license file
B Tasker []
Add license file

20 months 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'

20 months 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

20 months 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.

20 months 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

20 months agoAdded features section to README
B Tasker []
Added features section to README

20 months 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

20 months agoUpdating README to note the caching usage
B Tasker []
Updating README to note the caching usage

20 months 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

20 months 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())

20 months 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

20 months agoGood that, managed to break it by tweaking
B Tasker []
Good that, managed to break it by tweaking

20 months 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

20 months 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/

20 months 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

20 months 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.

20 months agoComment out test calls ready for implementing the CLI functionality
B Tasker []
Comment out test calls ready for implementing the CLI functionality

20 months agoAdd issue listing for specific component
B Tasker []
Add issue listing for specific component

20 months agoAllow filtering of known/fixes issues in version view
B Tasker []
Allow filtering of known/fixes issues in version view

20 months agoAdd output to list issues for specific version of project
B Tasker []
Add output to list issues for specific version of project

20 months agoAdd last modified time and time logging details
B Tasker []
Add last modified time and time logging details

20 months agoRemoving test cachebuster
B Tasker []
Removing test cachebuster

20 months 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.

20 months 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

20 months 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

20 months agoSetting up repo
B Tasker []
Setting up repo