KSP-CKAN / NetKAN

Metadata files used by the NetKAN/CKAN indexer for KSP
Creative Commons Zero v1.0 Universal
69 stars 337 forks source link

Question: How do you make your own CKAN metadata repo? #10029

Closed ProgrammerFailure closed 1 month ago

ProgrammerFailure commented 1 month ago

Hi, I've been trying to make a custom metadata repo on the advice of @HebaruSan here: https://github.com/KSP-CKAN/NetKAN/issues/9990

So far, I made a netkan, then used netkan.exe to make a .ckan, and then turned the .ckan into a .tar.gz and put it in a github repo. I added it to the CKAN metadata list. But when updating repos it gives this error:

Not a .tar.gz or .zip, cannot process: C:\Users\user\AppData\Local\Temp\CdFileMgr\55a3e268-8b03-41.tmp

Here is the repo with what I made: https://github.com/ProgrammerFailure/MyCKANMetaData And here is the file I set ckan to look at: https://github.com/ProgrammerFailure/MyCKANMetaData/blob/main/Master/TheArchive.zip

What did I mess up? Is there any documentation on how to host your own metadata?

HebaruSan commented 1 month ago

GitHub will handle the tar.gz part for you, if the .ckan files are in a repo.

https://github.com/ProgrammerFailure/MyCKANMetaData/archive/main.tar.gz worked for me.

image

image

ProgrammerFailure commented 1 month ago

Oh...

I'm an idiot. Anyway, thanks for helping. Closing now. May I add a small section to the wiki about making these repos?

HebaruSan commented 1 month ago

Oh...

I'm an idiot. Anyway, thanks for helping. Closing now.

Hardly! You got like 95% of it on your own, all I had to do was fill in the magic URL format that GitHub makes very hard to find.

May I add a small section to the wiki about making these repos?

Yes, please!

ProgrammerFailure commented 1 month ago

Oh by the way, I was running into some issues with this metadata:

spec_version: v1.27
identifier: ProgrammerFailure-KSP-Patches
name: ProgrammerFailure's KSP patches
abstract: Patches for KSP
author:
  - ProgrammerFailure
license: public-domain
$kref: '#/ckan/github/ProgrammerFailure/My-KSP-patches'
resources:
  bugtracker: >-
    https://github.com/ProgrammerFailure/My-KSP-patches/blob/main/GameData/My-KSP-Patches/Issues
  license: >-
    https://github.com/ProgrammerFailure/My-KSP-patches/blob/main/GameData/My-KSP-Patches/Information/LICENSE
  homepage: https://github.com/ProgrammerFailure/My-KSP-patches
  repository: https://github.com/ProgrammerFailure/My-KSP-patches
tags:
  - config
  - science
  - tech-tree
  - career
install:
  - file: My-KSP-patches-1.6.4/GameData/My-KSP-Patches/
    install_to: GameData
  - file: My-KSP-patches-1.6.4/GameData/WildBlueIndustries/
    install_to: GameData
ksp_version: any
depends:
  - name: ModuleManager
recommends:
  - name: SnacksCryoEnginesCryoEnginesExtensionsDSEVPathfinder
x_via: Generated by Metadata Webtool

I ended up having to specify a version & download link, removing the kref ,and as I understand it netkan.exe is supposed to autofetch that stuff.

HebaruSan commented 1 month ago

Yup, it does autofetch that stuff. 👍 No idea what problem you had.

Oh, you don't have any assets attached to your release, so you'd either need to add that, or use this to make it download the source archive:

x_netkan_github:
  use_source_archive: true
ProgrammerFailure commented 1 month ago

That was indeed the issue. I'll add that bit to the wiki page I'm making.

ProgrammerFailure commented 1 month ago

@HebaruSan I fixed my own issues and added 2 pages to the wiki. Could you go over them & ensure they are accurate? I don't want to mislead anyone. Thanks for all the help.