You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit bd98132
Browse filesBrowse the repository at this point in the historyBrowse files
This project is a Python tool that allows you to automatically generate an index (or table of contents) for KiCad schematics. It includes options to customize font sizes, language, column spacing, and so you can tailor the index to your needs.
3
4
4
-
Este proyecto es una herramienta en Python que permite generar de forma automatizada un índice (o tabla de contenido) para esquemáticos de KiCad. Incluye opciones para personalizar tamaños de fuente, idioma, distancias entre columnas y más, de manera que puedas ajustar el índice a tus necesidades.
5
+
## What is it for?
5
6
6
-
## ¿Para qué sirve?
7
-
8
-
- Facilita la creación de un índice de páginas dentro de un proyecto de KiCad.
9
-
- Permite añadir y editar páginas desde una interfaz gráfica (Tkinter).
10
-
- Genera el texto en el formato correcto para KiCad (versión 7 o superior).
11
-
- Ofrece la posibilidad de copiar el resultado al portapapeles para pegarlo directamente en KiCad.
12
-
- Permite guardar la configuración y el índice en un archivo `.sch`, así como recargarlo en cualquier momento.
7
+
- Facilitates the creation of a page index within a KiCad project.
8
+
- Allows adding and editing pages through a graphical interface (Tkinter).
9
+
- Generates text in the correct format for KiCad (version 8 or higher)(could works in previous version, but NOT TESTED).
10
+
- Offers the option to copy the result to the clipboard for direct pasting into KiCad.
11
+
- Enables saving the configuration and index to a `.sch` file, as well as reloading it at any time.
13
12
14
13

