Welcome to RAINMARX, your ultimate CLI tool for managing Raindrop.io bookmarks. This application allows you to interact with your Raindrop.io account through various functionalities such as fetching bookmarks, updating collections, searching, and more.
- Fetch all bookmarks and nested collections.
- Retrieve parent collections by ID.
- Update bookmarks within a collection.
- Search bookmarks.
- Get user statistics.
- Manage user collection groups.
-
Clone the repository:
git clone https://github.com/yourusername/RAINMARX.git cd RAINMARX
-
Install dependencies:
pip install -r requirements.txt
-
API Token:
-
Update the
config.py
file with your Raindrop.io API token.api_token = 'your_api_token_here' headers = { 'Authorization': f'Bearer {api_token}', 'Content-Type': 'application/json' }
Alternatively, you can set your API token as an environment variable and modify
config.py
to read from it:import os api_token = os.getenv('RAINDROP_API_TOKEN') headers = { 'Authorization': f'Bearer {api_token}', 'Content-Type': 'application/json' }
-
-
Logging Configuration:
- Configure logging as per your requirements in the
utils.py
file.
- Configure logging as per your requirements in the
Run the main script to start the CLI application:
python RAINMARX.py
You will be presented with a menu of options:
- Get all bookmarks and nested collections.
- Get parent collection by ID.
- Update bookmarks from a collection.
- Search.
- Get user stats.
- Get user collection groups.
- Exit.
Choose the desired option by entering the corresponding number.
- RAINMARX.py: Main entry point of the application, displaying the menu and handling user inputs.
- config.py: Contains API token and headers configuration.
- collectid.py: Handles retrieval of parent collections by ID.
- group.py: Manages user collection groups.
- nested.py: Fetches all bookmarks and nested collections.
- overview.py: Provides an overview of collections.
- search.py: Handles search functionality.
- stats.py: Retrieves user statistics.
- updatr.py: Updates bookmarks within a collection.
- utils.py: Contains utility functions, including logging configuration.
Logging is configured in utils.py
. You can customize the logging level and format as needed. The logs are saved in the logs
directory.
import logging
def configure_logging(script_name):
log_filename = f'logs/{script_name}.log'
logging.basicConfig(
filename=log_filename,
level=logging.DEBUG,
format='%(asctime)s - %(name)s - %(levelname)s - %(message)s',
datefmt='%Y-%m-%d %H:%M:%S'
)
Complete documentaiton can be found in the docs
directory.
Contributions are welcome! Please fork the repository and create a pull request with your changes.
- Fork the repository.
- Create a new branch (
git checkout -b feature/your-feature
). - Commit your changes (
git commit -am 'Add new feature'
). - Push to the branch (
git push origin feature/your-feature
). - Create a new Pull Request.