From df29dbe4e533779b7d83b6bf7a5fa1ece23cfbb5 Mon Sep 17 00:00:00 2001 From: Falko Zurell Date: Mon, 20 Jan 2025 09:52:03 +0100 Subject: [PATCH 1/4] bumbed version number for new OpenAI integration --- Cargo.toml | 2 +- package.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 8451a1d..a2de8aa 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "pixelfed_batch_uploader" -version = "1.0.2" +version = "1.0.3" edition = "2021" [build] diff --git a/package.sh b/package.sh index eada008..747999f 100755 --- a/package.sh +++ b/package.sh @@ -1,6 +1,6 @@ #!/bin/bash -x -RELEASE_VERSION="1.0.2" +RELEASE_VERSION="1.0.3" PLATFORM=$(rustc -vV | grep host | cut -d ' ' -f2) From 80ca4ce73cfbd936dc8459bd56a3de7c972b0e83 Mon Sep 17 00:00:00 2001 From: Falko Zurell Date: Mon, 20 Jan 2025 09:53:20 +0100 Subject: [PATCH 2/4] removed unused crate part --- src/main.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main.rs b/src/main.rs index 8c2c704..eafd7d7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -2,7 +2,7 @@ use std::fs; use serde::Deserialize; use serde_json::{json, Value}; use reqwest::blocking::Client; -use reqwest::{self, multipart}; +use reqwest::{self}; use std::error::Error; use base64::{Engine as _, engine::general_purpose::STANDARD}; From bba97a2185a4a6d2cbb217ba7d4fc626f8651de3 Mon Sep 17 00:00:00 2001 From: Falko Zurell Date: Mon, 20 Jan 2025 10:28:57 +0100 Subject: [PATCH 3/4] clarified where the config.json should go. --- README.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/README.md b/README.md index 451398e..4946f9c 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,8 @@ Two variables in the post description can be give (see the `config.json.example` Usage: `./pixelfed_batch_uploader ../../Downloads/Instagram-Backup/media/posts/201406 --title "June 2014"` +The `config.json` must be in the same directory the program is called from (`$PWD`) + [![asciicast](https://asciinema.mxhdr.net/a/6.svg)](https://asciinema.mxhdr.net/a/6) From aa2cedde8dfe80ed5a33a3211a4af84fb37aee2d Mon Sep 17 00:00:00 2001 From: Falko Zurell Date: Mon, 20 Jan 2025 10:31:33 +0100 Subject: [PATCH 4/4] corrected JSON comments in the README --- config.json.example | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/config.json.example b/config.json.example index 77da6c1..9325124 100644 --- a/config.json.example +++ b/config.json.example @@ -1,10 +1,11 @@ { "pixelfed_url": "https://pixelfed.example.com", - # See https://docs.pixelfed.org/running-pixelfed/installation.html#setting-up-services + // See https://docs.pixelfed.org/running-pixelfed/installation.html#setting-up-services "access_token": "sdg;lkjrglksjh;lkshj;lksjthrst;hoijrt;ihj;sithj;itjh", "visibility": "unlisted", "batch_size": 10, "default_text": "Instagram dump from @title@ @batch@ #instabackup #instaimport #instaexit", + // https://help.openai.com/en/articles/4936850-where-do-i-find-my-openai-api-key "openai_api_key": "0bff275feca7baab5ac508e635543f59fff42d4436c9918cd37c330f9adb4eb4fda643c212794b800bb05fb26016f55425c6755a3525c64792197e4d0fbe95d5", "openai_api_url": "https://api.openai.com/v1/chat/completions", "openai_model": "gpt-4o"