mirror of
https://github.com/kamranahmedse/developer-roadmap.git
synced 2025-08-30 20:49:49 +02:00
Create files for android roadmap
This commit is contained in:
@@ -19,13 +19,12 @@ if (!allowedRoadmapIds.includes(roadmapId)) {
|
||||
}
|
||||
|
||||
const ROADMAP_CONTENT_DIR = path.join(ALL_ROADMAPS_DIR, roadmapId, 'content');
|
||||
const { Configuration, OpenAIApi } = require('openai');
|
||||
const configuration = new Configuration({
|
||||
const OpenAI = require('openai');
|
||||
|
||||
const openai = new OpenAI({
|
||||
apiKey: OPEN_AI_API_KEY,
|
||||
});
|
||||
|
||||
const openai = new OpenAIApi(configuration);
|
||||
|
||||
function getFilesInFolder(folderPath, fileList = {}) {
|
||||
const files = fs.readdirSync(folderPath);
|
||||
|
||||
@@ -60,16 +59,16 @@ function writeTopicContent(currTopicUrl) {
|
||||
|
||||
const roadmapTitle = roadmapId.replace(/-/g, ' ');
|
||||
|
||||
let prompt = `I am reading a guide about "${roadmapTitle}". I am on the topic "${parentTopic}". I want to know more about "${childTopic}". Write me a brief summary of that. Content should be in markdown. I already know the benefits of each so do not add benefits in the output. Also include the code examples if applicable to this topic.`;
|
||||
let prompt = `I am reading a guide about "${roadmapTitle}". I am on the topic "${parentTopic}". I want to know more about "${childTopic}". Write me a brief paragraph for that. Content should be in markdown. I already know the benefits of each so do not add benefits in the output.`;
|
||||
if (!childTopic) {
|
||||
prompt = `I am reading a guide about "${roadmapTitle}". I am on the topic "${parentTopic}". I want to know more about "${parentTopic}". Write me with a brief summary of that. Content should be in markdown. I already know the benefits of each so do not add benefits in the output. Also include the code examples if applicable to this topic.`;
|
||||
prompt = `I am reading a guide about "${roadmapTitle}". I am on the topic "${parentTopic}". I want to know more about "${parentTopic}". Write me a brief paragraph for that. Content should be in markdown. I already know the benefits of each so do not add benefits in the output.`;
|
||||
}
|
||||
|
||||
console.log(`Generating '${childTopic || parentTopic}'...`);
|
||||
|
||||
return new Promise((resolve, reject) => {
|
||||
openai
|
||||
.createChatCompletion({
|
||||
openai.chat.completions
|
||||
.create({
|
||||
model: 'gpt-4',
|
||||
messages: [
|
||||
{
|
||||
@@ -79,7 +78,7 @@ function writeTopicContent(currTopicUrl) {
|
||||
],
|
||||
})
|
||||
.then((response) => {
|
||||
const article = response.data.choices[0].message.content;
|
||||
const article = response.choices[0].message.content;
|
||||
|
||||
resolve(article);
|
||||
})
|
||||
@@ -92,7 +91,7 @@ function writeTopicContent(currTopicUrl) {
|
||||
async function writeFileForGroup(group, topicUrlToPathMapping) {
|
||||
const topicId = group?.properties?.controlName;
|
||||
const topicTitle = group?.children?.controls?.control?.find(
|
||||
(control) => control?.typeID === 'Label'
|
||||
(control) => control?.typeID === 'Label',
|
||||
)?.properties?.text;
|
||||
const currTopicUrl = topicId?.replace(/^\d+-/g, '/')?.replace(/:/g, '/');
|
||||
if (!currTopicUrl) {
|
||||
@@ -138,15 +137,14 @@ async function writeFileForGroup(group, topicUrlToPathMapping) {
|
||||
async function run() {
|
||||
const topicUrlToPathMapping = getFilesInFolder(ROADMAP_CONTENT_DIR);
|
||||
|
||||
const roadmapJson = require(path.join(
|
||||
ALL_ROADMAPS_DIR,
|
||||
`${roadmapId}/${roadmapId}`
|
||||
));
|
||||
const roadmapJson = require(
|
||||
path.join(ALL_ROADMAPS_DIR, `${roadmapId}/${roadmapId}`),
|
||||
);
|
||||
|
||||
const groups = roadmapJson?.mockup?.controls?.control?.filter(
|
||||
(control) =>
|
||||
control.typeID === '__group__' &&
|
||||
!control.properties?.controlName?.startsWith('ext_link')
|
||||
!control.properties?.controlName?.startsWith('ext_link'),
|
||||
);
|
||||
|
||||
if (!OPEN_AI_API_KEY) {
|
||||
|
@@ -0,0 +1 @@
|
||||
# Kotlin
|
@@ -0,0 +1 @@
|
||||
# Java
|
@@ -0,0 +1 @@
|
||||
# Pick a language
|
@@ -0,0 +1 @@
|
||||
# Development ide
|
@@ -0,0 +1 @@
|
||||
# Basics of kotlin
|
@@ -0,0 +1 @@
|
||||
# Basics of oop
|
@@ -0,0 +1 @@
|
||||
# Datastructures and algorithms
|
@@ -0,0 +1 @@
|
||||
# Using gradle
|
@@ -0,0 +1 @@
|
||||
# Hello world app
|
@@ -0,0 +1 @@
|
||||
# The fundamentals
|
@@ -0,0 +1 @@
|
||||
# Git
|
@@ -0,0 +1 @@
|
||||
# Github
|
@@ -0,0 +1 @@
|
||||
# Bitbucket
|
@@ -0,0 +1 @@
|
||||
# Gitlab
|
@@ -0,0 +1 @@
|
||||
# Version control
|
@@ -0,0 +1 @@
|
||||
# Activity lifecycle
|
@@ -0,0 +1 @@
|
||||
# State changes
|
@@ -0,0 +1 @@
|
||||
# Tasks backstack
|
@@ -0,0 +1 @@
|
||||
# Activity
|
@@ -0,0 +1 @@
|
||||
# Services
|
@@ -0,0 +1 @@
|
||||
# Content provider
|
@@ -0,0 +1 @@
|
||||
# Broadcast receiver
|
@@ -0,0 +1 @@
|
||||
# Implicit intents
|
@@ -0,0 +1 @@
|
||||
# Explicit intents
|
@@ -0,0 +1 @@
|
||||
# Intent filters
|
@@ -0,0 +1 @@
|
||||
# Intent
|
@@ -0,0 +1 @@
|
||||
# App components
|
@@ -0,0 +1 @@
|
||||
# Jetpack compose
|
@@ -0,0 +1 @@
|
||||
# App shortcuts
|
@@ -0,0 +1 @@
|
||||
# Navigation components
|
@@ -0,0 +1 @@
|
||||
# Text view
|
@@ -0,0 +1 @@
|
||||
# Edit text
|
@@ -0,0 +1 @@
|
||||
# Buttons
|
@@ -0,0 +1 @@
|
||||
# Image view
|
@@ -0,0 +1 @@
|
||||
# List view
|
@@ -0,0 +1 @@
|
||||
# Tabs
|
@@ -0,0 +1 @@
|
||||
# Fragments
|
@@ -0,0 +1 @@
|
||||
# Dialogs
|
@@ -0,0 +1 @@
|
||||
# Toast
|
@@ -0,0 +1 @@
|
||||
# Bottom sheet
|
@@ -0,0 +1 @@
|
||||
# Drawer
|
@@ -0,0 +1 @@
|
||||
# Animations
|
@@ -0,0 +1 @@
|
||||
# Elements
|
@@ -0,0 +1 @@
|
||||
# Interface and navigation
|
@@ -0,0 +1 @@
|
||||
# Frame
|
@@ -0,0 +1 @@
|
||||
# Linear
|
@@ -0,0 +1 @@
|
||||
# Relative
|
@@ -0,0 +1 @@
|
||||
# Constraint
|
@@ -0,0 +1 @@
|
||||
# Recycle view
|
@@ -0,0 +1 @@
|
||||
# Layouts
|
@@ -0,0 +1 @@
|
||||
# Repository pattern
|
@@ -0,0 +1 @@
|
||||
# Builder pattern
|
@@ -0,0 +1 @@
|
||||
# Flow
|
@@ -0,0 +1 @@
|
||||
# Rxjava
|
@@ -0,0 +1 @@
|
||||
# Rxkotlin
|
@@ -0,0 +1 @@
|
||||
# Livedata
|
@@ -0,0 +1 @@
|
||||
# Observer pattern
|
@@ -0,0 +1 @@
|
||||
# Dagger
|
@@ -0,0 +1 @@
|
||||
# Hilt
|
@@ -0,0 +1 @@
|
||||
# Koin
|
@@ -0,0 +1 @@
|
||||
# Kodein
|
@@ -0,0 +1 @@
|
||||
# Dependency injection
|
@@ -0,0 +1 @@
|
||||
# Factory pattern
|
@@ -0,0 +1 @@
|
||||
# Mvi
|
@@ -0,0 +1 @@
|
||||
# Mvvm
|
@@ -0,0 +1 @@
|
||||
# Mvp
|
@@ -0,0 +1 @@
|
||||
# Mvc
|
@@ -0,0 +1 @@
|
||||
# Architectural patterns
|
@@ -0,0 +1 @@
|
||||
# Design architecture
|
@@ -0,0 +1 @@
|
||||
# Shared preferences
|
@@ -0,0 +1 @@
|
||||
# Datastore
|
@@ -0,0 +1 @@
|
||||
# Room
|
@@ -0,0 +1 @@
|
||||
# File system
|
1
src/data/roadmaps/android/content/106-storage/index.md
Normal file
1
src/data/roadmaps/android/content/106-storage/index.md
Normal file
@@ -0,0 +1 @@
|
||||
# Storage
|
@@ -0,0 +1 @@
|
||||
# Retrofit
|
@@ -0,0 +1 @@
|
||||
# Okhttp
|
@@ -0,0 +1 @@
|
||||
# Apollo android
|
1
src/data/roadmaps/android/content/107-network/index.md
Normal file
1
src/data/roadmaps/android/content/107-network/index.md
Normal file
@@ -0,0 +1 @@
|
||||
# Network
|
@@ -0,0 +1 @@
|
||||
# Coroutines
|
@@ -0,0 +1 @@
|
||||
# Threads
|
@@ -0,0 +1 @@
|
||||
# Rxjava
|
@@ -0,0 +1 @@
|
||||
# Rxkotlin
|
@@ -0,0 +1 @@
|
||||
# Work manager
|
@@ -0,0 +1 @@
|
||||
# Asynchronism
|
@@ -0,0 +1 @@
|
||||
# Authentication
|
@@ -0,0 +1 @@
|
||||
# Crashlytics
|
@@ -0,0 +1 @@
|
||||
# Remote config
|
@@ -0,0 +1 @@
|
||||
# Cloud messaging
|
@@ -0,0 +1 @@
|
||||
# Fire store
|
@@ -0,0 +1 @@
|
||||
# Firebase
|
@@ -0,0 +1 @@
|
||||
# Google admob
|
@@ -0,0 +1 @@
|
||||
# Google play services
|
@@ -0,0 +1 @@
|
||||
# Google maps
|
@@ -0,0 +1 @@
|
||||
# Common services
|
@@ -0,0 +1 @@
|
||||
# Ktlint
|
@@ -0,0 +1 @@
|
||||
# Detekt
|
1
src/data/roadmaps/android/content/110-linting/index.md
Normal file
1
src/data/roadmaps/android/content/110-linting/index.md
Normal file
@@ -0,0 +1 @@
|
||||
# Linting
|
@@ -0,0 +1 @@
|
||||
# Timber
|
@@ -0,0 +1 @@
|
||||
# Leak canary
|
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user