Comments (5)
Yes, it is possible to upload other files rather than .mp4.
To support it you should remove an operator 'if' for mp4 in GDriveUploader script:
line 100 remove: && [ "$(echo -n $n | tail -c 4)" = ".mp4" ]
line 130 remove: if [ "$(echo -n $n | tail -c 4)" = ".mp4" ]; then
line 133 remove: fi
But I don't recommend to do this. When your camera is working it creates and removes temporary files (other than mp4). It will cause the problem that you will see unuseful files in your Google Drive folder.
You shouldn't put anything additional in the /home/hd1/record/. Camera is waiting for new folders in that folder, so when it see something in that folder it creates a folder with the same name in your Google Drive folder.
from xiaomi_gdrive.
What if I change the line [ "$(echo -n $n | tail -c 4)" = ".mp4" ]
to [[ "$(echo -n $n | tail -c 4)" = ".mp4" ] || [ "$(echo -n $n | tail -c 4)" = ".log" ]]
. I'm not a bash coder at all, please, correct me - I'm guesstimating with my C knowledge here. So will it work for *.log as well?
About folders stuff - can't I create /home/hd1/record/log folder and put all my logs in here, so they will be synchronised?
from xiaomi_gdrive.
- Yes. But without additional brackets. It must be like this:
[ "$(echo -n$n | tail -c 4)" = ".mp4" ] || [ "$ (echo -n $n | tail -c 4)" = ".log" ] - Unfortunately, no. It won't work. It will upload or files in the folder 'log' and then continue to upload other folders. It won't return back to 'log' folder again.
It is better to create additional scripts to upload other stuff in parallel.
from xiaomi_gdrive.
Thanks!
What if my script is going to create a folder with every_time_new_random_name and log file inside it every time I need it? will your script detect it?
from xiaomi_gdrive.
It depends on the folder name. Every time your script creates a folder it have to use the name like:
2016Y10M22D18H_log
Where "2016Y10M22D18H" is the current year, month, day and hour. This folder will be uploaded when 19 hour starts.
from xiaomi_gdrive.
Related Issues (14)
- 11-18 point - GDriveConf: line 59: /home/hd1/gdrive/./curl: not found HOT 1
- curl not work
- Ip Adress
- Deleting the content of recordings
- [Question] Do you think this base code would work in a newer Xiaomi model?
- Google OAuth2 changes of OOB causes drive API authorization failure HOT 1
- telnet setup not working can you help me pleas?
- Feature request: email notification HOT 4
- curl with more protocols HOT 2
- Feature request: uploading filename xxxxYxxMxxDxxHxxM.mp4 files HOT 2
- don't work on cameras 27US release HOT 5
- Config Issues HOT 4
- Could not open connection to the host, on port 23: Connect failed
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 xiaomi_gdrive.