Link Organizer is a Python command-line tool that organizes links into markdown files and Git repositories based on topics. It supports links from text, CSV, and Excel files, and can classify links automatically if no topic or description is provided.
- Organizes links into a Git repository based on their topic.
- Supports text files, CSV files, and Excel files.
- Automatic link preview fetching using
httpx
to retrieve titles and descriptions. - Automatically classifies topics using NLP (
spaCy
). - Easy command-line usage with options for file or manual input.
- Automatically updates
README.md
with topic-based navigation links.
- Python 3.6 or higher
- Git
You can install Link Organizer from PyPI:
pip install link-organizer
Or, if you're developing locally, clone the repository and install it using:
git clone https://github.com/yourusername/link-organizer.git
cd link-organizer
pip install .
Make sure to install the necessary dependencies, which will be installed automatically when you install the package:
httpx
(for asynchronous HTTP requests)beautifulsoup4
(for parsing HTML)spaCy
(for topic classification)pandas
(for processing CSV and Excel files)gitpython
(for managing Git repositories)
Once installed, you can use the link-organizer
command-line tool to organize links into markdown files and Git repositories.
link-organizer --file /path/to/file.csv --repo /path/to/git/repo
This will parse the CSV file and organize the links into markdown files within the specified Git repository. Each link will be classified into a topic-based folder.
link-organizer --directory /path/to/directory --repo /path/to/git/repo
This will process all the files in the specified directory (supporting .txt
, .csv
, .xls
, and .xlsx
files) and organize the links accordingly.
link-organizer --link https://example.com --repo /path/to/git/repo
If you don't provide a topic or description, the tool will automatically fetch the title and classify the link.
--topic
: Manually specify the topic for a link.--description
: Manually specify a description for the link.--delimiter
: Specify a custom delimiter for CSV or text files (default is,
).
After running the command, the project will create a folder structure like this inside your Git repository:
/path/to/git/repo/
├── A/
│ └── Ansible/
│ └── ansible.md
├── M/
│ └── MachineLearning/
│ └── machinelearning.md
├── README.md
The tool automatically updates the root README.md
with links to the markdown files categorized by topic:
# Topic Index
## A
- [ansible](A/Ansible/ansible.md)
## M
- [machinelearning](M/MachineLearning/machinelearning.md)
If you want to contribute or develop the project further, follow these steps:
git clone https://github.com/yourusername/link-organizer.git
pip install -r requirements.txt
Ensure that your changes work correctly by running the tests:
python -m unittest discover
This project is licensed under the MIT License - see the LICENSE file for details.
We welcome contributions! If you’d like to contribute, please fork the repository and use a feature branch. Pull requests are warmly welcome.
- Fork the repo.
- Create your feature branch:
git checkout -b my-new-feature
. - Commit your changes:
git commit -am 'Add some feature'
. - Push to the branch:
git push origin my-new-feature
. - Submit a pull request.