1.0.2 • Published 12 months ago

@rightalx/gitfolio-extract v1.0.2

Weekly downloads
-
License
MIT
Repository
github
Last release
12 months ago

GitFolio-Extract šŸš€

Extract GitHub projects information into a structured JSON format for your portfolio website.

Features ✨

  • šŸ”‘ Simple GitHub authentication via browser
  • šŸ“Š Extracts repository details including:
    • Basic information (name, description, URL)
    • Statistics (stars, forks, last updated)
    • Technical details (languages used)
    • Repository content (README)
  • šŸ’¾ Saves data in a clean JSON format
  • šŸ› ļø Easy to use CLI interface

Installation šŸ“¦

# Install globally using npm
npm install -g @rightalx/gitfolio-extract@latest

# Or using pnpm
pnpm add -g @rightalx/gitfolio-extract@latest

# Or using yarn
yarn global add @rightalx/gitfolio-extract@latest

Usage šŸ”Ø

After installation, you can use the CLI directly:

# Configure GitHub authentication
gitfolio-extract configure

# Extract repository data (saves to current directory as portfolio.json)
gitfolio-extract extract

# Extract to custom location (specify full path or relative to current directory)
gitfolio-extract extract -o ./my-portfolio.json
gitfolio-extract extract -o C:/Users/username/Documents/my-portfolio.json

# Show help
gitfolio-extract --help

Output Location šŸ“‚

  • When using ./my-portfolio.json, the file is saved in your current working directory
  • You can use absolute paths like C:/path/to/my-portfolio.json
  • If the specified directory doesn't exist, it will be created automatically

The tool will save:

  • Your GitHub authentication securely in your system's config directory
  • The portfolio data in JSON format at your specified location (or ./portfolio.json by default)

Output Format šŸ“„

The tool generates a JSON file with the following structure:

{
  "metadata": {
    "generated": "2024-01-20T12:00:00Z",
    "username": "yourusername",
    "totalRepos": 10
  },
  "repositories": [
    {
      "basic": {
        "name": "repo-name",
        "description": "Repository description",
        "url": "https://github.com/user/repo",
        "homepage": "https://project-homepage.com"
      },
      "stats": {
        "stars": 5,
        "forks": 2,
        "lastUpdated": "2024-01-19T10:30:00Z"
      },
      "technical": {
        "languages": ["TypeScript", "JavaScript"],
        "techStack": []
      },
      "content": {
        "readme": "# Project README content..."
      }
    }
  ]
}

Development šŸ› ļø

Project Structure

gitfolio-extract/
ā”œā”€ā”€ src/
│   ā”œā”€ā”€ commands/
│   │   ā”œā”€ā”€ configure.ts   # Authentication command
│   │   └── extract.ts     # Data extraction command
│   ā”œā”€ā”€ services/
│   │   ā”œā”€ā”€ github.service.ts    # GitHub API interactions
│   │   └── repository.service.ts # Repository data handling
│   └── index.ts           # CLI entry point
ā”œā”€ā”€ package.json
└── tsconfig.json

Building

# Build the project
pnpm build

# Development with watch mode
pnpm dev

Contributing šŸ¤

Contributions are welcome! Please feel free to submit a Pull Request.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/AmazingFeature)
  3. Commit your changes (git commit -m 'Add some AmazingFeature')
  4. Push to the branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License šŸ“

This project is licensed under the MIT License - see the LICENSE file for details.

Acknowledgments šŸ™

  • Built with TypeScript
  • Uses GitHub's OAuth Device Flow for authentication
  • Powered by Octokit for GitHub API interactions
1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago