Commit Graph

35 Commits

Author SHA1 Message Date
Oystein Kristoffer Tveit b2f8d23637
cli: add commands for borrowing and delivering items 2023-05-10 21:53:49 +02:00
Oystein Kristoffer Tveit 18053bf002
cli: move some commands to `Advanced` submenu 2023-05-10 17:50:18 +02:00
Oystein Kristoffer Tveit 634397cdaf
cli: fix `done` not returning
The previous `Done` commands would not return properly.
All `Done`/`Exit` commands have also gotten the common number 9
2023-05-10 17:45:07 +02:00
Oystein Kristoffer Tveit 78fa3076b9
Set up alembic, and more
- Setup alembic and generate the initial migration
- Add poethepoet to dev dependencies in order to put hard-to-remember
  commands beneath the poetry namespace
- Add psycopg2-binary dependency, for use with postgresql
- Remove dotenv dependency, as it is no longer required
- Add `config.toml` to gitignore. This is because alembic has no
  argument parser that will let you specify the config file to use.
  Developers are encouraged to use `config.toml`, which will be
  automatically recognized, unless they want to implement the argument
  parser functionality for alembic.
2023-05-06 17:52:15 +02:00
Oystein Kristoffer Tveit 8dda521f7e
Update frontend dependencies 2023-05-06 17:34:21 +02:00
Oystein Kristoffer Tveit 30ee10ec0c
Add argument parser and toml-based config file
- Create a common argument interface and config file format for both
  cli and flask version of application.
- Bumped the python version constraint to ^3.11 in order to use the
  native tomllib for reading config file.
- Move all the flask specific code under `worblehat.flaskapp`
2023-05-06 17:22:38 +02:00
Oystein Kristoffer Tveit 9b96875346
Misc improvements:
- Extract the bookshelf selector into its own file, since it was a
  little bit complicated with completion and everything.
- Print out bookcase item information on every prompt in the bookcase
  item specific subclis
- Add funcs to EditBookcaseCli
- Add shelf editing to EditBookcaseCli
- Ensure shorthand column-row pairs are always written in that order
2023-05-06 03:51:35 +02:00
Oystein Kristoffer Tveit cd666377f8
Remove old data fetching logic 2023-05-06 03:07:29 +02:00
Oystein Kristoffer Tveit 3525e84576
Start converting the scanner tool into a cli tool
The scanner tool is about to become a fullfledged repl, much in the same
manner as dibbler.

Changes:

- Rename `tools/scanner.py` -> `cli/main.py`
- Create abstraction layer for Cmd with numbered commands
- Create submenu for items
- Lots of functionality edits
- Fill out more todos in REAMDE
2023-05-06 02:37:28 +02:00
Oystein Kristoffer Tveit c445cb2dbd
Add database support for borrowing and borrow queues 2023-05-05 22:54:45 +02:00
Oystein Kristoffer Tveit 4e868c3324
Misc changes:
- Rename BookcaseLocation -> BookcaseShelf
- Remove `name` from BookcaseShelfs, and use columns and rows to index
  them instead
- Add `amount` to BookcaseItem, and make isbn unique
- Remove ability to use scanner tool without database
- Add a lot of real bookshelfs to seeding data
2023-05-05 22:31:06 +02:00
Oystein Kristoffer Tveit 98eed07417
👉👁️👄👁️👈 2023-05-04 17:24:17 +02:00
Oystein Kristoffer Tveit cebb6ccb86
Add flake.nix to project 2023-05-04 17:24:17 +02:00
Oystein Kristoffer Tveit e04d558b3a
Move old scanner scripts to `worblehat/services` 2023-05-04 16:20:30 +02:00
Oystein Kristoffer Tveit 4ac110f527
Misc changes:
- Migrate project to use poetry for ease of dependency management and
  building
- Add wsgi prod and dev entrypoints
- Start working on a more rigid scanning tool
- Remove unused ignores in .gitignore
- Update README about changes
2023-05-04 16:17:35 +02:00
Oystein Kristoffer Tveit e57c638683
Misc changes:
- Update database models to the new declarative mapping syntax
  See https://docs.sqlalchemy.org/en/20/orm/mapping_styles.html#orm-declarative-mapping
- Make use of Flask-SQLAlchemy to manage database connections
- Remove cli command interface in favor of just deleting the
  sqlite file and reseeding when no tables are detected.
- Add list of iso639_1 language codes and names, and add to seed list
- Other changes to file structure.
2023-05-01 01:37:52 +02:00
Bjornar Orjansen Kaarevik f72188b063 generated new example file for the shelf in the working room 2023-04-02 03:04:13 +02:00
Bjornar Orjansen Kaarevik be535daa47 added usage of isbnlib to data fetchers 2023-04-02 03:02:37 +02:00
Bjornar Orjansen Kaarevik ff3d6b3a24 fixed todo in readme 2023-04-02 01:16:52 +02:00
Bjornar Orjansen Kaarevik 124de5db5e Foreslo en alternativ prosedyre til bygging av databasen 2023-04-02 01:12:09 +02:00
Bjornar Orjansen Kaarevik d31dbf5daf scanned one shelf to have test data 2023-04-02 01:06:51 +02:00
Bjornar Orjansen Kaarevik 73cc5f0d84 added some scripts operating on csvs 2023-04-02 01:06:51 +02:00
Bjornar Orjansen Kaarevik 45d5a5e3bd added colon for error printout 2023-04-02 01:06:51 +02:00
Bjornar Orjansen Kaarevik 80663435ce La til isbntools som noe vi må se på i TODO 2023-04-02 01:06:46 +02:00
Bjornar Orjansen Kaarevik dd1ec752a8 added modified data fetcher based on the implementation of adrlau, as well as update to the todo in the readme 2023-04-02 01:04:50 +02:00
Bjornar Orjansen Kaarevik 55d2064f0d Initial commit 2023-04-02 00:59:07 +02:00
Felix Albrigtsen 96a7653722 Setup frontend frame 2022-10-15 19:49:37 +02:00
Felix Albrigtsen 77c70b0514 Initial frontend build 2022-10-15 17:45:52 +02:00
Felix Albrigtsen 54e0fd546e Various minor changes 2022-08-27 19:12:15 +02:00
Felix Albrigtsen e9403310cf Add tailwind css 2022-08-27 19:04:40 +02:00
Felix Albrigtsen d51e445408 Add blueprints 2022-08-27 18:58:58 +02:00
Felix Albrigtsen 94aac14d81 Add readme and requirements 2022-08-16 22:13:48 +02:00
Felix Albrigtsen 78ccd1b097 DB model structure 2022-08-16 19:52:45 +02:00
Felix Albrigtsen 766c9af62d Initialize flask configs 2022-08-16 15:07:31 +02:00
Felix Albrigtsen 4397ef573b
Initial commit 2022-08-13 17:53:50 +02:00