diff --git a/.github/workflows/data-upgrade.yml b/.github/workflows/data-upgrade.yml index b415833..4ee0d54 100644 --- a/.github/workflows/data-upgrade.yml +++ b/.github/workflows/data-upgrade.yml @@ -25,20 +25,10 @@ jobs: - name: Install pandas run: pip install pandas - - name: Convert CSV to JSON run: | - import os - import pandas as pd - - os.makedirs('db/json', exist_ok=True) - csv_files = [f for f in os.listdir('db/csv') if f.endswith('.csv')] + python -c "import os; import pandas as pd; os.makedirs('db/json', exist_ok=True); csv_files = [f for f in os.listdir('db/csv') if f.endswith('.csv')]; [pd.read_csv(f'db/csv/{file}').to_json(f'db/json/{file.replace('.csv', '.json')}', orient='records', lines=True) for file in csv_files]" - for file in csv_files: - df = pd.read_csv(f'db/csv/{file}') - json_path = f'db/json/{file.replace(".csv", ".json")}' - df.to_json(json_path, orient='records', lines=True) - print("Conversion complete.") - name: Upload JSON files as artifacts uses: actions/upload-artifact@v4 diff --git a/db/csv/quotes.csv b/db/csv/quotes.csv index 22db7e7..5295bd6 100644 --- a/db/csv/quotes.csv +++ b/db/csv/quotes.csv @@ -1,5 +1,5 @@ dialog,movie,character,_id -Deagol!,ObjectId(5cd95395de30eff6ebccde5d),ObjectId(5cd99d4bde30eff6ebccfe9e),ObjectId(5cd96e05de30eff6ebcce7e9) +Deagol!!,ObjectId(5cd95395de30eff6ebccde5d),ObjectId(5cd99d4bde30eff6ebccfe9e),ObjectId(5cd96e05de30eff6ebcce7e9) Deagol!,ObjectId(5cd95395de30eff6ebccde5d),ObjectId(5cd99d4bde30eff6ebccfe9e),ObjectId(5cd96e05de30eff6ebcce7ea) Deagol!,ObjectId(5cd95395de30eff6ebccde5d),ObjectId(5cd99d4bde30eff6ebccfe9e),ObjectId(5cd96e05de30eff6ebcce7eb) Give us that! Deagol my love,ObjectId(5cd95395de30eff6ebccde5d),ObjectId(5cd99d4bde30eff6ebccfe9e),ObjectId(5cd96e05de30eff6ebcce7ec)