{"id":21473196,"url":"https://github.com/johan-perso/teable-to-json","last_synced_at":"2025-03-17T07:25:06.219Z","repository":{"id":228433620,"uuid":"774010222","full_name":"johan-perso/teable-to-json","owner":"johan-perso","description":"A CLI made to export tables from a Teable base to a JSON file","archived":false,"fork":false,"pushed_at":"2024-05-18T09:02:42.000Z","size":12,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-24T04:18:05.320Z","etag":null,"topics":["cli","cms","node-cli","teable","tui"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/johan-perso.png","metadata":{"files":{"readme":"README.fr.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null}},"created_at":"2024-03-18T19:35:30.000Z","updated_at":"2024-05-18T09:02:46.000Z","dependencies_parsed_at":"2024-03-21T19:25:27.555Z","dependency_job_id":"d7dcadc3-051c-40b3-a76c-02191a8fda00","html_url":"https://github.com/johan-perso/teable-to-json","commit_stats":null,"previous_names":["johan-perso/teable-to-json"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Fteable-to-json","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Fteable-to-json/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Fteable-to-json/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/johan-perso%2Fteable-to-json/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/johan-perso","download_url":"https://codeload.github.com/johan-perso/teable-to-json/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243990022,"owners_count":20379708,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["cli","cms","node-cli","teable","tui"],"created_at":"2024-11-23T10:15:22.403Z","updated_at":"2025-03-17T07:25:06.200Z","avatar_url":"https://github.com/johan-perso.png","language":"JavaScript","funding_links":["https://ko-fi.com/johan_stickman","https://paypal.me/moipastoii"],"categories":[],"sub_categories":[],"readme":"###### English version [here](https://github.com/johan-perso/teable-to-json/blob/main/README.md).\n\n# TeableToJSON\n\nUn CLI conçu pour exporter une ou plusieurs tables d'une base Teable vers un fichier JSON, pour l'utiliser dans un projet comme si c'était un CMS.\n\nhttps://github.com/johan-perso/teable-to-json/assets/41506568/d5cf0847-fdbd-4397-87ba-1cae05907482\n\n\n## Installation\n\n\u003e TeableToJSON ne supporte que les versions récentes de NodeJS (v20+).\n\n```bash\n# Avec npm\nnpm i -g teablejson\n\n# Ou avec pnpm\npnpm i -g teablejson\n```\n\n```bash\n$ teablejson --version\n$ teablejson --help\n```\n\n\n## Configuration\n\nPour accéder à une de vos bases, vous devrez configurer un fichier `.env` dans le dossier où vous exécutez TeableToJSON. Voici un exemple :\n\n```env\n# Authentification, requis\nTEABLE_AUTH_TOKEN=teable_xxx\nTEABLE_BASE_ID=xxx\n\n# Option, facultatif\nTEABLE_FILENAME=nomdefichier\n```\n\nSi aucun fichier .env n'est trouvé lors de l'exécution de la commande, TeableToJSON vous aidera à en créer un.\n\n\n## Script utilisateur\n\nSi vous avez besoin que votre base exporté soit vérifiée ou modifiée avant d'être enregistré, vous pouvez créer un fichier nommé `.teablescript.js` dans le dossier auquel vous exécutez TeableToJSON.\n\n* Votre script doit exporter une fonction qui prend en paramètre un objet JSON, celui de la base exportée.\n* Si un string est retourné, le fichier JSON ne sera pas enregistré et le contenu du string sera affiché dans la console.\n* Si un objet est retourné, le fichier JSON sera enregistré avec le contenu de l'objet.\n* Si rien n'est retourné, le fichier JSON sera enregistré tel quel.\n\nExemple :\n\n```js\nmodule.exports = async function(json){\n\t// Vérifier que la base contienne une table nommée \"issues\"\n\tif(!json.issues) return \"La base ne contient pas de table nommée 'issues'\"\n\n\t// Supprimer les objets qui sont marqués comme \"archivés\"\n\tjson.issues = json.issues.filter(issue =\u003e !issue.archived)\n\n\t// Retourner le JSON modifié\n\treturn json\n}\n```\n\n\n## Licence\n\nMIT © [Johan](https://johanstick.fr). Soutenez ce projet via [Ko-Fi](https://ko-fi.com/johan_stickman) ou [PayPal](https://paypal.me/moipastoii) si vous souhaitez m'aider 💙\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-perso%2Fteable-to-json","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fjohan-perso%2Fteable-to-json","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fjohan-perso%2Fteable-to-json/lists"}