rcx
rcx copied to clipboard
Port tasks to new rcx-version
This updates the tasks-branch from rclone to rcx and the changes made since the fork
Closes #146, #38, #61 and i guess it closes #128 aswell
Todo:
- [x] Migrate Export/Import to JSON
- [x] -> when making an export, it should export tasks, triggers and the rclone config as a zip file
- [x] Switch Export filestorage to non-deprecated one (https://github.com/x0b/rcx/pull/37#discussion_r406750606)
- [x] Use proper logging (https://github.com/x0b/rcx/pull/37#discussion_r406751537)
- [x] Fix naming in DatabaseHandler
- [x] (Go over all of this: https://github.com/x0b/rcx/commit/2a19150d984339d470afc4dda488934db254bf0d)
- [x] Fix Crash in Triggerfragment when no tasks are defined
- [ ] Discuss naming of things (tasks/trigger)
- [ ] Fix theming not applied in new Activities (I dont quite get why it's not working, it should)
- [x] Add SharedPreferences to backup.zip
- [x] After restoring backups, the app crashes because restoring prefs introduces an error to taskdecription (#157)
- [x] when no tasks are defined, the button linking to tasks should not only open the tasklist but the taskcreation activity aswell
- [x] also, maybe add a cool message that there are no tasks?
- [x] remove logging that was left somewhere
- [x] task list icons are not properly stored/used
- [x] fix back button behaviour on fragments
- [x] Investigate why disabled-state is beeing ignored by the trigger
- [x] Add task-stacking, so that tasks scheduled at the same time are not lost
In the future: I want to investigate how exactly rcx behaves when multiple tasks are run simultaneous. The resulting information can be used to extend the trigger mechanism, so that it would be possible to run a task after a different task was run
- [ ] extend triggermechanism (maybe)
- [ ] Folderpicker for remotes (In the future. Maybe. Maybe not.)
- [ ] Status Indicator for task (Last run succeded, failed or is currently running)
- [ ] Add special task to export backup to remote so that rcx can backup itself
- [ ] Check regularly for storage access, because tasks "fail silently" with successmessages when it cannot access internal storage
Those ideas will very likely not be in this PR
This also fixes a small bug which generally blocks uploading when it only should block it when not on wifi
Works very well! Thanks for your work!
@iamtalhaasghar I need to update my branch to the latest anyway, so i'll do that.
Can you give me a link to the rclone-browser you mean?
https://kapitainsky.github.io/RcloneBrowser/
Yes, i believe they are quite similar. My PR allows you to define a folder and a target, which can then be triggered by an external app.
Im currently working on a trigger-system, so that tasks can directly be scheduled via rcx, i expect this to be working shortly
This now contains a trigger mechanism in addition to tasks
Edit: Moved todo to description
I capsuled the rclone processcall, because when it was not supplied by a build, the app just crashes. We should never crash, and this should trigger a more or less appropriate errormessage. (https://github.com/x0b/rcx/pull/84/commits/8d4b1228fb3063d0839a3e4c41da127a2f7b185f) This was a bit offtopic from the initial pr, but to be honest, this has gotten out of hand anyway :D
@x0b I think this particular pr is more or less done. It needs a review (i already have solved a lot of the initial issues) and then it can be merged! However, since this is a rather large PR, please feel free to make suggestions how i can make it easier to review :D
That's a huge set of changes 😮. It'll take a while to review, It is currently finals season at my university 🙈.
It seems your PR contains fixes for unrelated or only slightly related issues - can you factor them out into their own PRs? That way, I can fast-track those fixes. To be honest, this PR is currently too large to merge (a few reasons why that's bad).
If you have fixed a known issue (e.g. https://github.com/x0b/rcx/pull/84/commits/e559beaef8b28c7ad6bc9032c226d6a5b8d3c125 seems like a fix for #127), try to reference relevant issues in your commit message (example, the main rclone repo contains more helpful guidance on that topic).
@x0b yes i know, the main featureset (tasks/triggers) are most of the changes, but there are changes that are very close to it (eg. the switch from multiple impor/export actionts to a unified zip containing everything). And the next major thing (logging) is already in a new pr, and i would really like to overhaul darkmode which i will tackle sometime after this pr has been merged.
Gladly, a huge chunk was already reviewed in the older pr's albeit they have undergone many changes (mainly stuff from the older review and refactoring and streamlining)
Also: do take your time! I know this has gotten out of hand, but since i needed to implement this for myself i did it here. If it is helpful, we could make a cut at c824f38 but this would basically mean that you'd have to review many things twice since i continuously improved everything as far as i could see. (that pr basically seperates the task and trigger logic)
I have added a workaround for the missing remote-folderpicker. It relies on SAF beeing enabled and the system filepicker, and throws errortoasts if the user doesnt select a valid target. I am really not sure if we should keep it, however it 'works'
I just looked through the change log, this changes seem very extensive! However the changeset does seem to focus on tasks - is there a common way on Android to trigger on event (new file/photo?) without being killed by any power conservation process?
@aluo-x Good question! Generally it should not be hard to add additional triggers, like "on connection to wifi" or similar, but i am not sure if there is a good way to listen for changes on the disk. There is a FileObserver but it seems we would need to keep rcx permanently alive in the background.
And either way, first this needs to get merged to master before i add such features.
Any update on this? 👀
@AtilioA Sadly no, but if you want to test it anyway, take a look here: https://github.com/x0b/rcx/issues/38#issuecomment-1008675703
@x0b Heyho! Do you think you could give me a rough timeframe if/when you can review this PR and if you need changes beforehand? I'd like to make other changes, and i need to decide wether to wait for a review or if i start maintaining my own fork.
It's not that i cant wait further if it takes a bit more time, but it would be good to know if it is a week or a year, so that i know whats up with rcx!
Thank you very much!
Edit: I know this is by no means a small PR. However, sometimes there are big changes which cant be easily split. Also, many changes are layouts or boilerplate, so the actual code is considerably less, and it is easily splittable for a review. I am also working on refactoring code even further so that it can be split even further while reviewing
Are their are any plans plans for a fdroid release of extRact? rcx seems not been maintained anymore.
@Lukas1818 I am not yet decided on that. First i need to figure out the licensing (I'd like to use only a single license, but i am not sure if that's allowed or why there was a second license at all.)
If there is demand i can build and provide apk's via the release, but first i need to make some changes to the code.
Edit: Also, in some parts my changes are really messy at the moment because i have moved a lot of stuff around. So a refactor would be due before that.
Edit 2: Also i do not know how much of a 'maintainer' i would be. I will keep it working, because i need it to, and i will probably implement some features i have seen here, but it may be possible that i will not spend more time than required for basic maintenance.
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
1 out of 2 committers have signed the CLA.
:white_check_mark: newhinton
:x: djpohly
You have signed the CLA already but the status is still pending? Let us recheck it.
I have created a fork and development continues over at my repository.
(If i have any signed CLA's, please consider them revoked for now.)