docs: update readme
This commit is contained in:
56
README.md
56
README.md
@ -5,6 +5,9 @@ A Python package for surfing internet scientifically.
|
|||||||
## Features
|
## Features
|
||||||
|
|
||||||
- **Clash RSS Subscription Support**: Download and transform clash rss subscription
|
- **Clash RSS Subscription Support**: Download and transform clash rss subscription
|
||||||
|
- **Hook System**: Customizable scripts for extending functionality
|
||||||
|
- **Core Configuration Management**: Import, export, and manage core configurations
|
||||||
|
- **Binary Management**: Automatic updates for core components
|
||||||
|
|
||||||
## Installation
|
## Installation
|
||||||
|
|
||||||
@ -19,12 +22,13 @@ poetry install
|
|||||||
|
|
||||||
## Quick Start
|
## Quick Start
|
||||||
|
|
||||||
```
|
### Subscription Management
|
||||||
|
```bash
|
||||||
# add a subscription
|
# add a subscription
|
||||||
python -m scientific_surfing subscription add <name> <clash-rss-subscription-url>
|
python -m scientific_surfing subscription add <name> <clash-rss-subscription-url>
|
||||||
|
|
||||||
# refresh a subscription
|
# refresh a subscription
|
||||||
python -m scientific_surfing subscription refresh name
|
python -m scientific_surfing subscription refresh <name>
|
||||||
|
|
||||||
# delete a subscription
|
# delete a subscription
|
||||||
python -m scientific_surfing subscription rm <name>
|
python -m scientific_surfing subscription rm <name>
|
||||||
@ -34,6 +38,54 @@ python -m scientific_surfing subscription rename <name> <new-name>
|
|||||||
|
|
||||||
# activate a subscription
|
# activate a subscription
|
||||||
python -m scientific_surfing subscription activate <name>
|
python -m scientific_surfing subscription activate <name>
|
||||||
|
|
||||||
|
# list all subscriptions
|
||||||
|
python -m scientific_surfing subscription list
|
||||||
|
|
||||||
|
# show storage information
|
||||||
|
python -m scientific_surfing subscription storage
|
||||||
|
```
|
||||||
|
|
||||||
|
### Hook Management
|
||||||
|
```bash
|
||||||
|
# initialize hooks directory with template scripts
|
||||||
|
python -m scientific_surfing hook init
|
||||||
|
|
||||||
|
# show hooks directory location and list all scripts
|
||||||
|
python -m scientific_surfing hook list
|
||||||
|
|
||||||
|
# edit a hook script with system editor
|
||||||
|
python -m scientific_surfing hook edit <script-name>
|
||||||
|
|
||||||
|
# remove a hook script
|
||||||
|
python -m scientific_surfing hook rm <script-name>
|
||||||
|
```
|
||||||
|
|
||||||
|
### Core Configuration Management
|
||||||
|
```bash
|
||||||
|
# import configuration from file
|
||||||
|
python -m scientific_surfing core-config import <file-path>
|
||||||
|
|
||||||
|
# export configuration to file
|
||||||
|
python -m scientific_surfing core-config export <file-path>
|
||||||
|
|
||||||
|
# edit configuration with system editor
|
||||||
|
python -m scientific_surfing core-config edit
|
||||||
|
|
||||||
|
# reset configuration to default values
|
||||||
|
python -m scientific_surfing core-config reset
|
||||||
|
|
||||||
|
# show current configuration
|
||||||
|
python -m scientific_surfing core-config show
|
||||||
|
|
||||||
|
# apply active subscription to generate final config
|
||||||
|
python -m scientific_surfing core-config apply
|
||||||
|
```
|
||||||
|
|
||||||
|
### Core Management
|
||||||
|
```bash
|
||||||
|
# update scientific-surfing core components
|
||||||
|
python -m scientific_surfing core update [--version <version>] [--force]
|
||||||
```
|
```
|
||||||
|
|
||||||
## Development
|
## Development
|
||||||
|
|||||||
@ -7,7 +7,6 @@ import sys
|
|||||||
from scientific_surfing.storage import StorageManager
|
from scientific_surfing.storage import StorageManager
|
||||||
from scientific_surfing.subscription_manager import SubscriptionManager
|
from scientific_surfing.subscription_manager import SubscriptionManager
|
||||||
from scientific_surfing.corecfg_manager import CoreConfigManager
|
from scientific_surfing.corecfg_manager import CoreConfigManager
|
||||||
from scientific_surfing.corecfg_manager import CoreConfigManager
|
|
||||||
from scientific_surfing.core_manager import CoreManager
|
from scientific_surfing.core_manager import CoreManager
|
||||||
from scientific_surfing.hook_manager import HookManager
|
from scientific_surfing.hook_manager import HookManager
|
||||||
|
|
||||||
@ -75,10 +74,6 @@ def create_parser() -> argparse.ArgumentParser:
|
|||||||
# Apply config
|
# Apply config
|
||||||
apply_parser = core_config_subparsers.add_parser('apply', help='Apply active subscription to generate final config')
|
apply_parser = core_config_subparsers.add_parser('apply', help='Apply active subscription to generate final config')
|
||||||
|
|
||||||
# Upgrade mihomo binary
|
|
||||||
upgrade_parser = core_config_subparsers.add_parser('upgrade', help='Download and upgrade mihomo binary from GitHub releases')
|
|
||||||
upgrade_parser.add_argument('--version', help='Specific version to download (e.g., v1.18.5). If not specified, downloads latest')
|
|
||||||
upgrade_parser.add_argument('--force', action='store_true', help='Force download even if binary already exists')
|
|
||||||
|
|
||||||
# Core commands
|
# Core commands
|
||||||
core_parser = subparsers.add_parser('core', help='Manage scientific-surfing core components')
|
core_parser = subparsers.add_parser('core', help='Manage scientific-surfing core components')
|
||||||
|
|||||||
Reference in New Issue
Block a user