FreshPoint webpage CLI interface.
Project description
FreshPointCLI
Welcome to FreshPointCLI, your go-to REPL tool for querying my.freshpoint.cz product webpages from your terminal.
FreshPointCLI is based on the FreshPointSync project.
Key Features
🔎 Continuous Querying. Effortlessly check product availability, prices, and more without restarting the application.
🆎 Query Autocompletion. Enjoy intelligent completion suggestions and highlighting for query arguments and product data, like names and categories.
📜 Search History. Easily access your previous searches and receive history-based autocompletion suggestions.
💎 Rich Formatting. Receive vibrant and visually appealing query responses with a retro aesthetic, powered by Rich.
Installation
Prerequisites
FreshPointCLI requires Python 3.8 or higher. If you don't have Python installed, you can download it from the official website.
FreshPointCLI Installation
Official library releases can be found on 📦 PyPI. To install the latest stable version of FreshPointCLI, use the following CLI command:
$ pip install freshpointcli --upgrade
To install the latest development version directly from the project's 📁 GitHub repository, use the following CLI command:
$ pip install git+https://github.com/mykhakos/FreshPointCLI
Usage
FreshPointCLI focuses on providing an intuitive and responsive command line interface, following standard CLI conventions.
Starting Up the Application
Initialize the application using the following CLI command:
$ freshpoint <location_id>
<location_id>
is the ID of the FreshPoint location to track. It can be deduced
from the page URL. For example, for https://my.freshpoint.cz/device/product-list/296
,
the location ID is 296.
The location ID is preserved between the application sessions, so if you intend to track the same location as the last time, you can omit the location ID argument and invoke the application without providing it.
Invoke the application with --help
to receive a usage tutorial:
$ freshpoint --help
Querying the Product Page
Once the application is running, it displays an input prompt, and you can type in queries to check for products' availability, price, and more.
FreshPoint@LocationName> ... <-- submit your query here
Note:
LocationName
is a placeholder for an actual location name.
Querying for a Single Product
To query for a single product, type in the product name and press ↵ Enter
.
For example, a query for tiramisu would be:
FreshPoint@LocationName> tiramisu
The product name does not need to be an exact match or include diacritics. FreshPointCLI uses lowercase ASCII partial matching, meaning the formatted query string must be a part of the complete formatted product name to qualify as a match. This method applies to any string matching within the application. If there are several matches, the application will display a list of all corresponding results.
For example, query "kolac
" would return products such as
"Koláč s náplněmi 100 g" or "Pošírovaná krůtí rolka v bylinkách,
polentový koláček s variací sýrů, zeleninová caponata".
Querying with Product Attribute Options
To query for products with specific attributes, use flags and options starting
with a hyphen, such as --category
, --available
, or --price-max <price>
,
and press ↵ Enter
. For example, to query for all available listings in
the category "Dezerty, snídaně" under 80 CZK, use the following command:
FreshPoint@LocationName> --category dezerty --available --price-max 80
Each option has a short form, starting with a single hyphen ('-
'), and a long
form, starting with a double hyphen ('--
'). They are equivalent. Some options
require a value. For example, the --price-max <price>
option requires
a non-negative number.
You can get a list of all supported options and their usage instructions by
invoking the --help
command in a query.
FreshPoint@LocationName> --help
Using Autocomplete and Query History
Autocomplete suggestions will be displayed as you type. You can use Tab ↹
or
the ↑
and ↓
arrow keys to navigate through the suggestions.
Before you start typing, you can use ↑
and ↓
arrow keys to navigate through
the history of commands you have executed previously.
Setting a Default Query
If you submit an empty query, all the products on the page are returned by default.
You can change this behavior by using the --setdefault
flag in a query. Once you
submit a query with --setdefault
, that query will be used as the default whenever
you submit an empty query.
Contributing
FreshPointCLI is an open-source project in its early development stages. If you encounter any issues or have suggestions for improvements, please report them on the GitHub Issue tracker.
Contributions to FreshPointCLI are also welcome! If you would like to contribute, please fork the repository, implement your changes, and open a Pull Request with a detailed description of your work on the GitHub Pull Request page.
License
FreshPointCLI is distributed under the MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file freshpointcli-0.2.0.tar.gz
.
File metadata
- Download URL: freshpointcli-0.2.0.tar.gz
- Upload date:
- Size: 16.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8c64af462e8e033049872ecc9cf5c114abd32b92b869ddc6516aa30d75a67850 |
|
MD5 | 7ee1ccb1095d6b53387f027a02e5b017 |
|
BLAKE2b-256 | 1eb74f33af5786d4e0bce739692129a9fef613255e826a25b3b884c0011d46f8 |
File details
Details for the file FreshPointCLI-0.2.0-py3-none-any.whl
.
File metadata
- Download URL: FreshPointCLI-0.2.0-py3-none-any.whl
- Upload date:
- Size: 21.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.12.4
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fb79d0764fd5a58617edd6150dea846797d6e1df1a6f74386e35f10ed24d022 |
|
MD5 | 19671837bc9455ea1a4bcb5e552f8d84 |
|
BLAKE2b-256 | 881d45cb60b15edcc62f9b38ed50026564d742596a139096ab682e58d829070b |