15
14
16
-
Este es el estilo de índice uqe crea el script
15
+
This is the style of the index that the script generates.
17
16
18
-
## Características
17
+
## Features
19
18
20
-
-**Interfaz gráfica sencilla**: Añade, edita o elimina páginas mediante cuadros de diálogo.
21
-
-**Ajuste de fuentes**: Cambia el tamaño del texto para el título, la versión, los encabezados y el contenido de las páginas.
22
-
-**Guardado en archivo**:
23
-
-Puedes sobrescribir siempre el mismo archivo `indice_generado.sch`(por defecto).
24
-
-O bien seleccionar un archivo nuevo cada vez que generes el índice.
25
-
-**Carga de índice**: Si ya tenías un índice generado, puedes cargarlo y seguir editándolo.
26
-
-**Archivo de configuración `config.ini`**: Todos los valores por defecto (tamaños de fuente, idioma, etc.) están centralizados en un archivo `config.ini`, lo que facilita su modificación sin tocar el código.
19
+
-**Simple graphical interface**: Add, edit, or delete pages using dialog boxes.
20
+
-**Font adjustment**: Change text size for the title, version, headers, and page content.
21
+
-**File saving options**:
22
+
-You can always overwrite the same `index_gen.sch`file (default).
23
+
-Or select a new file each time you generate the index.
24
+
-**Load index**: If you already have a generated index, you can load it and continue editing.
25
+
-**`config.ini` configuration file**: All default values (font sizes, language, etc.) are centralized in a `config.ini` file, making it easy to modify settings without changing the code.
-**Pyperclip**: For copying text to the clipboard. You can install it with `pip install pyperclip`:
32
+
-**Tkinter**: For the graphical interface. On Linux systems, you may need to install the`python3-tk` package.
34
33
35
-
Puedes instalar **tkinter**en Ubuntu con el siguiente comando:
34
+
You can install **tkinter**on Debian based images using the following command:
36
35
37
36
```bash
38
37
sudo apt-get install python3-tk
39
38
```
40
39
41
-
Puedes instalar los requerimientos con el siguiente comando:
40
+
You can install the required dependencies (pip) with:
42
41
43
42
```bash
44
43
pip install -r requirements.txt
45
44
```
46
45
47
-
## Instalación y uso
46
+
## Installation and Usage
48
47
49
-
1.**Clona o descarga este repositorio**en tu máquina local.
50
-
2.Asegúrate de tener instalado Python 3 y la librería `pyperclip`.
51
-
3.Si no existe un archivo `config.ini`, el script creará uno automáticamente con valores por defecto al ejecutarse.
48
+
1.**Clone or download this repository**to your local machine.
49
+
2.Ensure you have satisfied the requirements.
50
+
3.If a `config.ini` file does not exist, the script will automatically create one with default values when executed.
52
51
53
-
Para**ejecutar**la aplicación:
52
+
To**run**the application:
54
53
55
54
```bash
56
-
python index_generator.py
55
+
python kicad_index_generator.py
57
56
```
58
57
```bash
59
-
python3 index_generator.py
58
+
python3 kicad_index_generator.py
60
59
```
61
60
62
-
*(Asumiendo que el archivo principal se llama `index_generator.py`.)*
61
+
*(Assuming the main file is named `kicad_index_generator.py`.)*
63
62
64
-
### Pasos en la aplicación
63
+
### Application Steps
65
64
66
-
1.**Nombre del Proyecto**: Rellena el campo con el nombre que quieras mostrar en el índice.
67
-
2.**Versión**: Indica la versión (por ejemplo, `v2.3`).
68
-
3.**Distancia entre columnas**: Ajusta la separación horizontal entre la columna de contenido y la de número de página (por defecto 150).
69
-
4.**Idioma en Inglés**: Marca esta casilla si quieres que los encabezados aparezcan como `Content`y`Sheet`en vez de `Contenido`y`Hoja`.
70
-
5.**Guardar en archivo nuevo (no sobrescribir)**: Si se marca, al generar el índice te preguntará dónde guardarlo. De lo contrario, usará (y sobrescribirá) el archivo`indice_generado.sch`.
71
-
6.**Añadir Página**: Abre un cuadro de diálogo para añadir una nueva entrada (nombre de página y número de hoja).
72
-
7.**Generar Índice**: Crea el índice con las entradas listadas, lo guarda en el archivo elegido y copia el texto al portapapeles.
73
-
8.**Cargar Archivo**: Permite abrir un `.sch`previamente generado y recuperar sus páginas para editarlas de nuevo.
74
-
9.**Ajustar Tamaño de Textos**: Abre una ventana donde puedes cambiar el tamaño de la fuente para el título, versión, encabezados y páginas.
65
+
1.**Project Name**: Fill in the field with the name you want to display in the index.
66
+
2.**Version**: Enter the version (e.g., `v2.3`).
67
+
3.**Column Spacing**: Adjust the horizontal spacing between the content column and the page number column (default is 110).
68
+
4.**Language in English**: Check this box if you want the headers to appear as `Content`and`Sheet`instead of `Contenido`and`Hoja`.
69
+
5.**Save in new file (don't overwrite)**: If checked, the application will ask where to save the index each time. Otherwise, it will use (and overwrite) the file`indice_generado.sch`.
70
+
6.**Add Page**: Opens a dialog to add a new entry (page name and sheet number).
71
+
7.**Generate Index**: Creates the index with the listed entries, saves it to the selected file, and copies the text to the clipboard.
72
+
8.**Load File**: Allows you to open a previously generated `.sch`file and retrieve its pages for editing.
73
+
9.**Adjust Text Sizes**: Opens a window where you can change the font size for the title, version, headers, and pages.
75
74
76
-
## Archivo de configuración `config.ini`
75
+
## `config.ini` Configuration File
77
76
78
-
El archivo `config.ini`contiene los valores por defecto para la aplicación. Por ejemplo:
77
+
The `config.ini`file contains the default values for the application. For example:
79
78
80
79
```ini
81
80
[DEFAULTS]
@@ -84,27 +83,18 @@ font_size_version = 10
84
83
font_size_header = 5
85
84
font_size_page = 4
86
85
default_spacing = 150
87
-
default_language = es
86
+
default_language = en
88
87
save_in_new_file = false
89
88
```
90
89
91
-
-`font_size_title` / `font_size_version` / `font_size_header` / `font_size_page`: Tamaños de fuente por defecto.
92
-
-`default_spacing`: Distancia entre columnas por defecto.
93
-
-`default_language`: `es`para español o`en`para inglés.
94
-
-`save_in_new_file`: `true`para que, por defecto, se guarde siempre en un archivo nuevo; `false`para sobrescribir.
90
+
-`font_size_title` / `font_size_version` / `font_size_header` / `font_size_page`: Default font sizes.
-`save_in_new_file`: `true`to always save in a new file by default; `false`to overwrite.
95
94
96
-
Puedes editar estos valores sin necesidad de modificar el código Python. La próxima vez que ejecutes la aplicación, tomará en cuenta los cambios del`config.ini`.
95
+
You can edit these values without modifying the Python code. The next time you run the application, it will apply the changes from`config.ini`.
97
96
98
97
>[!TIP]
99
-
> Para ejecutarlo en segundo plano
98
+
> To run it in the background without showing errors:
0 commit comments