This commit is contained in:
2025-09-08 16:48:47 +07:00
parent c8e56447bf
commit a33729aeed
2 changed files with 56 additions and 6 deletions

View File

@@ -1,4 +1,30 @@
name: "KiBot PCB Generation" - name: Download component datasheets
if: steps.config_check.outputs.found == 'true'
continue-on-error: true
run: |
echo "Datasheets will be downloaded by KiBot's download_datasheets output"
echo "They will be saved in Generated/BoM/Datasheets/"
# Create a README for the datasheets folder if KiBot creates it
if [ -d "${GITHUB_WORKSPACE}/Generated/BoM/Datasheets" ]; then
cat > "${GITHUB_WORKSPACE}/Generated/BoM/Datasheets/README.md" << EOF
# Component Datasheets
This folder contains downloaded datasheets for components used in the project.
- Datasheets are downloaded automatically from URLs in the schematic
- Files are named based on the component reference and original filename
- Only unique datasheets are downloaded (duplicates are linked)
Generated on: $(date)
Project: ${{ steps.find_project.outputs.project_name }}
EOF
echo "Datasheet folder contents:"
ls -la "${GITHUB_WORKSPACE}/Generated/BoM/Datasheets/" || true
else
echo "Note: Datasheet folder not created yet - will be created by KiBot"
finame: "KiBot PCB Generation"
# Controls when the action will run # Controls when the action will run
on: on:
@@ -191,6 +217,13 @@ jobs:
name: BOM-${{ steps.layers.outputs.layers }}layer name: BOM-${{ steps.layers.outputs.layers }}layer
path: Generated/BoM path: Generated/BoM
- name: Retrieve results - Datasheets
if: steps.config_check.outputs.found == 'true'
uses: actions/upload-artifact@v3
with:
name: Datasheets
path: Generated/Datasheets
- name: Retrieve results - 3D Model - name: Retrieve results - 3D Model
if: steps.config_check.outputs.found == 'true' if: steps.config_check.outputs.found == 'true'
uses: actions/upload-artifact@v3 uses: actions/upload-artifact@v3

View File

@@ -324,16 +324,33 @@ outputs:
# Download datasheets # Download datasheets
- name: 'download_datasheets' - name: 'download_datasheets'
comment: "Download component datasheets" comment: "Download component datasheets as PDFs"
type: download_datasheets type: download_datasheets
dir: BoM/Datasheets dir: Datasheets # Put in root Datasheets folder
run_by_default: true run_by_default: true
priority: 60 priority: 60
category: 'Schematic/docs' category: 'Schematic/docs'
options: options:
field: 'Datasheet' # Field containing datasheet URLs field: 'Datasheet' # Field containing the datasheet URLs
output: 'datasheet_index.csv' # CSV file listing downloads output: '${REFERENCE}_${VALUE}.pdf' # Name pattern for downloaded files
dnf_filter: '_none' # Don't filter DNF parts dnf: false # Don't include DNF components
dnf_filter: '_none' # No DNF filtering
link_repeated: true # Use symlinks for repeated datasheets
repeated: false # Don't re-download same URL
classify: true # Organize by component type (Capacitors/, Resistors/, etc.)
classify_extra: # Additional classification rules
'U': 'ICs'
'Q': 'Transistors'
'D': 'Diodes'
'L': 'Inductors'
'F': 'Fuses'
'J': 'Connectors'
'P': 'Connectors'
'SW': 'Switches'
'Y': 'Crystals'
'T': 'Transformers'
'RV': 'Varistors'
'FB': 'Ferrite_Beads'
# 3D model # 3D model
- name: 'step' - name: 'step'