Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
louis030195 committed Jun 29, 2024
1 parent f454c8a commit 131f51a
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 13 deletions.
2 changes: 2 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,8 @@ jobs:
GH_TOKEN: ${{ secrets.PAT }}
run: |
gh release create ${{ env.RELEASE_VERSION }} --title ${{ env.RELEASE_VERSION }} --generate-notes
mv ./artifacts/ubuntu/screenpipe ./artifacts/ubuntu/screenpipe-ubuntu
mv ./artifacts/macos/screenpipe ./artifacts/macos/screenpipe-macos
gh release upload ${{ env.RELEASE_VERSION }} ./artifacts/ubuntu/* ./artifacts/macos/*
21 changes: 21 additions & 0 deletions examples/maintain-a-log-of-my-day/log.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
- **Automated MacOS Releases**: Successfully developed a GitHub Actions workflow for streamlining macOS releases, including artifact handling and release tagging based on version naming conventions.



- **Notarization Step Added**: Incorporated a notarization step into the workflow to comply with Apple's Gatekeeper security requirements before uploading the artifact.



- **Version Management Enhancement**: Improved the use of `$GITHUB_ENV` variables for dynamic versioning, ensuring accurate and consistent version identification across macOS binary releases.



- **Release Tags Streamlined**: Ensured that release tags follow a standardized pattern (e.g., 'screenpipe-macos') derived from `GITHUB_REF_NAME`, simplifying tag management.



- **Release Notes Integration**: Seamlessly integrated the generation and upload of macOS release artifacts, including comprehensive release notes sourced directly from GitHub Actions workflow outputs for better traceability.



- **Version Consistency Enforcement**: Established a verification process to maintain version consistency across different MacOS releases using the repository's release page as a reference point.
27 changes: 16 additions & 11 deletions examples/maintain-a-log-of-my-day/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ fn main() {
Rules:
- Keep the log small and concise, formatted as a bullet list
- Your responses are NOT in a code block e.g. no ```plaintext ```markdown etc.!
- DO WRITE A LOG OF THE USER'S DAY IN MARKDOWN FORMAT. NOTHING ELSE
- DO WRITE A LOG OF THE USER'S DAY. NOTHING ELSE
Now update the log based on the user's screen and respond with only the updated log.
LOG OF THE USER'S DAY:
Expand All @@ -78,19 +78,24 @@ fn main() {
}
]
}))
.send()
.unwrap();
let text: serde_json::Value = response.json().unwrap();
// remove first " and last " from the response
let llm_response = text["message"]["content"].to_string().trim_matches('"').to_string();
.send();

println!("{}", llm_response);
if let Ok(response) = response {
let text: serde_json::Value = response.json().unwrap();
// remove first " and last " from the response
let llm_response = text["message"]["content"].to_string().trim_matches('"').to_string();

// replace all \n with \n\n
let llm_response = llm_response.replace("\\n", "\n\n");
println!("{}", llm_response);

// update to file
fs::write("log.md", llm_response).unwrap();
// replace all \n with \n\n
let llm_response = llm_response.replace("\\n", "\n\n");

// update to file
fs::write("log.md", llm_response).unwrap();
} else {
eprintln!("Request failed, skipping to next iteration.");
continue;
}
}

// Sleep for a while before checking again
Expand Down
4 changes: 2 additions & 2 deletions screenpipe/src/core/core.rs
Original file line number Diff line number Diff line change
Expand Up @@ -230,8 +230,8 @@ fn stream_to_ffmpeg(
"-pix_fmt",
"yuv420p",
"-crf",
// "25",
"18",
"25",
// "18",
&output_name,
])
.stdin(Stdio::piped())
Expand Down

0 comments on commit 131f51a

Please sign in to comment.