Comments (3)
Flow Launcher can be used in portable mode allowing the use of cloud drives, git, syncthing, etc.
from flow.launcher.
It's true but it really costs my space and time. Sync the whole app in cloud might have some problem for too many files.
Flowlauncher was packed with runtime. Can they be deleted if I installed .net?
I think just sync a folder wasn't difficult. In C#,we can use Microsoft.Graph.
This is an example (bad code):
using Microsoft.Graph;
using Microsoft.Identity.Client;
using System;
using System.Net.Http.Headers;
using System.Threading.Tasks;
namespace OneDriveAppFolderExample{
class Program{
private static GraphServiceClient graphClient;
private static string clientId = "*#*#*#*#*";
private static string[] scopes = new string[] { "Files.ReadWrite.AppFolder" };
static async Task Main(string[] args){
var authProvider = new InteractiveAuthenticationProvider(clientId, scopes);
graphClient = new GraphServiceClient(authProvider);
var appFolder = await CreateAppFolder();
await UploadFileToAppFolder(appFolder, @"UserData/settings");
//This need keep flow's working directory not change
//In file search plugin, if user use the position of the executable file as the working directory, it will not work. We need not change the working directory of the main process.
}
private static async Task<DriveItem> CreateAppFolder(){
try{
var appFolder = await graphClient.Me.Drive.Special.AppRoot
.Request()
.GetAsync();
return appFolder;
}
catch (ServiceException ex){
if (ex.StatusCode == System.Net.HttpStatusCode.NotFound){
var folderToCreate = new DriveItem{
Name = "Flow.Launcher",
Folder = new Folder()
};
var appFolder = await graphClient.Me.Drive.Special.AppRoot
.Children
.Request()
.AddAsync(folderToCreate);
return appFolder;
}
else{
throw;
}
}
}
private static async Task UploadFileToAppFolder(DriveItem appFolder, string localFilePath){
using (var fileStream = System.IO.File.OpenRead(localFilePath)){
var uploadedFile = await graphClient.Me.Drive.Items[appFolder.Id]
.ItemWithPath(System.IO.Path.GetFileName(localFilePath))
.Content
.Request()
.PutAsync<DriveItem>(fileStream);
Console.WriteLine("Uploaded file ID: " + uploadedFile.Id);
}
}
}
public class InteractiveAuthenticationProvider : IAuthenticationProvider {
private IPublicClientApplication _msalClient;
private string[] _scopes;
public InteractiveAuthenticationProvider(string clientId, string[] scopes){
_msalClient = PublicClientApplicationBuilder.Create(clientId).Build();
_scopes = scopes;
}
public async Task AuthenticateRequestAsync(HttpRequestMessage request){
var authResult = await _msalClient.AcquireTokenInteractive(_scopes).ExecuteAsync();
request.Headers.Authorization = new AuthenticationHeaderValue("Bearer", authResult.AccessToken);
}
}
}
from flow.launcher.
We want to create this feature, but we don't have anyone to work on it now.
(Sadly, The simple setting backup/restore feature too.)
If you know how to write code, please make a PR.
from flow.launcher.
Related Issues (20)
- [Featrure Request] Microsoft store
- launcher.explorer: please support using forward slash to specify file path
- Web searches addon to use custom command.
- BUG: Explorer plugin search with Everything HOT 5
- The theme , Win11System, can't support mica. HOT 1
- BUG: HOT 3
- BUG: Flow Lancher got an error HOT 1
- BUG: Explorer Plugin Does Not Search For Directories? HOT 5
- BUG: Unable to work in Window11 Insider HOT 5
- BUG: Cannot use "everything" plugin HOT 1
- BUG: Calculator can't multiply numbers with more than 19 digits HOT 5
- Chocolatey version is not being updated HOT 2
- BUG: No plugins in plugin store HOT 3
- BUG: Sound Effect broken on v1.18 HOT 13
- BUG: Explorer Plugin - Unable to open custom Files App (third party file explorer) HOT 3
- BUG: All Text is jagged HOT 5
- Set default fallback option when pressing key combinations on result. HOT 3
- The ability to re-queue last queries. HOT 2
- BUG: Flow Launcher won't show up HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from flow.launcher.