11

Nextcloud Deck Export/Import

 1 year ago
source link: https://gist.github.com/svbergerem/5914d7f87764901aefddba125af99938
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

mstyp commented Oct 2, 2020

How do I use this? I dont know anything about python or coding. but I am sick of manually syncing between three different nextcloud servers.

@mstyp You can run this with python nextcloud-deck-export-import.py.

If you are using selfsigned certificates, you need to add verify=False after headers=headers in all functions.

2FA also needs to be disabled for this to work.

@svbergerem, thanks for the script :)

mstyp commented Oct 25, 2020

@keitalbame

Every time I try to run the script it says

File "NC1-NC2.py", line 13
f'{urlFrom}/index.php/apps/deck/api/v1.0/boards'
^
SyntaxError: invalid syntax

Also, one of the three servers I am using does use selfsigned certs, will i need to not use https in the urls?

mstyp commented Nov 8, 2020

edited

@mstyp You can run this with python nextcloud-deck-export-import.py.

If you are using selfsigned certificates, you need to add verify=False after headers=headers in all functions.

2FA also needs to be disabled for this to work.

@svbergerem, thanks for the script :)

Hello, is there some more information I could give you that could help make runnign this script easier? My time tracking is telling me I spent 2 hours this week just on manually making cards between three nextcloud instences look the same. I really need some way of doing this, I feel like I should not have to budget 20-30 mintues every morning just ot making my local server and two other servers.

Jeanoo commented Nov 8, 2020

hello,
is it possible to use this script to save the maps on my windows pc?

Thank you

hello,
is it possible to use this script to save the maps on my windows pc?

Thank you

Hi,
Not familiar with python in windows but I would say the workflow is the same.

tbh, I'm not a python developer. Just find this script very useful since I also needed to move from a server with self signed certificates into one with proper certificates.

A quick search on python code examples on how to handle self signed certs in python and testing on my own instance did the trick.

Hope it helps.

Jeanoo commented Nov 8, 2020

thank you for your messages

mstyp commented Nov 15, 2020

@mstyp Check https://github.com/keitalbame/nextcloud-deck-export-import/tree/master

I'm still getting the same error.

File "nextcloud-deck-export-import.py", line 13
f'{urlFrom}/index.php/apps/deck/api/v1.0/boards',
^
SyntaxError: invalid syntax

Not sure what I am doing wrong here. I used the self signed cert script. I have all the urls and stuff in there. I ran python nextcloud-deck-export-import.py and it always spits out that error, even when I replace the {urlFrom} with the regular URL

@mstyp are you replacing variables in lines 2,3,5 and 6 with your own?
Make sure to have the values inside quotes.

I do not have any instance to test this again and I don’t remember of having any issues running the script.

Can this be used to store all board information in a file for backup and restore it later (if need be), or will this only work to copy boards from one NC instance to another?

@mstyp Check https://github.com/keitalbame/nextcloud-deck-export-import/tree/master

I'm still getting the same error.

File "nextcloud-deck-export-import.py", line 13
f'{urlFrom}/index.php/apps/deck/api/v1.0/boards',
^
SyntaxError: invalid syntax

Not sure what I am doing wrong here. I used the self signed cert script. I have all the urls and stuff in there. I ran python nextcloud-deck-export-import.py and it always spits out that error, even when I replace the {urlFrom} with the regular URL

You're using a version of python that doesn't support f-strings.

@mstyp You can run this with python nextcloud-deck-export-import.py.

If you are using selfsigned certificates, you need to add verify=False after headers=headers in all functions.

2FA also needs to be disabled for this to work.

@svbergerem, thanks for the script :)

Thanks for the tipp!

Feels like there should be a possibility to do this globally.

Could this be turned in a full fledged export file?

@svbergerem
+1+1+1
excellent, works very well
many thanks for your script!

Thank you @svbergerem Worked well for me as well!

stif commented Oct 14, 2021

Thank you very much @svbergerem handshake Saved me a lot of work!

File "NC1-NC2.py", line 13 f'{urlFrom}/index.php/apps/deck/api/v1.0/boards' ^ SyntaxError: invalid syntax

@mstyp and anybody having the same error: make sure you use python3 and not python2


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK