|
4 | 4 |
|
5 | 5 | ## Why `not_gitmodules`? |
6 | 6 |
|
7 | | -1. `not_gitmodules` demonstrate how simple and elegant `gitmodules` should be to those developers who enjoy their lives. Add and remove modules without caring about irrelevant stuff. No * |
| 7 | +1. `not_gitmodules` demonstrate how simple and elegant `gitmodules` should be to those developers who enjoy their lives. |
| 8 | + Add and remove modules without caring about irrelevant stuff. No * |
8 | 9 | *shitshow**, just simplicity. |
9 | 10 | 2. Production-use friendly. This is documented in the license. |
10 | 11 | 3. No third-party libraries are required; only built-in tools are used. |
|
21 | 22 | pip install not-gitmodules |
22 | 23 | ``` |
23 | 24 |
|
| 25 | +--- |
| 26 | +Here's the updated `README.md` snippet with the changes you requested: |
| 27 | + |
24 | 28 | --- |
25 | 29 |
|
26 | 30 | ## Usage |
27 | 31 |
|
28 | 32 | 1. **IMPORTANT:** Create a `notgitmodules.yaml` file in your project's root directory. |
29 | 33 |
|
30 | | - ```yaml |
31 | | - repos: |
32 | | - # directory: url (ssh or https) |
33 | | - |
34 | | - # Example |
35 | | - file_reader: https://github.com/Free-Apps-for-All/file_manager_git_module |
36 | | - ``` |
| 34 | +```yaml |
| 35 | +repos: |
| 36 | + # directory: url (ssh or https) |
37 | 37 |
|
| 38 | + # Example |
| 39 | + file_reader: https://github.com/Free-Apps-for-All/file_manager_git_module |
| 40 | +``` |
38 | 41 |
|
39 | 42 | 2. Let `not_gitmodules` do the job. |
40 | 43 |
|
41 | | -- **Example with Code**: |
| 44 | +> ### Example with Code: |
| 45 | +> |
| 46 | +> Pass the path to the `initializer` function: |
| 47 | +> ```python |
| 48 | +> from not_gitmodules import initializer |
| 49 | +> |
| 50 | +> initializer('custom/path/to/notgitmodules.yaml') |
| 51 | +> ``` |
| 52 | +> or |
| 53 | +> ```python |
| 54 | +> from not_gitmodules import initializer |
| 55 | +> |
| 56 | +> initializer() # if notgitmodules.yaml exists in the project root |
| 57 | +> ``` |
| 58 | + |
| 59 | +### Example with CLI: |
| 60 | + |
| 61 | +#### 1. Install the library locally if you cloned the repo (**optional**) : |
| 62 | + |
| 63 | + ```bash |
| 64 | + pip install . |
| 65 | + ``` |
| 66 | + |
| 67 | +--- |
42 | 68 |
|
43 | | - Pass the path to the `initializer` function: |
44 | | - ```python |
45 | | - from not_gitmodules import initializer |
| 69 | +#### 2. Install the modules directly from the terminal: |
46 | 70 |
|
47 | | - initializer('/path/to/notgitmodules.yaml') |
48 | | - ``` |
| 71 | +>#### Flags |
| 72 | +> |
| 73 | +>| Flag | Description | |
| 74 | +>|---------------------|-------------------------------------------------------------------------| |
| 75 | +>| `-d`, `--dir_name` | Specify a directory name where the modules will be saved (optional). | |
| 76 | +>| `-y`, `--yaml-path` | Specify a custom location for the `notgitmodules.yaml` file (optional). | |
49 | 77 |
|
50 | | -- **Example with CLI**: |
| 78 | +### Default command: |
51 | 79 |
|
52 | | - Install the library locally if you cloned the repo: |
| 80 | +```bash |
| 81 | +not_gitmodules install |
| 82 | +``` |
53 | 83 |
|
54 | | - ```bash |
55 | | - pip install . |
56 | | - ``` |
| 84 | +### Command pattern: |
57 | 85 |
|
58 | | - Once installed, you can delete the local repo from your system (the library is now saved in the virtual environment |
59 | | - or globally). |
| 86 | +```bash |
| 87 | +not_gitmodules install --yaml-path </path/to/notgitmodules.yaml> --dir_name <directory_name> |
| 88 | +``` |
60 | 89 |
|
61 | | - Run the `not_gitmodules` command directly from the terminal: |
| 90 | +or |
62 | 91 |
|
63 | | - ```bash |
64 | | - not_gitmodules |
65 | | - ``` |
| 92 | +```bash |
| 93 | +not_gitmodules install -y </path/to/notgitmodules.yaml> -d <directory_name> |
| 94 | +``` |
66 | 95 |
|
67 | 96 | --- |
68 | 97 |
|
|
0 commit comments