Giter Club home page Giter Club logo

ioffice's Introduction

iOffice CLI Reservation Tool

This tool is no longer maintained as @alicekaerast no longer uses the iOffice system. The tool was still working as of last commit, but there is clear scope for improvement which might be easier with a clean implementation

Lists and creates reservations of spaces (desks/rooms) in iOffice

This tool is not created by, affiliate with, or supported by iOffice

screenshot.png

Setup

  1. create ioffice.yaml in either your $HOME directory or ~/.config/ (or this directory if working from source code)
  2. Set up your authentication (see Auth section next)
  3. Set your instance's hostname (example in https://example.ioffice.com)

Usage

This section assumes you have downloaded the application from the latest release and have installed this to somewhere in $PATH. If you are running this from source code, replace ioffice with go run . in the below documentation.

  • Run the application to get a list of your future bookings (ioffice)
  • Book a named room by passing in a date and a room name (ioffice create -l 2101 2022-03-13)
  • Cancel or check in to your reservation by passing its ID (ioffice checkin 68610 or ioffice cancel 68610)
  • See available buildings (ioffice buildings)
  • Get a floor ID to use for checking occupancy (ioffice floors -b 46)
  • See occupancy of a floor (ioffice occupancy -f 2)

Auth

If you do not use SSO then you just need to add your username and password to ioffice.yaml, otherwise read on.

IOffice API currently can only handle simple auth. However, the frontend can actually use an SSO provider. If you have a non-SSO account then change username and password to your username and password. Otherwise you will need to manually login via the UI to your SSO provider and pass the authentication. Once this has been done, inspect your cookies for ACTID - set this as your session. This will allow this application to work even with SSO providing the session is active.

Note We prioritize session over username and password. So if you have a non-SSO account and want to avoid session then ensure it is set to blank "" value.

Duplicate Room Names

You might have the same room names in multiple offices. If this is the case then you can set the building that you work in.

  1. Run ioffice buildings to get a list of building IDs and names
  2. Set buildingID in the yaml file to the ID of the building you work in

All reservations will now use only this building. You can override the building when making reservations with ioffice create -b 46 -l 3035 2023-10-31, where 46 is a building ID and 3035 is the name of a location

Development

iOffice publish API documentation that helps figure out new functionality. It's inaccurate or plain wrong in places, but you can use dev tools in your browser to watch what API calls the web app makes. If you feel like fixing the documentation, you can raise a PR against it.

To build and install locally: make install (assuming you have Go already installed). You may need to do this if your Mac blocks unsigned applications from running.

To release a new version:

  1. Get your code into the main branch (via a PR if you're not a collaborator, ideally conventional commit messages)
  2. Create a git tag with the new desired version number (follow SemVer)
  3. Push your git tag (git push --tags)
  4. Go Releaser will create a new release
  5. If you're happy the release is stable, change it from a pre-release to a full release

ioffice's People

Contributors

alicekaerast avatar d4rr3ll avatar dependabot[bot] avatar dunnill avatar heyitsols avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

Forkers

heyitsols d4rr3ll

ioffice's Issues

Duplicate room names

A room name isn't necesarily unique, so attempting to reserve a room name that returns multiple results will book the first room matching the name

We can assume that room names are unique within a building, so we need to handle the concept of a building

Reservation bookings don't show office

We should show an extra column for office name in the list of reservations

Currently you have to either remember which office you're booked into, or guess from the location naming scheme

We could possibly remove the "Checked In?" column if this starts making the table too wide because that's no longer needed by most users of this app

Some of the other commands may also benefit from updates to make it easier to work across multiple buildings too

Create booking should support location ID and location name

Currently when we make a booking we take a location name and perform a full-text search using that name in order to get an location ID. This is a problem because partial matches are possible, leading to the wrong location ID being selected and therefore some locations being impossible to book.

Eg. if a building has locations named 123, 1123 and 2123 then specifying the location named 123 first cause a search to be performed which will return all three locations. We then take the first location found (which I think is the first one created), and then attempt to book that location. Since the location 2123 is consistently being returned as the first result it is impossible to book the location named 123.

We should be able to take either a location name or a location ID, and/or do a better job of returning the expected location when searching

GoReleaser failing to create releases

GoReleaser is failing with:

   ⨯ release failed after 0s                  error=failed to get module path: exit status 2: flag provided but not defined: -m
usage: list [-e] [-race] [-f format] [-json] [-tags 'tag list'] [packages]

This looks like it might be attempting to run go list, however I can't reproduce the error message locally

I don't know how many people are actually using releases vs. compiling from source, so I don't know how urgent this is. But there isn't much development going on given the featureset is good enough for most people now.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.